|
-
Jan 13th, 2000, 03:47 AM
#1
Thread Starter
Member
I am trying to write a COM Object that has functions to create a "Word.Application" object, write and format some data in the document and then save the document.
This dll will be registered and run on my Personal Web Server from which I will access the COM object via script.
My question is, in the dll, how do I declare or create the object .... Set appWD = CreateObject ("Word.Application")
.... so that It is available to ALL other functions?
(I need to be able to close the instance of Word from script by calling a method on the COM object that in turn kills the Word.Application object)
Thanks, Sorry this is so wordy.
-
Jan 13th, 2000, 06:28 AM
#2
Hyperactive Member
-
Jan 13th, 2000, 11:07 AM
#3
Guru
Kenny is correct. If you only have a single class, put it in the general/declarations. In the Class_Initialize, instantiate the object. In the class_terminate, destroy the object. These methods do not apply if your component will run in MTS: You'll have to do it all within one function
FYI: This will not be a scalable solution because of the large overhead required to instantiate the word object....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|