PRB: Prompted To Select a Data Source While Automating Word 2002 Mail Merge (279462)
The information in this article applies to:
This article was previously published under Q279462 SYMPTOMS When you call the OpenDataSource method while automating Word 2002, the Select Data Source dialog box appears. If Word is not visible, it may appear to have
stopped responding. CAUSE When you call OpenDataSource, the Select Data Source dialog box typically appears if you have not provided enough
information to connect to the data source. By default, Word 2002 attempts to
connect to the data source by using the Office DataSource Object (ODSO). ODSO
requires the complete path and file name to either a database or an Office
DataSource Connection (.odc) file for the Name argument. If you provide the Name argument with an empty string, the Select Data Source dialog box appears. RESOLUTION To avoid the dialog box to select a data source, do one of
the following:
- Supply the Name argument of OpenDataSource with the full path to a file-based database, such as a Microsoft
Access database, a Microsoft Excel workbook, or a text file.
- Supply the Name argument of OpenDataSource with the full path to an .odc file.
- Supply the SubType argument of OpenDataSource with wdMergeSubTypeWord2000 to emulate Word 2000 behavior.
For additional information on
the different data access methods you can use for a Word 2002 mail merge, click
the article number below to view the article in the Microsoft Knowledge Base: 285332 HOWTO: Automate Word 2002 with Visual Basic to Create a Mail Merge
REFERENCES For more information, see the following article in the
Microsoft Knowledge Base:
289830 PRB: Prompt to Select Table with Word 2002 Mail Merge Code for Excel or Access Data Source
Modification Type: | Major | Last Reviewed: | 10/29/2003 |
---|
Keywords: | kbAutomation kbprb KB279462 |
---|
|