View Single Post
 
Old 12-21-2015, 12:32 PM
jmo jmo is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Dec 2015
Posts: 7
jmo is on a distinguished road
Default Mail Merge from Access DB

I have an access database with one large table and a number of queries. We merge using DDE.

Currently we process specific documents by opening a mail merge, navigating to the fiscal year, then selecting the database (which corresponds to this fiscal year), selecting the appropriate query, and then the correct item from that query.

I'm creating a simplified visual basic user form with buttons to automate some other processes and I thought it might be useful to speed up the mail merge such that:
1) Select Fiscal Year from user form.
2) Hit 'go' and it automatically opens the data-base and displays the available queries. The user would then select the query and the item as usual.

So I'm trying to set the database source with:
ActiveDocument.MailMerge.OpenDataSource Name:=DBLoc, SubType:=wdMergeSubTypeWord2000, LinkToSource:=False, ReadOnly:=True

The 'DBLoc' string shows the correct path in the debugger but the error I'm getting is:

'Word was unable to open the data source.'

So I can't get any further with my experimentation. Why won't it open?
Reply With Quote