Split a multi-page file

  • Thread starter Thread starter KirstieA
  • Start date Start date
K

KirstieA

Hello All,

Can anyone tell me if there is a way to split a multi-page file up and save
each individual page?

I don't hold out much hope, but never mind....

TIA,

Kirstie
 
There is a way and I am racking my brains trying to remember exactly how.
I'm sure that a fellow MVP said to use MasterDocs to split up a document so
that each page is a separate file. This is about the only time ever to
recommend using MasterDocs because it is a sure fire way of corrupting a
document beyond redemption: so make sure to try it with a copy of the
document!

--
Terry Farrell - Word MVP
http://word.mvps.org/

: Hello All,
:
: Can anyone tell me if there is a way to split a multi-page file up and
save
: each individual page?
:
: I don't hold out much hope, but never mind....
:
: TIA,
:
: Kirstie
:
:
 
I think there's a Splitter macro that Doug Robbins wrote floating around. A
Google Groups search might turn it up.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
The code in question is shown below - change the path in the Docname string
to the path you wish to save the files to.

Sub SplitByPage()

Dim mask As String
Letters = ActiveDocument.Bookmarks("\page").Range
mask = "ddMMyy"

Selection.HomeKey Unit:=wdStory
Counter = 1
While Counter < Letters
Application.ScreenUpdating = False
sName = "Split"
Docname = "D:\My Documents\Test\Merge\" _
& sName & " " & Format(Date, mask) & " " & LTrim$(Str$(Counter))
On Error GoTo oops:
ActiveDocument.Bookmarks("\page").Range.Cut
Documents.Add
With Selection
.Paste
.EndKey Unit:=wdStory
.MoveLeft Unit:=wdCharacter, Count:=1
.Delete Unit:=wdCharacter, Count:=1
End With
ActiveDocument.SaveAs FileName:=Docname, _
FileFormat:=wdFormatDocument
ActiveWindow.Close
Counter = Counter + 1
Application.ScreenUpdating = True
Wend
oops:
End Sub


See http://www.gmayor.com/installing_macro.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top