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

    Doc Vars in Header

    I recall but cannot remember for sure if there is a problem with document variable field references in Word 97 headers/footers. Does anyone know for sure?
    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>

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Doc Vars in Header

    Yes, and I believe it continues into XP, although I could be wrong on that. A DOCVAR field in a header or footer will crash Word. You might take a look at using custom document properties instead (although those are visible to the curious user).
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Doc Vars in Header

    Kevin,

    For alternatives, you might want to look at <A target="_blank" HREF=http://msdn.microsoft.com/library/default.asp?URL=/library/techart/wdstoreval.htm> Storing Values When a Macro Ends</A> - a Microsoft developer article.
    Charles Kyle Kenyon
    Madison, Wisconsin

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

    Re: Doc Vars in Header

    Charles,

    You're a great resource. Thanks for confirming the docvars in headers situation. I kept forcing the issue and Word kept crashing, so I thought I'd better check with somebody. Bookmarks and custom doc properties are ok, right?
    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>

  5. #5
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Doc Vars in Header

    References to bookmarks and doc properties are fine.

    Bookmarks themselves won't work because a bookmark marks a unique place in the document text stream and headers and footers aren't in that text stream.
    Charles Kyle Kenyon
    Madison, Wisconsin

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

    Re: Doc Vars in Header

    Thanks, Charles. Sounds like I'm going to use the custom doc properties.
    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>

Posting Permissions

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