English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have developed an Excel VBA procedure which takes my database file, extracts part of it to an intermediate Excel file, calls Word, and does a mail merge to print labels. The intermediate file is the data source for the Word mail merge template.

It all works very well, except that when the VBA procedure closes the mail merge template (without saving it), a dialog box is produced asking the user whether or not to save the intermediate file (the data source). I would like to suppress this dialog box, and close the file without saving, but cannot figure out how to do it.

I'm posting this in the hopes that someone has encountered exactly the same problem and has a solution. I have tried many different approaches without success.

It's really a minor problem, so if you don't know the solution, please don't spend a lot of time trying to figure it out. Thanks!

2007-02-10 15:20:57 · 2 answers · asked by Joliet Jake 3 in Computers & Internet Software

2 answers

I don't have a clue what you are talking about, but I will tell you how I merge Word and Excel, selectively - by using a "query" in the Mailmerge Helper dialog box.

I have a Word main document - letter, label, catalog
with an Excel datafile

In Word, with the Mailmerge Helper, I select what I want to create (letter, label), "get data" (the datafile) -- import the whole datafile - then before the merge, I select "query."

Here, you can sort the files and/or filter them to meet your specifications, then merge.

You save the main document.
You continue to add to or update the datafile.
Next time you want to redo, you simply have to open the main document and merge again.

How does this differ from what you are trying to do?

2007-02-10 15:33:03 · answer #1 · answered by TheHumbleOne 7 · 0 0

Use the backwards P on your Standard tool bar to see if there are any unwanted characters or section/page breaks. However a quick solution is as follows: Once you have mail merged to your new document, which has blank pages. Click 'File', then 'Print...', then tick 'Print to file', then select Odd or Even pages from Print drop down box, then click 'OK'. You can then save to your hard drive. This new document won't have blank pages.

2016-05-25 08:03:25 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers