What dictates how much text is to be included in each document? The
following will save each page as a separate document:
Sub pagesplitter()
'
' splitter Macro
' Macro created 16-08-98 by Doug Robbins to save each page of a document
' as a separate file with the name Page#.DOC
'
Dim Counter As Long, Source As Document, Target As Document
Set Source = ActiveDocument
Selection.HomeKey Unit:=wdStory
Pages = Source.BuiltInDocumentProperties(wdPropertyPages)
Counter = 0
While Counter < Pages
Counter = Counter + 1
DocName = "Page" & Format(Counter)
Source.Bookmarks("\Page").Range.Cut
Set Target = Documents.Add
Target.Range.Paste
Target.SaveAs FileName:=DocName
Target.Close
Wend
End Sub
and the following will save each section as a separate document:
Sub sectionsplitter()
' splitter Macro
' Macro created by Doug Robbins to save each letter created by a mailmerge
as a separate file.
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
Letter.End=Letter.End-1
Set Target = Documents.Add
Target.Range=Letter
Target.SaveAs FileName:="Letter" & i
Target.Close
Next i
End Sub

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
> Hello,
>
[quoted text clipped - 6 lines]
> Thank you in advance!!
> Ellen
EllenM - 07 Jan 2006 17:26 GMT
Thanks for your reply, Doug. The following dictates what gets pasted into
the new documents:
After the 3500th line I do a find for the next blank line. Then I cut the
above text to the new text document. I'll keep cutting 3500 lines plus the
little extra, until the original document is empty.
I'm piecing it together somewhat:
To find the 3500th line:
Selection.GoTo _
What:=wdGoToLine, _
Which:=wdGoToAbsolute, _
Count:=3500
I don't know how to find blank lines, but the word "doctype" always follows
a blank, so I recorded the following:
Selection.Find.ClearFormatting
With Selection.Find
.Text = "doctype"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdStory, Extend:=wdExtend
Selection.Cut
I appreciate any help you can give me.
Thanks!!!
Ellen
> What dictates how much text is to be included in each document? The
> following will save each page as a separate document:
[quoted text clipped - 73 lines]
> > Thank you in advance!!
> > Ellen
Doug Robbins - Word MVP - 08 Jan 2006 08:56 GMT
What constitutes a blank line. When you click on the ¶ button, is it:
this is the end of a line.¶
¶
This is the start of the first line after a blank line

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
> Thanks for your reply, Doug. The following dictates what gets pasted into
> the new documents:
[quoted text clipped - 117 lines]
>> > Thank you in advance!!
>> > Ellen