Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Minneapolis, MN, Minnesota
    Thanked 0 Times in 0 Posts

    Add Text Values (2003)

    I have a Word document with text form fields.

    I would like to know if it is possible to enter text in a form field (call it UserName) and the document would take the value entered in UserName and combine it with a constant value in another field?

    Example: Doejohn is entered in the form field UserName. The Constant value for UserAssign is 0723. Form would "calculate" the value Doejohn and 0723 and the result of Doejohn0723 would be displayed in the UserAssign Field when exiting the UserName field.
    Easy Access

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Add Text Values (2003)

    1) Create a macro in a standard module in the document:

    Sub SetName()
    ActiveDocument.FormFields("UserAssign").Result = _
    ActiveDocument.FormFields("UserName").Result & "0723"
    End Sub

    2) While the document is unprotected, double click the UserName field and select SetName in the Exit dropdown list, then click OK.

    3) Protect the document again.

Posting Permissions

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