Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Splitting word doc into multiple docs

93 views
Skip to first unread message

Brett

unread,
Dec 23, 2002, 12:35:19 PM12/23/02
to
I have a 750 page word doc (forms letter from a mail
merge) which is composed of 6 page merged forms letters
with a page break between each one. I need to split this
document up and be able to specify names for each
individual document after the split. Looking for anything
faster than copy every six pages to a new doc and doing
save-as 100 plus times.

Graham Mayor

unread,
Dec 24, 2002, 4:09:34 AM12/24/02
to
The following macro will do that - change the path to the location you wish
to save the documents:

Sub SplitMergeLetter()
' splitter Macro
' Macro created 16-08-98 by Doug Robbins to save each letter created by a
' mailmerge as a separate file.
'
Selection.EndKey Unit:=wdStory
Letters = Selection.Information(wdActiveEndSectionNumber)
Selection.HomeKey Unit:=wdStory
Counter = 1
While Counter < Letters
DocName = "C:\My Documents" & LTrim$(Str$(Counter))
' MsgBox DocName
ActiveDocument.Sections.First.Range.Cut
Documents.Add
Selection.Paste
ActiveDocument.SaveAs FileName:=DocName, FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True,
WritePassword:="", _
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
ActiveWindow.Close
Counter = Counter + 1
Wend

End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail gma...@mvps.org
Web site www.gmayor.dsl.pipex.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>


"Brett" <bha...@thesiggroup.com> wrote in message
news:047401c2aaa9$aa1ae740$cef82ecf@TK2MSFTNGXA08...

0 new messages