Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS-Word/Excel Auto-population Help 1

Status
Not open for further replies.

silcox1984

Technical User
Mar 12, 2008
18
US
Here is my situation. I am not very computer savvy, so who ever decides to help me tackle this issue..i am forever grateful:

I have a document created on MS Word. The intention is to have this document locked . However, I want to be able to have someone else be able to choose a few select options and have portions of this document auto-populate.

For Example. Lets say that in this document I am giving two options:
Example A) The boy will wear blue if it is sunny outside.
B) The boy will wear Green if it is Raining Outside

I want to create an option for the user to say either Blue or Green and drop down the appropriate sentence. So if the user chooses green, then the sentence "the boy will wear green if it is raining outside" will populate into the document.

How can i accomplish this using just programs from MS Word?


Please Help!!!!!
 
Hi silcox1984,

You can create a form that has editable and non-editable sections in Word by using the Forms toolbar. To use the form fields, you must first have the Forms toolbar visible. To make the Forms toolbar visible, click View|Toolbars|Forms.

To insert a form field, click to position the insertion point where you want the field to appear, and then click the field on the Forms toolbar. After the field has been inserted, you can change the field's properties by double-clicking the field.

The Drop-Down Form Field field lets you create a list of items for the user to choose from. This control has the following properties:
• Drop-down item: This is used to add items for use in the drop-down list. Items that have been added to the list are also shown.
• Bookmark: This property is automatically filled in with the text "Dropdown#", where # is the number 1, 2, 3 and so on. You can use another name if you prefer.
• Calculate on exit: This property is used together with the Calculation property.
• Fill-in enabled: This property lets users type into the field when it is selected.
• Run macro on: This lets you specify a macro to run when entering or leaving the field.

For your purposes, you need to add a Dropdown field and add the Green and Blue options. To add list items to the Drop-Down Form Field field, follow these steps:
1. Double-click the Drop-Down Form Field control.
2. Type the item text in the Drop-down item box.
3. Click Add.
4. If you want to change the position of the item in the drop-down list, click to select the item.
5. Click the Up, Down, or Move arrows to change the position of the item.
6. To remove an item, click to select the item in the drop-down list, and then click Remove.

Next, you need to add another, complex field to your document to test the contents of the Dropdown field. The coding looks like:
{IF{REF Dropdown1}= "Blue" "The boy will wear blue if it is sunny outside." {IF{REF Dropdown1}= "Green" "The boy will wear Green if it is Raining Outside" "The boy will stay inside"}}
Note: the field braces (ie '{}') show above are created in pairs via Ctrl-F9 - you can't simply type them.

Before you can use the form, you must protect it by clicking Protect Form on the Forms toolbar. If you click Protect Form, users can fill in the form without changing the form's layout and standard elements. When you want to go back to writing or modifying the form, click Protect Form again to unprotect the form.

If you want to keep people from accidentally unprotecting the form and changing the display content, you can apply a password.

Cheers

[MS MVP - Word]
 
Thank you for your help with this!

After attempting this I do not seem to be successful.

I enter CTRL F9 and am successful creating the brackets. However, after i input the data and lock the document my bracketed data goes away and my drop downs to not populate the data i need. I attempted to press F9 after entering the bracketed data to see if that would lock my data...but has not.


I really appreciate your continued help with this

~Rachel
 
Hi Rachel,

With your Dropdown field, you need to make sure you've set its properties to 'calculate on exit'. Also, after making you colour selection, you'll need to press the Tab key.

Cheers

[MS MVP - Word]
 
You're welcom.
PS: see what happens if you add another choice to your dropdown field.

[MS MVP - Word]
 
Follow up to this whole auto-populating issue:
Let me give you a scenario:

I want to create a separate page in my document for Auto-population options. I have the drop down option down perfectly.

But lets say i want to create blank lines for the person to create. These are NOT things that can have options associated with them

Name: ______ (Rachel)
Email Address:_____ (Rachel@email.com)


And I want those items to populate in my document "mad-lib" style. For Example: if i create the Line for "Name" and I fill in the blank for "Name" in my separate options page, my name will auto-fill within the document each place i tell it to.

Please tell me this is possible?!!

THANK YOU!!!!!


 
Hi silcox1984,

You can use an ordinary text formfield to capture the input. Give it a bookmark name (or use the standard one) and set the properties to 'calculate on exit'. Then simply insert a cross-reference to it wherever you want the input replicated.

Cheers

[MS MVP - Word]
 
Thank you, Macropod. I apologize for the double forum question. I wasn't sure if continuing a thread my new question would be easily seen. is there a way to delete my second thread?


What do you mean by cross reference? Do you mean the Ctrl F9 function?

Can i cross reference a blank line?

For Example:

If i have a separate page for options:

Employee Name:(Form Field)
Mananager Name: (Form Field)

And then the document below is where i want my options to populate:

Dear (Employee name) Thank you for responding to my query .

Sincerely,
(Manager Name)


As always, I greatly appreciate your continued help. I am such a novice with this stuff.

 
I figured it out. Thank you very much for all of your help.
 
Hi. Its me again! still working on the same thing after all this time.
Now I am hoping to try this:

Is it possible that choosing one choice would enable another field of drop downs:

For example: I would like to have several options to chose from; blue, green, purple
And by choosing blue another set of drop downs will populuate: Pants, Shoes, Socks

Is this possible??

Thank you, as always!
 
Also, Is there a way to incorporate Check Boxes into these formulas?

like if CheckBox 1 is checked then a block of text will appear

THANKS!
 
Hi silcox,

Unfortunately, you can't do either of these things via field coding. It can be done with macros (vba) though - a web search (perhaps even in the Tek Tips Office & VBA forums) will turn up plenty of examples.

Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top