PHP COM("word.application")
Posted: Tue Jan 30, 2007 6:56 pm
Hello
I've found few topics here about opening, modifying, creating etc. .doc files using PHP.
Do you have any documentation about methods of COM("word.application") object, like:??
I need to get number of pages of .doc file and open only specified page nr, not the whole .doc file.
I've search internet and didn't find anything about how to do this in PHP.
I've found how to get number of pages using VBA, and it's something like that:
Solution #1:
Selection.Information(NumberOfPagesInDocument)
Solution #2:
ActiveDocument.BuiltInDocumentProperties("Number of Pages")
Solution #3:
ActiveDocument.Content.ComputeStatistics(wdStatisticPages)
but i couldn't implement this in php.
Another question, when i make new COM object:
it takes 17 seconds. is it normal??
I've found few topics here about opening, modifying, creating etc. .doc files using PHP.
Do you have any documentation about methods of COM("word.application") object, like:
Code: Select all
docHandle->Documents[1]->Activate();
docHandle->ActiveDocument->Select();
//etc...I need to get number of pages of .doc file and open only specified page nr, not the whole .doc file.
I've search internet and didn't find anything about how to do this in PHP.
I've found how to get number of pages using VBA, and it's something like that:
Solution #1:
Selection.Information(NumberOfPagesInDocument)
Solution #2:
ActiveDocument.BuiltInDocumentProperties("Number of Pages")
Solution #3:
ActiveDocument.Content.ComputeStatistics(wdStatisticPages)
but i couldn't implement this in php.
Another question, when i make new COM object:
Code: Select all
$handler = new COM("Word.Application") or die("Unable to instanciate Word");