Individual page saving

T

TMao

I have a report in Word that I am working on and would like to save
individual pages so if I need to email just that page I can. I want to keep
the header and footer, page numbers just as they were within the whole
report. How can I do this?
 
D

Doug Robbins

If you create a template that has the header and footer in it, and then add
the path file name to that template in the Documents.Add line in the
following macro, then you run this macro over the report, it should do what
you want. The page numbers won't be retained, but it would be possible to
modify the macro so that the respective page number is inserted into each
document produced.

Sub splitter()

'

' 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

'

Selection.HomeKey Unit:=wdStory

Pages = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)

Counter = 0

While Counter < Pages

Counter = Counter + 1

DocName = "Page" & Format(Counter)

ActiveDocument.Bookmarks("\Page").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

Wend



End Sub

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

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