Announcement

Collapse
No announcement yet.

How to auto fill in form Field?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to auto fill in form Field?

    I'm trying to auto fill out 2 fields after filling out 1. For example. I have 3 sections of a page. On all 3 I have the users name. I have 3 fields UserName, UserName1, & UserName2. I want to have it when I fill in UserName and I leave that field I want it to auto-fill in UserName1, & UserName2.

    I'm not a programmer so I'm not good with scripting. I sure this is simple but any help would be appreciated.

    thanks
    Tekjock

  • #2
    Re: How to auto fill in form Field?

    More Info Is Needed.

    what are you doing this in? Word, excel, php, etc?
    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: How to auto fill in form Field?

      Sorry, im a tool, In word

      Comment


      • #4
        Re: How to auto fill in form Field?

        Can you post your document for us to look at? (remove bulk of text if you want to)

        Which version of Word?

        It will probably need an "on exit" macro for username to populate the other two

        I'll try something when I have time
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          Re: How to auto fill in form Field?

          OK, this works for word 2003:
          create a macro with the following code
          Sub FillUsers()
          ActiveDocument.FormFields("Username1").Result = ActiveDocument.Bookmarks("Username").Range.Text
          ActiveDocument.FormFields("Username2").Result = ActiveDocument.Bookmarks("Username").Range.Text
          End Sub
          Attach it to the "Username" field as the on exit macro

          Works like a charm
          Tom Jones
          MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
          PhD, MSc, FIAP, MIITT
          IT Trainer / Consultant
          Ossian Ltd
          Scotland

          ** Remember to give credit where credit is due and leave reputation points where appropriate **

          Comment

          Working...
          X