>Good afternoon
>
>I am modifying a VFP7 app and need to use Automation with Word. Currently we use late binding and create a Word object like this:
>PUBLIC oWord
>oWord = CREATEOBJECT( "Word.Application")
>
>Testing on 2 differnt, middling fast XP boxes, the load time is 7 - 9 seconds.
>On a older Win98 box, the load time can be greater than 15 seconds. This is unacceptable to my customer.
>
>Is there a way to speed up loading Word?
>
>Will early binding speed things up? Is so, how do I do it? CreateobjectEx? Can you point me to an example?
>
>Thanks
>- Don Lowrey
I don't know exactly how to automate it, but it simply takes a while to open Word, whether you do it manually or through Automation. You must somehow try to keep it open. Perhaps keep a global Word object, open it the first time it is requested, and then, for subsequent uses, just add a document and process that document. Perhaps make it invisible in between, depending on your needs.
Note: The client must have enough memory to hold both VFP and Word at the same time, without having to use virtual memory. Otherwise,
any Automation task will be slow, whether you keep Word open, or close it in between.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)