|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
PHP COM to work with Word documents
Hi I am fairly new to PHP and wanting to use fields from my MySQL database to populate a letter created in Ms Word using bookmarks
I am using the following line of code <? $word = new COM("word.application") or die("Unable to instantiate Word"); ?> But I get the error message "Unable to instantiate Word " Could anyone help me please Thanx in advance cbutler |
|
#2
|
||||
|
||||
|
Here's some example code to write to word documents:
PHP Code:
But I assume you have that... Personally I just tried the code... After waiting a while, I received an error from Office pop up (in my windows session, not on my php page)... after installing the proper CAB file from my Office CD, and refreshing the page, it worked. Some possible issues you may be encountering... The COM class only works in Windows... perhaps "Word.Application" is case sensitive... |
|
#3
|
|||
|
|||
|
MadCowDzz ..
Do you Know a good book about php that talk about advanced php and COM ??? please recommend one or two .. and i hope that it has an arabic translated copy .. |
|
#4
|
||||
|
||||
|
PHP's documentation of the COM class is excellent... its definately helped me out in the past...
http://www.php.net/manual/en/ref.com.php not too sure about arabic translations... =) I haven't heard of any specific books about PHP/COM specifically, but I'm sure any good Advaced PHP book would help you out... I've read Web Application Development with PHP 4.0 (Amazon link) It does have a small section specifically referring to COM |
|
#5
|
|||
|
|||
|
Thanks Alot My Friend ..
I will try to get this book .. |
|
#6
|
|||
|
|||
|
You are trying to learn a specific feature of PHP, so it is recommended to get in touch with tutorials instead of a book for now.
If tutorials doesn't helps, then only you should go for a book. |
|
#7
|
|||
|
|||
|
dear mike ..
i think book will be much useful than tutorials .. the tutorials just tells you the method to do that ... but the good book tells you the method and the ideology of it .. it will be greater to know this .. i like books if the feature not common or hard to understand .. may be i wrong .. but i see i learn more from books .. finally thanks for your advice ... it is really appreciated ... |
|
#8
|
||||
|
||||
|
I agree with mike...
If you're looking into advanced topics in general, then i recommend the book... but if you specifically want to know the COM class, I'd recommend the PHP manual... most books wouldn't cover the class as extensively and thoroughly as you may hope for |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > PHP COM to work with Word documents |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|