Hello, on Friday I posted a question about how to dynamically create word documents using PHP. I have figured out how to open a new word com object and have been able to successfully create my dynamic word documents that way. However, it is very slow as it is opening a new instance of word on the server every time I want to create a new document. What I would like to be able to do is connect to an existing open object and use it to create my documents so that I'm not having to open a new instance of word every time I want to create a new document. I know this can be done because I do it with .asp and .cfm but I can't seem to find any documentation for php on how to do this. I'm amenable to invoking a new instance just for php and connecting to that one (thereby having two instances of word open on the server at any one time). But I cant' seem to figure this out. Ideally, I'd like to use the same instance that I have open for .cfm and .asp.
I've tried:
$objWord = com_load("Word.Application");
$objWord = new COM("Word.Application");
but as I said above, both of those invoke new instances of the word application on the server which causes a significant amount of load time.
does anyone know a way to call the already open instance?
thx,
Burr
Word COM objects
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
word
I run several web sites that sell documents online. I email them their documents in MS Word format so I DO use html to create the documents with their proper formatting etc. But I need to be able to send them to my customers in MS Word format.
Notepad is not gonna work for my situation.
any other "real" ideas?
thx,
Burr
Notepad is not gonna work for my situation.
any other "real" ideas?
thx,
Burr
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK