Word 2003 Macro - Pause for user to select datasource

J

JEC

I have one template used by several people with a macro that attaches the
header and prompts user to enter the name they want this doc saved as. I
would like the macro to pause and and allow the user to naviagate to a
specific directory to select the datasource, (which is a .txt file). Can
this be done in the macro?

Any help would be appreciated.
 
B

Beth Melton

You can't necessarily pause the macro but you can show a dialog box,
such as the Select Data Source dialog box and use it to obtain the
data source for your macro:

Application.Dialogs(wdDialogMailMergeOpenDataSource).Show

If you aren't sure what to do with the above code then you may want to
post in one of the Word VBA newsgroups.

Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Office 2007 Preview Site:
http://www.microsoft.com/office/preview/default.mspx
Office 2007 Community Articles/Tutorials:
http://www.microsoft.com/office/preview/community/article_archive.mspx

TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
Top