S
SHIPP
I have the following code in Access 97 which runs fine:
Dim objWord As Word.Document
Set objWord = GetObject("\\plbtpr02\data\Corp Sourcing\Shared\
AgreementFront\signature.doc", "Word.Document")
objWord.Application.Visible = True ' delete afterwards
objWord.MailMerge.Destination = wdSendToNewDocument
objWord.MailMerge.Execute
objWord.Application.Options.PrintBackground = False
objWord.Application.ActiveDocument.PrintOut
objWord.Application.ActiveDocument.Close False
objWord.Application.Quit
It merges the data with Word just as I want. The only problem is that it
pops up a 2nd instance of the database which the person has to subsequently
close. Does anybody know why or how I can close it through VB?
Dim objWord As Word.Document
Set objWord = GetObject("\\plbtpr02\data\Corp Sourcing\Shared\
AgreementFront\signature.doc", "Word.Document")
objWord.Application.Visible = True ' delete afterwards
objWord.MailMerge.Destination = wdSendToNewDocument
objWord.MailMerge.Execute
objWord.Application.Options.PrintBackground = False
objWord.Application.ActiveDocument.PrintOut
objWord.Application.ActiveDocument.Close False
objWord.Application.Quit
It merges the data with Word just as I want. The only problem is that it
pops up a 2nd instance of the database which the person has to subsequently
close. Does anybody know why or how I can close it through VB?