View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Word 2007, mail merge, header, page numbering

I do not think that there has been a change in the way the headers are
created in mail merged documents from Word 2003 to Word 2007 as from my
tests with both versions, the headers were not linked to that in the
previous section.

If you run the following macro on the document created by executing the
merge, it will link all of the headers in the document to that in the first
section.

Dim i As Long
With ActiveDocument
For i = 2 To .Sections.Count - 1
.Sections(i).Headers(wdHeaderFooterPrimary).LinkTo Previous = True
Next i
End With


--
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, originally posted via msnews.microsoft.com
"hinesgg" wrote in message
...
I have a template originally created in Word 2003, where it worked
perfectly.
I have not been able to get it to work correctly since we converted to
Word
2007. The template is an invoice. The user first merges the data. Then
creates a header and inserts a quick part that contains our company logo
and
other information. The quick part also contains the invoice number, which
is
created using the page numbering feature. In Word 2003 the user was able
to
change the page number of the first page and all pages following would
also
change consecutively. I know this must be really simple, but I can't
figure
out why the page numbers on page 2 and all following pages are not
changing.
It appears that Word is creating a different section for each merged
record,
but I think it used to do that in Word 2003 as well. What's different
now?
What do I need to do to fix this?

Thanks in advance for any help you can offer.
--
Gail Hines
Texas State Auditor''s Office

512-936-9760