Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Feb 2003
    Location
    Renfrewshire, Scotland
    Posts
    35
    Thanks
    2
    Thanked 1 Time in 1 Post

    Document Variables (2000 SR1)

    Hi all,
    I have problem in that I'm using version numbers to keep track of a particular document. The problem is I want to see the version number displayed in a footer and ideally a document variable field would do the trick. Unfortunately version numbers (Word 2000) isn't available as a variable!. I've got round it using vba (ActiveDocument.Versions.Count) but of course this is in an autorun macro which for obvious reasons I'd prefer not to use. Does anyone know a method of creating your own document variables or is there an "undocumented" workaround?

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

    Re: Document Variables (2000 SR1)

    You *can* create your own document variables, but unfortunately that involves VBA too: a Document object has a Variables collection. It's easy enough to create a document variable in the Immediate window of the Visual Basic Editor:

    ActiveDocument.Variables("Version") = 6

    and to refer to it in a field in the document:

    { DOCVARIABLE "Version" }

    You can even set it to the number of versions in the Immediate window, but to set the variable to the number of versions automatically involves a macro...

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Document Variables (2000 SR1)

    Hi Doug,

    There is a workaround described at http://www.mvps.org/word/FAQs/Genera...ayVersions.htm, where you are also counselled against using Word's version feature because of its potential to corrupt documents.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. #4
    Lounger
    Join Date
    Feb 2003
    Location
    Renfrewshire, Scotland
    Posts
    35
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Document Variables (2000 SR1) Thanks All!

    Thanks guys,
    These have given me food for thought, however it's a pity there isn't a more robust system for document change control

    Doug

Posting Permissions

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