Re: [PHP] Fwd: Code Optimization Help

2005-09-21 Thread Jochem Maas
Joseph Crawford wrote: Ok so finally i implemented my logging class into my mail merge object, this is the results Word - Application Opened. Word - Document1 Document Added. Word - header.doc Document Saved. Word - header.doc Document Closed. Word - Document2 Document Added. Word - ds.doc

[PHP] Fwd: Code Optimization Help

2005-09-20 Thread Joseph Crawford
Hello Everyone, I have some code that is using COM to interact with MS Word to create a mail merge based on my mysql database, however it is running dreadfully slow 13.53846 seconds to be exact. This is only running on 34 records, i could imagine running this on a few hundred records not to

Re: [PHP] Fwd: Code Optimization Help

2005-09-20 Thread Jochem Maas
Joseph Crawford wrote: Hello Everyone, I have some code that is using COM to interact with MS Word to create a mail merge based on my mysql database, however it is running dreadfully slow 13.53846 seconds to be exact. This is only running on 34 records, i could imagine running this on a few

Re: [PHP] Fwd: Code Optimization Help

2005-09-20 Thread Joseph Crawford
I am not sure where you got the idea that it is creating an instance of word for every record, but it creates one instance then loops through the records using that one instance. On 9/20/05, Jochem Maas [EMAIL PROTECTED] wrote: Joseph Crawford wrote: Hello Everyone, I have some code

Re: [PHP] Fwd: Code Optimization Help

2005-09-20 Thread Jochem Maas
Joseph Crawford wrote: I am not sure where you got the idea that it is creating an instance of word I got the idea from your code, but I just gave it a quick glance... that said you instantiate a new COM object in at least 3 places... CreateHeader() CreateDataSource() CreateDocument() which

Re: [PHP] Fwd: Code Optimization Help

2005-09-20 Thread Jochem Maas
Joseph Crawford wrote: Jochem, I did attempt what you wanted me to try, however when i did that it just hung up on the OpenHeaders $this-obj-ActiveDocument-MailMerge-OpenHeaderSource($this-mm_data_dir.'/header.doc'); maybe your Close() function should be different?: private function

Re: [PHP] Fwd: Code Optimization Help

2005-09-20 Thread Joseph Crawford
Ok so finally i implemented my logging class into my mail merge object, this is the results Word - Application Opened. Word - Document1 Document Added. Word - header.doc Document Saved. Word - header.doc Document Closed. Word - Document2 Document Added. Word - ds.doc Document Saved. Word -