Results 1 to 4 of 4

Thread: UserName Field

  1. #1
    jfmaster
    Guest

    UserName Field

    I have a merge document I would like to distribute to a group of users. I want it to pick up the user's name as registered in Office. I inserted the UserName fiels in a text box and my name appeared. When I sent the document to a co-worker, my name persisted in the text box. What am I doing wrong?

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

    Re: UserName Field

    The user has to update the field. She can do this manually (right click on the field, then click Update Field) but that's a pain. Remember, though, that the UserName field only works if the User Information is filled in.

    Anyway, you might want to consider a little VBA code in the document open event:

    Activedocument.Fields.Update

    Note: this updates the fields in the Main Story (not headers, footers, etc)
    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>

  3. #3
    jfmaster
    Guest

    Re: UserName Field

    Thanks, can you give me a little more help on installing this code?

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserName Field

    1. Open the template that you wish to attach to the document. It's best if you have a special template for all these forms.
    2. Press Alt+F8 (opens macro dialog box)
    3. For a name, use AutoOpen.
    4. Press the button create.
    5. Paste in the command (the Public Sub & End Sub are already there).
    6. Save the template.

    Hope this helps.

Posting Permissions

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