Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Sep 2003
    Location
    Melbourne, Victoria, Austria
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Section Breaks (MSWord Office 2000)

    <P ID="edit" class=small>(Edited by jscher2000 on 15-Sep-03 15:25. Added and around the link to make it live.)</P>I am using Win2000 OS

    I have set up a template with User forms, depending on answers in the form different Auto Text entries are inserted,. This is all working fine, however I am having trouble with the last page. Throughout the program I am using section breaks, the Final entry (Landscape table ) that is inserted by AutoText has a continuous break at the bottom but when it is inserted by AutoText it changes to "section break next page", and I get my problem a blank page at the end of the document. To test the problem I have opened the document with the landscape table (this is the document the Auto Text entry is based on) selected all and pasted to a blank document and it copies fine, continuos break and all. I also do not get a blank page at the bottom. I have read http://www.mvps.org/word/FAQs/Formatting/W...ithSections.htm, but this did not answer my problem.

    This is the code that I use to insert the problem Auto Text entry.

    Selection.EndKey Unit:=wdStory
    Selection.TypeParagraph
    ThisDocument.AttachedTemplate.AutoTextEntries("Emp loymentKitCheckList").Insert _
    Where:=Selection.Range, RichText:=True

    I hope that someone can help me, it is not the end of the world the last page being blank, but as all the rest is working fine I would like to solve this problem.

    Thank you in advance.

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

    Re: Section Breaks (MSWord Office 2000)

    John,

    Is the section break that is being converted 2 sections below the inital Next Page section break that is being inserted in order to create the Landscape page? My collegues and I discovered a Word bug (since confirmed by MS and fixed in XP) where a Continuous section break is converted to a Next Page section break if it falls 2 sections below a section where the page orientation is changed to landscape. Pictorially:

    Section 1 -- Next Page portrait
    Section 2 -- any type of section break
    Section 3 -- Continuous section break

    Next, change orientation of Section 1 to landscape...does Section 3 change to Next Page?

    We had replicated this through VBA code in a custom app we had developed...I don't recall if it was replicatable through the UI. However, if this is the pattern you are seeing you could modify your code to cache the section type of the affected section, perform the autotext insert, then change back the section type of the affected section, if necessary.

    Also, don't forget that Word stores the last section's properties in the last paragraph of the document...if you are inserting a landscape section before this paragraph mark and the last section's orientation is portrait, Word will insert a Next Page section break to preserve the orientation of the last section.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Section Breaks (MSWord Office 2000)

    Hi Ethan:
    Interesting. I can't duplicate the problem using the user interface.

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

    Re: Section Breaks (MSWord Office 2000)

    My recollection is that we only replicated it via VB code, not through the UI. According to Microsoft, the bug had always been there ("since 1.0"!). The fix was made for XP, although I don't remember if it missed the initial release and was rolled into SP1.

    I can always post a sample module that exploits the bug if you need it.

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Section Breaks (MSWord Office 2000)

    Thanks for the offer. I'm not a VBA expert anyhow, so I wouldn't be able to do anything with it. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  6. #6
    New Lounger
    Join Date
    Sep 2003
    Location
    Indianapolis, Indiana, USA
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Section Breaks (MSWord Office 2000)

    Try defining the Page Setup for the AutoText entry...

    ActiveDocument.ActiveWindow.View.Type = wdPrintView
    With ActiveDocument.PageSetup
    .SectionStart=wdSectionContinuous
    End With

    Remember the the last page has an 'unseen' Section Break (which is probably your blank page & is Continuous), plus the Section Break controls the 'information' preceding it (like the Paragraph mark controls the text preceding it). Sounds like you've captured the previous Section's break (NextPage) at the top of the AutoText entry.

    Hope this helps.

Posting Permissions

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