Hi Team,
I am attempting to use Access to preform a mail merge using a query that has been exported to csv and the mail merge in word is all set up all we need to do is physically run the mail merge.
I have used the following code however it just opens that document but does not update the merge information... Your assistance is appreciated...
copy to clipboard
Function Mailmerge_Lodgment_Infomation()
Set appWD = CreateObject("Word.Application")
appWD.Visible = True
appWD.Documents.Open FileName:="C:\Users\trent_000\Documents\TFM Database\Mail_Lodgment.docx"
appWD.ActiveDocument.PrintOut
Set fs = CreateObject("Scripting.FileSystemObject")
fs.DeleteFile "C:\Users\trent_000\Documents\Time for Monkeys Database Export\Lodgment Receipt.xlsx", force
appWD.Visible = True
appWD.Quit SaveChanges:=wdDoNotSaveChanges
End Function
Bookmarks