Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Apr 2001
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using field codes for revision numbers

    Hello.

    I'm working on a template for use cases. This template includes a revision number on the front cover as well as in the headers and in a revision table. (Each time someone updates the doc, they change the revision number and add information about the types of changes they made.) Up to this point, the user has had to go in to each header/table cell/cover and manually enter the revision number (such as 0.3) or do a find/replace. This isn't very user-friendly. <img src=/S/yikes.gif border=0 alt=yikes width=15 height=15> (understatement)

    We already use the Properties dialog box for most of our repeated information in the template. Is there a way you could use one of the fields in the Properties dialog box and manipulate it for this use?

    Otherwise, I've thought of using field codes and bookmarks, but I just can't seem to get it to work right. Does anyone have any ideas (particularly involving thorough steps since I can't seem to make anything work correctly in this darn template)??? <img src=/S/nuts.gif border=0 alt=nuts width=15 height=15>

    Thanks a bunch! I eagerly await the solution. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Dina

  2. #2
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Levin, Manawatu-Wanganui, New Zealand
    Posts
    324
    Thanks
    9
    Thanked 28 Times in 26 Posts

    Re: Using field codes for revision numbers

    Hi
    Word supports the ability to manipulate doc properties under VBA.
    Two types;
    BuiltinDocumentProperties
    CustomDocumentProperties

    To create a custom document property try something like this
    With activedocument.customDocumentProperties
    .AddName:="yourdefinedpopertyname", _
    linktoContent:=false, _
    Type:= msoPropertyTypeString, _
    Value:=""
    End With

    To populate the custon prperty try something like this
    With ActiveDocument.CustomDocumentProperties
    .item("yourdefinedpopertyname") = aVariableName
    End With

    aVariableName could be populated from a textbox on a form

    BuiltInProperties
    ActiveDocument.BuiltInProperties(wdPropertyAuthor) = aVariableName2

    Hope this helps somehow.
    In the VBA help look for BuiltInProperties

    Cheers
    Geof

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

    Re: Using field codes for revision numbers

    Dina,

    You should be able to use a DocProperty field.
    For example, in Custom document properties you could create a property called "Revision number" and give it a value (let's say 1.0).

    Then back in the document proper you can Insert>Field and look in the Document Information category for the DocProperty field. Click on "DocProperty" under Field names and then click on "Options". This will display a list of existing built-in and custom document properties. Select the "Revision number" property and then click on Add to Field. Then OK, OK to insert the field.

    Hope this helps,
    Gary

  4. #4
    New Lounger
    Join Date
    Apr 2001
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using field codes for revision numbers

    Thank you both for giving me some ideas. I ended up using Gary's suggestion for using a custom property along with the DocProperty field code and it seems to work just fine. I just hope the users are savvy enough to get it (and read/follow instructions). <img src=/S/yep.gif border=0 alt=yep width=15 height=15>

    Dina

  5. #5
    Lozza
    Guest

    Re: Using field codes for revision numbers

    Hello, I have been trying to insert a revision number in my footer and have used an ASK field and then a REF field. When I print the document the "First Page Footer" updates correctly but subsequent pages of the "Footer" are not updating according at print to correspond with the "First Page Footer".

    Have you come across this before?

    Any help would be appreciated.

    Thanks - Lorraine

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Using field codes for revision numbers

    When the first page footer says First Page Footer, and subsequent page footers say Footer, then Word is treating the first page differently from the others. This is an option in the Page Setup dialog. If you want the first page to be different for some reason (e.g., different header), then you need to copy the contents of the First Page Footer into the Footer on another page. If all pages should be the same, uncheck Different First Page in the Page Setup dialog. Does this fix it?

  7. #7
    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: Using field codes for revision numbers

    Put a copy of your first page footer on clipboard if this is the footer you want to be using before you change the option. The second and subsequent header/footer is the header/footer and all others are supplements.

    If you have a REF field in the second and subsequent page footer, that REF field should be updating when the one for page one updates.
    Charles Kyle Kenyon
    Madison, Wisconsin

  8. #8
    Lozza
    Guest

    Re: Using field codes for revision numbers

    That is exactly what I have done. My problem is that when I print my Footer (which contains exactly the same information as First Page Footer) it does not match my First Page Footer ref. field. The Footer pages seem to insert the last ask field entry not the current ask entry. For example when prompted at print I override my last entry of 9 with an entry of 10 and the following happens:

    First Page Footer will show 10
    Footer pages will show 9

    Any suggestions?

  9. #9
    Lozza
    Guest

    Re: Using field codes for revision numbers

    My first page and subsequent footers are performing correctly now. I placed the ask field in the footer instead of the first page footer. Both footers now update correctly at print.

Posting Permissions

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