Is it possible using VBA to create a separate Word file based on each page in
a larger Word document?

The larger document has many pages with headers and footers. Is it possible
to use the "Print to file" option? If so, how? If not, how can this be done
in VBA?

Thanks in advance.

Re: Save each Word page as a separate document by Charles

Charles
Mon Jan 31 16:30:36 CST 2005

The following page may give you a start.
http://www.gmayor.com/individual_merge_letters.htm

Because you have different headers/footers, it will be more complicated.
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"quartz" <quartz@discussions.microsoft.com> wrote in message
news:0721599A-AE15-44BA-AE4C-EA593902BE9A@microsoft.com...
> Is it possible using VBA to create a separate Word file based on each page
> in
> a larger Word document?
>
> The larger document has many pages with headers and footers. Is it
> possible
> to use the "Print to file" option? If so, how? If not, how can this be
> done
> in VBA?
>
> Thanks in advance.



Re: Save each Word page as a separate document by Doug

Doug
Tue Feb 01 18:06:21 CST 2005

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
"quartz" <quartz@discussions.microsoft.com> wrote in message
news:0721599A-AE15-44BA-AE4C-EA593902BE9A@microsoft.com...
> Is it possible using VBA to create a separate Word file based on each page
> in
> a larger Word document?
>
> The larger document has many pages with headers and footers. Is it
> possible
> to use the "Print to file" option? If so, how? If not, how can this be
> done
> in VBA?
>
> Thanks in advance.