Results 1 to 8 of 8
  1. #1
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Pagination (VBA/Word/97, 2000, 2003)

    I am merging a fair number of text files into a new document and am inserting two section breaks per merged text file.

    Although I have set <font color=blue>Options.Pagination = False</font color=blue>, when the code configures the numerous headers, the document apparently repaginates with each Header activity. On my old clunker of a laptop, this is unacceptably extending the processing time.

    Any advice on disabling the pagination will be greatly appreciated.

    TIA
    Regards
    Don

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pagination (VBA/Word/97, 2000, 2003)

    If you are working in Page Layout view, try switching to Normal view before running the code (or at the beginning of the code: ActiveWindow.View = wdNormalView)
    It may also help to turn off screen updating during the macro: Application.ScreenUpdating = False. Don't forget to set it to True again at the end.

  3. #3
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Pagination (VBA/Word/97, 2000, 2003)

    Thanks for the response Hans. I implemented both of your suggestions without significant improvement. Are you aware of any method which will allow modification to the headers and footers while in Normal view?
    Regards
    Don

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Pagination (VBA/Word/97, 2000, 2003)

    Hi Don,

    You may find things work better if you add the headers and footers after the merge has run. Since all sections will have the same set of headers and footers, the code to do that should be a snack.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Pagination (VBA/Word/97, 2000, 2003)

    Hi Macropod

    Thanks for the thought.

    I am currently adding the headers and footers after the merge, and have come to the conclusion that, therein lies the problem. It appears to me that since

    <UL><LI>I cannot control pagination in the Page Layout view; and
    <LI>I must be in Page Layout view to manipulate the headers and footers;[/list] The process will be fastest if I add the Section Breaks, Headers and Footers before merging, then switch to Normal view for the merge process. With this approach, when paginating (which seems to occur with every change to any header or footer), the page count will be in the order of tens, where after the merge it will exceed 1000.

    I will advise you of the outcome after I reconfigure the code and test it.
    Regards
    Don

  6. #6
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Pagination (VBA/Word/97, 2000, 2003)

    Hello again Macropod

    It looks as if this approach is worth remembering. The processing time on my old clunker reduced significantly. The details follow:

    <font color=blue> Original Approach </font color=blue>
    12/18/2005 7:40:42 AM Merge: 123 seconds
    Midpoint 12/18/2005 7:42:45 AM
    12/18/2005 7:45:23 AM Headers & Footers <font color=blue>158 </font color=blue> seconds

    <font color=blue> Revised Approach </font color=blue>
    12/18/2005 8:51:17 AM Headers & Footers <font color=blue>4</font color=blue> seconds
    Midpoint 12/18/2005 8:51:21 AM
    12/18/2005 8:53:22 AM Merge 121 seconds
    Regards
    Don

  7. #7
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Pagination (VBA/Word/97, 2000, 2003)

    Although little used and potentially of no use to your problem, it is possible to edit headers and footers on screen without being in Page Layout view. You will need a macro to get there easily.
    <pre>'============================================ ===============
    Sub ViewNormHeader()
    ' Macro created 27/11/98 by Andrew Lockton
    ActiveWindow.View.SplitSpecial = wdPaneCurrentPageHeader
    Windows.Arrange ArrangeStyle:=wdTiled
    End Sub
    '================================================= ==========
    Sub ViewNormFooter()
    ' Macro created 27/11/98 by Andrew Lockton
    ActiveWindow.View.SplitSpecial = wdPaneCurrentPageFooter
    Windows.Arrange ArrangeStyle:=wdTiled
    End Sub</pre>

    Andrew Lockton, Chrysalis Design, Melbourne Australia

  8. #8
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Pagination (VBA/Word/97, 2000, 2003)

    Thank you Andrew
    That's a little gem worth hanging onto.
    Regards
    Don

Posting Permissions

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