Word Question

SusanDalton

New Member
Joined
Nov 3, 2008
Messages
2
I have 6 different Word files that generate letters from 1 Excel workbook. Currently, I am mail merging the letters one at a time and printing.
I have set up a column in Excel called letters and I input a value of 1 through 6 in the column. I filter against this column each time I print.

I am going through the same mail merge process 6 times to generate all of the letters.

My goal would be to save the six letters in one Word document and embed code at the beginning of each page. The code would tell Word which records belong with their respective letter.

Is it possible to streamline this process?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
HI Susan, not sure but this part can probably be streamlined:
Code:
I filter against this column each time I print.
Do you go into Excel and filter, then run the merge? If so, I'm pretty sure you can do that filtering from Word. That is one less step.
The next option after that would be to create code in another, controller document. The code could --
Open each document in turn (the file paths could be hard-wired in code, or you could place them in the controller document or use a file picker to choose them; alternatively, place the files in a folder and process evrything in there).
Once each document opens, run the mail merge, then save and close. This could be coded too, so that each merge run was saved to a set location with a file name including a date stamp.

Would this be the sort of thing that you are looking for?

Denis
 
Upvote 0
Hi Susan,

You should be able to do this easily enough by wrapping each 'letter' in an IF field (created via Ctrl-F9), coded along the lines of:
Code:
{IF{MERGEFIELD Key}= # "Body of #th Letter"}
where 'Key' iis the name of the field you put the numbers 1-6 in and # is the 'key' value.

You'd run all these IF tests together one after the other, with no page breaks in between, thus:
Code:
{IF{MERGEFIELD Key}= 1 "Body of 1st Letter"}{IF{MERGEFIELD Key}= 2 "Body of 2nd Letter"}{IF{MERGEFIELD Key}= 3 "Body of 3rd Letter"}{IF{MERGEFIELD Key}= 4 "Body of 4th Letter"}{IF{MERGEFIELD Key}= 5 "Body of 5th Letter"}{IF{MERGEFIELD Key}= 6 "Body of 6th Letter"}
Do note that the field brace pairs (ie '{}') must be created via Ctrl-F9 - you can't simply type them or copy & paste from this post. And be careful with the spacing and to enclose the body of each letter in a pair of double quotes (plus you can't have any in the body of the text - though there are way around this if it's critical).

Cheers
 
Upvote 0

Forum statistics

Threads
1,225,378
Messages
6,184,621
Members
453,249
Latest member
gmazee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top