• Using field codes for revision numbers

    Author
    Topic
    #354695

    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. yikes (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)??? nuts

    Thanks a bunch! I eagerly await the solution. smile

    Dina

    Viewing 2 reply threads
    Author
    Replies
    • #521644

      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

    • #521646

      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

      • #521717

        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). yep

        Dina

    • #524357

      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?

      • #524383

        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.

    Viewing 2 reply threads
    Reply To: Using field codes for revision numbers

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: