Save page to file

H

highspeed

How do you save a specific page in a word document to a file? I got a word
document with X pages and want to save for example page 5 to a rtf file. I
know i can copy paste but isnt it function for this? Or even a macro that you
save every page to one file each?

Thanks in advice!
 
J

JoAnn Paules

Wond doesn't do "pages" as we generally think of them. If you don't
necessarily want to edit those individual pages, you could make them .pdf
files.
 
H

Helmut Weber

Hi Highspeed,

without covering all possible complications,
like that, no way without copying and pasting,
except printing single pages to a pdf-file:

Sub SaveAllPagesSeperately()
Dim lTmp As Long
Dim iCnt As Long
lTmp = ActiveDocument.Range.Information(wdNumberOfPagesInDocument)
For iCnt = 1 To lTmp
Selection.GoTo _
what:=wdGoToPage, _
which:=wdGoToAbsolute, _
Count:=iCnt
Selection.Bookmarks("\page").Select
Selection.Copy
Documents.Add
Selection.Paste
ActiveDocument.SaveAs _
FileName:="page-" & Format(iCnt, "000") & ".rtf", _
FileFormat:=wdFormatRTF
ActiveDocument.Close
Next
End Sub

Sub SaveSinglePageSeperately()
Dim lTmp As Long
lTmp = InputBox("Page?")
Selection.GoTo _
what:=wdGoToPage, _
which:=wdGoToAbsolute, _
Count:=lTmp
Selection.Bookmarks("\page").Select
Selection.Copy
Documents.Add
Selection.Paste
ActiveDocument.SaveAs _
FileName:="page-" & Format(lTmp, "000") & ".rtf", _
FileFormat:=wdFormatRTF
ActiveDocument.Close
End Sub


--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 
H

highspeed

Oki thx for answers anyway :)

Btw you know how to disable autostart for the cd drive? Very annoying when
you open My computer or you want to save a file and that high noisy cd goes
off :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top