Individual merge add-in - preserving page border settings?

C

C. Cunningham

Hi there,

I'm hoping either Doug or Graham is out there to give me a suggestion on
this issue. I am using Graham's individual merge add-in
(http://www.gmayor.com/individual_merge_letters.htm), and when I merge to
separate documents, it does not preserve my "do not surround header" and "do
not surround footer" page border settings, and shifts the page border. Do
you have any suggestions as to what VBA code to modify in the add-in so that
these 2 settings will transfer to the new documents?

(Based on Doug's suggestion from my post on 1/20/06, I've already modified
the code to open the new documents in print layout view, rather than "normal"
view.)

System info:
I'm using Word 2002 SP3, operating on Windows XP Pro, Version 5.1.2600
Service Pack 2 Build 2600.
Data source is an Excel 2002 ServicePack3 spreadsheet.

Thanks!
Cara
 
D

Doug Robbins - Word MVP

Create a template that has the required settings and then in the Private Sub
app_MailMergeAfterMerge(ByVal Doc As Document, ByVal DocResult As Document)
routine, replace the line of code:

Set NewDoc = Documents.Add(Visible:=False)

with

Set NewDoc = Documents.Add(Template:="c:\documents and
settings\[username]\application
data\microsoft\templates\[TemplateName].dot", Visible:=False)

Where the [username] is whatever is appropriate for the path to your
templates folder and [TemplateName] is the name of the template that you
created with the required settings.

I think that you should then get the desired result.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
C

C. Cunningham

I just had a chance to test it out, and.... as usual, another fabulous
answer! Thank you so much, it works perfectly!

I saved a copy of my master merge document as a .dot template (being sure to
disconnect it from the data source, and on the merge toolbar changed the main
document set-up to "normal word document" instead of "letters".) And then
the formatting came through just as it should.

I saw from another post where you suggested something similar to Shelley
Faye back in May '06, but the syntax was for the macro, not for the add-in
and I couldn't figure out the proper way to change the code without it giving
me errors.

Thanks again for the fix!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top