![]() |
|
#14
|
||||
|
||||
|
The issue was mainly to do with your SQL statement, especially using 'Sheet1' instead of `Sheet1` (note the shape of the quote marks). You'll see that I've also added some more code to the overall OpenDataSource statement, which now spans 7 lines, to ensure all relevant parameters are used.
As for your document, simply answer 'no' to the prompt, then save. You would definitely need a different document for labels and envelopes. The code would also need modification if it were to handle each kind, since it would need to call those different documents and tell Word what kind of merge to execute. That entails rather more than just a message box. PS: Please don't keep quoting entire previous posts in your replies. If you need to quote something, quote only that part; otherwise don't quote anything - it just wastes screen space and board storage.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
mail merge in excel to send pdf forms
|
heyullama | Excel | 7 | 12-01-2013 03:32 PM |
| Excel Mail merge | Joren | Word | 0 | 07-09-2013 07:38 AM |
mail merge with excel and words
|
don0712 | Mail Merge | 1 | 01-29-2013 06:53 PM |
Templates, pictures, Mail Merge and Excel
|
kckay | Word VBA | 1 | 05-17-2012 08:51 PM |
Mail Merge from Excel
|
Kieroncsmith | Mail Merge | 2 | 02-16-2012 10:35 PM |