Jezebel,
Thank you for answering so quickly.
The main merge document all ready has the header and footer needed, the
merged document (all of the letters in one document) has the header and
footer needed, but through the processing of the code below, which separates
each of the letters from the merged document and saves them each to a
separate file, the header and footer are missing in the separated files.
Any ideas to keep the header and footer in the separated letters?
Thanks.
> Simplest approach is to create a template that has the headers and footers
> you want, then create your new documents using that template --
[quoted text clipped - 29 lines]
> >
> > End Sub
Doug Robbins - Word MVP - 07 Feb 2007 18:22 GMT
The Header/Footer information is contained in the Section Break that appears
at the end of each merged letter. As for all merged letters, other than the
last, the Section Break is a Next Page Section Break, the following line of
code:
Letter.End = Letter.End - 1
was used to delete that Section Break so that there would not be an empty
page at the end of each separated letter.
By deleting the Section Break, the header and footer are being deleted. The
following modified code, converts each Section Break to a Continuous Section
Break, that will eliminate the empty page (unless the previous page is full
to the gills), rather than delete the Section Break.
Dim i As Long, Source As Document, Target As Document, Letter As Range
Set Source = ActiveDocument
For i = 1 To Source.Sections.Count
Set Letter = Source.Sections(i).Range
Set Target = Documents.Add
Target.Range = Letter
Target.Sections(Last).PageSetup.SectionStart = wdSectionContinuous
Target.SaveAs FileName:="Letter" & i
Target.Close
Next i

Signature
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
> Jezebel,
>
[quoted text clipped - 49 lines]
>> >
>> > End Sub
S trainer - 07 Feb 2007 19:50 GMT
Thank you again Doug!
> The Header/Footer information is contained in the Section Break that appears
> at the end of each merged letter. As for all merged letters, other than the
[quoted text clipped - 74 lines]
> >> >
> >> > End Sub