G
Guest
I copy a table from my current database over to an independant database
(mailingBaseDB) and then mailmerge this data. When I have executed the
mailmerge I close the merge document but it leaves the database
(mailingBaseDB). I am using Office 2000
' Set the mail merge data source
MergeFileName.MailMerge.OpenDataSource _
Name:=docPath & "\MailingBaseDB.mdb", _
Connection:="TABLE mailMergeBaseGeneral", _
SQLStatement:="SELECT * FROM [mailMergeBaseGeneral]"
' Execute the mail merge.
Set closeFileName = MergeFileName
MergeFileName.MailMerge.Execute
closeFileName.Close wdDoNotSaveChanges
I tried closing the database with code but that didnt seem to work
' Close mailingDB
Set mergeInfo = OpenDatabase(docPath & "\MailingBaseDB.mdb")
mergeInfo.Close
Any suggestions please
(mailingBaseDB) and then mailmerge this data. When I have executed the
mailmerge I close the merge document but it leaves the database
(mailingBaseDB). I am using Office 2000
' Set the mail merge data source
MergeFileName.MailMerge.OpenDataSource _
Name:=docPath & "\MailingBaseDB.mdb", _
Connection:="TABLE mailMergeBaseGeneral", _
SQLStatement:="SELECT * FROM [mailMergeBaseGeneral]"
' Execute the mail merge.
Set closeFileName = MergeFileName
MergeFileName.MailMerge.Execute
closeFileName.Close wdDoNotSaveChanges
I tried closing the database with code but that didnt seem to work
' Close mailingDB
Set mergeInfo = OpenDatabase(docPath & "\MailingBaseDB.mdb")
mergeInfo.Close
Any suggestions please