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

    WdBreakType (VBA/Word/2000)

    I am attempting to determine whether a given break is a section or page break. Since they both yield the same ASCII code, I'm bewildered.
    As usual; Help!

    TIA
    Regards
    Don

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

    Re: WdBreakType (VBA/Word/2000)

    You could inspect the page number and section number before and after the break. You can use Information to retrieve them:

    Selection.Information(wdActiveEndPageNumber)

    Selection.Information(wdActiveEndSectionNumber)

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

    Re: WdBreakType (VBA/Word/2000)

    Oh Hans
    I feel like such an idiot. I was trying to use the break-type to determine whether there was a page change immediately following the first selected character. Of course Selection.Information(wdActiveEndSectionNumber) will do the trick nicely.
    I should have thought of that. Thanks, and apologies for wasting your time.
    Regards
    Don

  4. #4
    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: WdBreakType (VBA/Word/2000)

    Just as a footnote, I can't tell from the object browser when you would use wdBreakType. If I want to know the type of break, I probably would use section.PageSetup.SectionStart.

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

    Re: WdBreakType (VBA/Word/2000)

    The wdBreakType constants are used when you want to SET a break in code, for example

    Selection.InsertBreak wdSectionBreakNextPage

Posting Permissions

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