Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Location
    Mount Prospect, Illinois
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down

    Here's a quick way to confuse a document:

    1: Insert a table caption
    2: Above the caption, insert a cross-reference to, say, the caption and number, resulting in a nice little "Table 1"
    3: Right before the table caption, insert two section breaks (next-page style)
    4: Position the cursor between the two section breaks, and change the page orientation to landscape
    5: Click on the cross reference, then update the field (F9)

    Result: The section breaks are "dragged" into the cross reference, because inserting text just before a bookmark expands that bookmark, and the caption had acquired a hidden bookmark when the cross-ref was inserted. Really, any cross-ref will do, I don't think it needs to be a hidden bookmark.

    It's worse than you think ("It usually is," says Mal): Go to the VB Editor and type
    Code:
    ? ActiveDocument.Sections(1).PageSetup.Orientation
    It will return the wdUndefined value (999999) -- as will a number of other page setup parameters. That's just sick. Especially if you have a routine to remove that landscape section which looks aet the previous section's page setup, and tries to set the following one the same settings, as Word won't let you set things to Undefined.

    Because these bookmarks are normally hidden, Word really ought not to expand them.
    I'm going to have to write a cleanup routine around my "Insert Landscape Section" routine to ensure that I don't mung bookmarks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Thanks for the warning, it's good to keep this in mind.

    The problem occurs for ordinary bookmarks too, but it's particularly annoying for hidden ones because there's no visible clue that the bookmark has expanded, even if you display bookmarks in the document.

  3. #3
    3 Star Lounger
    Join Date
    Feb 2009
    Posts
    308
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='joelfinkle' post='789569' date='18-Aug-2009 15:53']Here's a quick way to confuse a document:

    1: Insert a table caption
    2: Above the caption, insert a cross-reference to, say, the caption and number, resulting in a nice little "Table 1"
    3: Right before the table caption, insert two section breaks (next-page style)
    4: Position the cursor between the two section breaks, and change the page orientation to landscape
    5: Click on the cross reference, then update the field (F9)

    Result: The section breaks are "dragged" into the cross reference, because inserting text just before a bookmark expands that bookmark, and the caption had acquired a hidden bookmark when the cross-ref was inserted. Really, any cross-ref will do, I don't think it needs to be a hidden bookmark.

    It's worse than you think ("It usually is," says Mal): Go to the VB Editor and type
    Code:
    ? ActiveDocument.Sections(1).PageSetup.Orientation
    It will return the wdUndefined value (999999) -- as will a number of other page setup parameters. That's just sick. Especially if you have a routine to remove that landscape section which looks aet the previous section's page setup, and tries to set the following one the same settings, as Word won't let you set things to Undefined.

    Because these bookmarks are normally hidden, Word really ought not to expand them.
    I'm going to have to write a cleanup routine around my "Insert Landscape Section" routine to ensure that I don't mung bookmarks.[/quote]

    Nice Serenity reference, there!

Posting Permissions

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