Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    U.S. - East Coast
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Toggle Orientation Converts n+2 Continuous Section (Word 97 SR-2)

    I am experiencing a strange problem concerning page orientation and Continuous ("C") section breaks. I have a VBA procedure that inserts a Next Page ("NP") section and toggles the new section's orientation to landscape. It appears that if there is a C section 2 sections below the NP section, when the NP section's orientation is toggled to landscape the "n+2" C section break is changed to NP.

    I've tried to replicate this through Word's UI ("Insert|Break"...etc.) and haven't been able to, so it seems to be due to either a coding error or a bug in VBA. It seems to occur whether the VBA code references a section's range or the Selection object.

    I've attached a sample doc with 2 section breaks (C followed by NP). There is a VBA procedure ("InsertLandscapeSection") that inserts 3 sections -- C, NP, and C -- before the insertion point and toggles the orientation of the inserted NP section. I've modified the procedure to make use of the Selection object to facilitate debugging. If you move the insertion point to the beginning of the first section break and step through the procedure you will see that the original C section gets converted to NP. I've checked the index of the toggled section referenced in the VBA code and it is correct.

    I greatly appreciate any assistance.

    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>

  2. #2
    Star Lounger
    Join Date
    Jan 2001
    Location
    U.S. - East Coast
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Toggle Orientation Converts n+2 Continuous Section (Word 97 SR-2)

    Sorry, lost the attachement -- here it is.
    Attached Files Attached Files

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Toggle Orientation Converts n+2 Continuous Section (Word 97 SR-2)

    This is a bit difficult to talk about, so here's a picture. Bold indicates the section you are setting to landscape, and becomes indicates what happens after applying that setting.
    <table border=1><td>Start with</td><td>Insert Breaks Manually</td><td>Insert Breaks Using VBA</td><tr><td>

  4. #4
    Star Lounger
    Join Date
    Jan 2001
    Location
    U.S. - East Coast
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Toggle Orientation Converts n+2 Continuous Section (Word 97 SR-2)

    jscher2000:

    Thank you for the quick response and time invested. Unfortunately, I share your conclusion about it being a Word bug. I'll submit it to Microsoft and post their response.

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Location
    U.S. - East Coast
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Toggle Orientation Converts n+2 Continuous Section (Word 97 SR-2)

    It's Official. Got the "Word" yesterday from Microsoft that the bug is replicateable through XP. One workaround that we use is to check for the presence of a Continuous section break 2 sections down ("n+2") when toggling page orientation for a Next Page section and reset the SectionStart after the toggle.

Posting Permissions

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