Merge Object and not displaying Access Queries with VBA
I have a database where some queries utilize VBA code to output text for mail merge.
To make these queries appear during a mail merge I have to check the advanced option 'Confirm File Format on Open'. Then select DDE when doing the merge.
If I try to merge with VBA code within a word document:
ActiveDocument.MailMerge.OpenDataSource Name:=dbpath, ConfirmConversions:=True, ReadOnly:=False, LinkToSource:=False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, Connection:="", Format:=wdOpenFormatAuto, SubType:=wdMergeSubType2000
It successfully opens the database but the queries that have the VBA code are absent as if the 'Confirm file format..' is unchecked. How can I make them appear when doing a merge with VBA code?
|