Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Save page breaks as separate files (2000 and XP)

    Is there a quick and easy way to save pages of a file as separate files? I have a user who needs to do this and I thought about a macro with a button on their toolbar? Any suggestions?

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save page breaks as separate files (2000 and XP)

    How about copying the page's contents and pasting into a new document? That could probably be done with a macro. This is too obvious, though. I'm sure you've already thought about it.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save page breaks as separate files (2000 and XP)

    Yes - thought of that. I was hoping for maybe something like finding and replacing all page breaks with something that would create separate files... oh well - thanks for replying

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save page breaks as separate files (2000 and XP)

    You'd have to use a macro.

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Save page breaks as separate files (2000 and XP)

    Have you thought about what you actually mean by a "Page".

    A typical word document does not use page breaks between every page, if you have done so then a Macro would be pretty easy. Otherwise the concept of a page is not as simple as you might think, just changing your default printer will cause Word to repaginate the document to match the new printers characteristics - changing the contents of the pages.

    StuartR

  6. #6
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Save page breaks as separate files (2000 and XP)

    Melanie,

    Gary Frieder published a simple macro long ago to select pages:
    Sub SelectPage()
    '
    ' SelectPage Macro
    '
    Selection.Bookmarks("page").Select
    End Sub

    This seems to work in Word 97, at least. It also doesn't seem to matter whether pages are broken with a manual page break (Insert...) or just however Word paginates.

    I think there was a thread about 6 months ago on this very topic (but can't find right now). I suggested to Gary that using his macro could be the start of what you wanted. But I don't think that thread ever took the final step of doing a macro. Basically what you need is a loop that does the following:
    - selects a page using above
    - saves the selection to a file (not hard to invoke the Save As dialog and create unique names with a number as part of the file name)
    - moves the selection 1 char to the right to go beyond the current selection (ie, first char on next page)
    end of loop

    when you loop to the 2nd iteration, the first step above will select the 2nd page, etc.

    The loop is terminated by the 3rd step returning an error when there's no more chars to move to.

    One of the problems with the approach is that footers won't be selected. I did check and footnotes are selected.

    Just found the thread - see this posting .

    Fred

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save page breaks as separate files (2000 and XP)

    Fred - Thanks - I will check it out now.

    Melanie

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save page breaks as separate files (2000 and XP)

    To make sure the margins and header/footers are the same in the pagex.doc and the parent.doc. you should based the new documents on the parent.doc.

    So you need to do something like as you hit each page

    <pre> Documents.add Template:=ActiveDocument.FullName, _
    NewTemplate:=False, DocumentType:=0
    Selection.WholeStory
    Selection.Cut
    Selection.Paste
    </pre>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •