Re: COM and MSWord Automation



On 2 Set, 14:46, "Dale" <the....@xxxxxxxxxxx> wrote:
<rob02o...@xxxxxxxxxxx> wrote in message

news:c5a925d0-8629-404e-9d01-296c56ec3d74@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi there!
I'm trying to automate MSWord in the server side.

For limiting memory usage i'm writing code to make a unique instance
of winword and then calling it from the php page i need.

So far i've used the sleep() function to keep alive the winword
instance but i think it would be better to use com_message_pump and
com_event_sink to take care of the winword process.

Alas when i try the code with com_event_sink function winword get
stuck?

Anyone has already tried something similar and/or has good example of
a winword daemon or similar?

uhmmm, 'daemon'? winword? you are mixing linux and windows terms. what's
your config? are you running php on linux and creating the word instance on
a remote windows server, or are you running everything on the same
pc/server - a windows server?

you do realize that php may or may not be running in the same process thread
each time an http request is made, right? are you familiar with
cross-process development in windows?

Hi and thanks for the reply.
Well i'm in a win32 server box, and as 'daemon' yes i was meaning a
service (or something like act as it).
I need to make mailmerge (i know of xml classes but i cant do this
because template are manipulated in clients) on the server and i have
realized that using multiple instance of winword will be a wast of
system resources (CPU, memory...).
What i want to accomplish is to have a php script running the COM
winword instance (for a period ie sleeping for accomplish tasks) and
making call with com_get_active_object.
I was thinking that the best practice would be to use com_message_pump
but i'm not really sure about this?
Thanks!
Rob
.



Relevant Pages

  • Re: Executing a locally installed program in IIS 6
    ... it appears that PHP requires enabling a security ... function needs CMD.EXE to have weak ACLs and accessible via IIS -- something ... we explicitly denied with IIS6 on Windows Server 2003). ...
    (microsoft.public.inetserver.misc)
  • Re: COM and MSWord Automation
    ... I'm trying to automate MSWord in the server side. ... of winword and then calling it from the php page i need. ... I need to make mailmerge (i know of xml classes but i cant do this ...
    (comp.lang.php)
  • Re: PHP emulator
    ... server environment on your desktop. ... I have an old Zend for php. ... Does it make any sense to use php on a windows server? ...
    (comp.lang.php)
  • unixODBC -- cant make it work
    ... I'm trying to use PHP on a REDHAT linux Enterprise 4 machine to access ... MS SQL Server on a Windows Server 2003 machine through an ODBC ...
    (linux.redhat.misc)
  • Re: PHP emulator
    ... I have an old Zend for php. ... Does it make any sense to use php on a windows server? ... a windows machine, when they could do it on a linux box, ...
    (comp.lang.php)