Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    docVariables (97 SR-2)

    I want to use a docVariable (user-defined) in various documents, which the user will occasionally replace and update with a keyboard macro. The macro works fine with regular text by doing ...Fields.Update. However, if the docvar is in a text frame box, it is not updated! What can I do to update those as well?

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: docVariables (97 SR-2)

    Works fine for me. By text frame box do you mean a document text box converted to a frame with a doc var reference in it?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Star Lounger
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: docVariables (97 SR-2)

    A textframe type shape with a docvar in it. I finally managed to get it to work by saying ...Shapes(i).TextFrame.TextRange.Fields.Update

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: docVariables (97 SR-2)

    I am yet to find a good reason for anyone to ever need a text frame but ...

    The macro will require more than one line if you want to update the fields in the text frames.
    <pre>Dim aStory As Variant
    For Each aStory In ActiveDocument.StoryRanges
    aStory.Fields.Update
    Next aStory</pre>

    Andrew Lockton, Chrysalis Design, Melbourne Australia

Posting Permissions

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