[Word 2003 & Excel 2003] Mailmerge multiple sources
I have been tasked with creating a macro that would give the user a list of excel file data sources to chose from for a mailmerge.
The object is to minimize the number of front end steps that appear when the document is opened as the end users are not that Word and Excel savy.
My problem is that I can not figure out how to code the macro that I will be putting in the document.
I know that the form I will be creating will be fairly simple with a drop-down list offering the file choices for the merge, I'm just not sure how to prevent the following two steps that I am concatenating in the form from appearing to the end users.
http://www.littlenifties.com/special...merge_msg1.png
http://www.littlenifties.com/special...merge_msg2.png
Suggestions with be happily attempted.
Updated spec:
I also have to have it set to looking for the files in the directory that the Word doc is in, as it can't be totally guaranteed the directory will be in My Documents (for example).
datapard
Re: [Word 2003 & Excel 2003] Mailmerge multiple sources
are you writing in word, excel or other?
thisdocument.path will return the path, if the code is in that document
take out all the steps for crating a mailmerge document and provide your own interface, then provide the data source by code only
you can use shbrowseforfolder to select a folder, or fileopen dialog to select the data file, based on your own criteria
Re: [Word 2003 & Excel 2003] Mailmerge multiple sources
Quote:
Originally Posted by
westconn1
are you writing in word, excel or other?
thisdocument.path will return the path, if the code is in that document
take out all the steps for crating a mailmerge document and provide your own interface, then provide the data source by code only
you can use shbrowseforfolder to select a folder, or fileopen dialog to select the data file, based on your own criteria
I'm working with an existant Word mailmerge document. I'm not sure how to remove the steps for creating a mailmerge, any suggestions on what I would need to do?
Thanks,
datapard
Re: [Word 2003 & Excel 2003] Mailmerge multiple sources
if the word document is saved as a mailmerge document with an existing datasource, you will not get the wizard, then you can change the data source by code to suit
of course all available data sources, for selection, should have the same fields, otherwise would require editing of field names in document
Re: [Word 2003 & Excel 2003] Mailmerge multiple sources
Quote:
Originally Posted by
westconn1
if the word document is saved as a mailmerge document with an existing datasource, you will not get the wizard, then you can change the data source by code to suit
of course all available data sources, for selection, should have the same fields, otherwise would require editing of field names in document
Oddly enough the document is saved as a mailmerge document. The existing datasource is, on my machine at least, sitting in the same directory. The two images above appear when the document is opened, so apparently I am doing something wrong. I'm not sure what.
I'm trying to figure out the code to change the data source using a form that appears when the document is opened (instead of the two above).
One thing I definitely intend to do is have them put all data source files together in their own directory which will, of course, make populating the choice form easier. And yes, they will be told that changing the fields in the source files will break the mailmerge.
Suggestions?
As always, thank your for your help.
datapard