Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    CrossReferences updating (W97)

    I have a macro that inserts a Software release number (bookmarked entry on the cover) when a toolbar button is activated. BUT, I don't want it to update when the information on the cover is altered. How do I break this link?

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: CrossReferences updating (W97)

    You'll have to provide more information on what you're trying to do. Normally you can test for some condition which if met, allows the branch of the code to insert the number to run. If the condition is not met, a different branch of code (or no code) runs. How you set up that conditional test depends on the details of what you need to do.

    Gary

  3. #3
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: CrossReferences updating (W97)

    OK, let me try to be clear to someone other than myself....

    In my template, the cover gathers document information from the user (Document Name, Version Number... ). These fields are bookmarked.
    Further down in my document, the user needs to label areas with the Version Number. I created a macro that inserts a cross reference, bookmarks' content at the end of the text line.

    Step two, the user re-enters a document to create a new document (now Version 2.0) and updates the cover. When my fields are updated, they will now say 2.0 instead of 1.0.

    Is there a way to "unlink" the field once it is populated?

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

    Re: CrossReferences updating (W97)

    If you just want to insert the version number the first time, but never to update it, you don't need to insert a cross reference; you might just use InsertAfter or TypeText to insert the text of the version number.

    If you still want to use cross references, they can (like any field) be unlinked manually by selecting them and typing Ctrl+Shift+F9. In code, you would use (for example) ActiveDocument.Fields("fieldname").Unlink or somerange.Fields.Unlink

Posting Permissions

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