MSWord.OlePropertyGet("Documents").OleProcedure("Open", filenames->Strings[i].c_str(), false, true, false);
WideString(filenames->Strings[i].c_str())
WideString(filenames->Strings[i])
MSWord.OlePropertySet("DisplayAlerts",0 /*wdAlertsNone */);
Document=Documents.OleFunction("Open", FileName.c_str(), false, true, false);Pages=Document.OlePropertyGet("BuiltInDocumentProperties").OlePropertyGet("Item",wdPropertyPages).OlePropertyGet("Value");Document.OleFunction("Close");