I have the following problem at hand. I need to fill out a word document with values from a web form. It seems to me that the most natural way to automatically modify a word document is to use Win32::OLE module. However, I do not know how to be able to control this process from a web based interface. I wrote a CGI script that attempts to create a COM object that represents a Microsoft Word application. When I run the script it never finishes. Using the trial and error method I determined that the execution stops when I try to open a word document after the COM object has been created. Below is the sample of the code I use. The web server is IIS5 on Windows 2000. I use Perl version 5.8
# initialize Word object my $Word = Win32::OLE->GetActiveObject("Word.Application", \&QuitApp); if( !$Word ) { $Word = Win32::OLE->new("Word.Application", \&QuitApp) or die "coul +dn't create an OLE object"; } $Word->Documents()->Open("c:\\Projects\\wtemplates\\TEMPLATE.DOC"); ...
Does anyone have any experience working with Win32::OLE? What is it that is going wrong with my script? Also, maybe I am not approaching the problem the right way. Is what I'm trying to do feasible? Are there any other ways of doing this? Like, maybe, creating a Windows service to process word documents that runs continuously and communicates with my script via a named pipe?
I would appreciate any thoughts on this.
In reply to OLE from CGI - Is it possible? by relax99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |