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.