I am creating a report in Word programmatically, using automation from Access. During the report creation, I get to jump between 2 or 3 procedures several times, during which I lose my reference to my Word document. I used the following code to establish the reference: [indent]
Set Wrd = New Word.Application
Set doc = Wrd.Documents.Add(“c:template.dot”)
[/indent]
Notice that I’m opening a file based on a template. At this point in my code, the document hasn’t been saved, yet. My question is: Can I make the reference persistent between procedures, or, if not, how do I re-establish the reference to that specific file that has remained open?
Thanks for your help.