Jump to content

[SOLVED] COM class


sad_sam19

Recommended Posts

hello everyone!

I am working on a project that will create a Word document.

On my computer, it is working properly. But on the server where i loaded the program it has errors.

I just got one question, does COM class will not work on a computer if it does not have MS Office installed on it?

I already checked the Component Services, etc.. But it still not working properly,.

 

the error goes like this..

Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `word.Application': Invalid syntax ' in D:\webservr\ins_monitoring\REPORTS\prepare_renewal_advice.php:43 Stack trace: #0 D:\webservr\ins_monitoring\REPORTS\prepare_renewal_advice.php(43): com->com('word.Applicatio...') #1 D:\webservr\ins_monitoring\REPORTS\ForRenewalThisMonth.php(33): include('D:\webservr\ins...') #2 {main} thrown in D:\webservr\ins_monitoring\REPORTS\prepare_renewal_advice.php on line 43

 

please help :'(

 

thanks!! :-*

Link to comment
Share on other sites

Yes, to use the COM to create a word document, you do need to have Word installed. I believe you can work around this either by creating RTF documents which word can open anyway, or creating HTML pages but setting the content type to a word document. If you google, you should find examples.

Link to comment
Share on other sites

"HTML pages but setting the content type to a word document"

 

that's probably the best answer you can get, but don't work too hard on it since MS doesn't conform to standards therefore word will expect the html to be MS way, not the right way.

 

Install office and keep on going, or better yet, go *nix and create pdf's?

Link to comment
Share on other sites

Yeah, I just mention'd *nix since if they no longer need office, they might as well abandon winblows for something that owns 99% of server market for a reason. And *nix distros are usually free as in speech, you can do anything you want...even modify their programs. Since when did you have access to source code for stuff that matters on a proprietary system.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.