Article ID: 279462 - Last Review: October 23, 2006 - Revision: 2.2 PRB: Prompted To Select a Data Source While Automating Word 2002 Mail MergeThis 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:
285332
(http://support.microsoft.com/kb/285332/EN-US/
)
HOWTO: Automate Word 2002 with Visual Basic to Create a Mail Merge
MORE INFORMATION With Word 97 and Word 2000, the following Automation code
creates and executes a mail merge against SQL Server data without user
intervention. Note You must change UID <username> and pwd =<strong password> to the correct values before you run this code. Make sure that UID has the appropriate permissions to perform this operation on the database. REFERENCES For more information, see the following article in the
Microsoft Knowledge Base:
289830
(http://support.microsoft.com/kb/289830/EN-US/
)
PRB: Prompt to Select Table with Word 2002 Mail Merge Code for Excel or Access Data Source
| Article Translations
|

Back to the top
