Solved

How can I use a combo box to populate text field in Word 2007?

Posted on 2008-09-29
4
538 Views
Last Modified: 2011-10-19
Hi all,

I'm busy creating a Word 2007 template for a technical procedure for my company.
On the first page, I've inserted a combo box with the four confidentiality values in use for our procedures (Highly confidential, Confidential, Internal and Public).

I'd like the value chosen in this combo box to be repeated in the header of the following section. But I do not find a way to link a field to the combo box on the first page and auto update when a value is chosen in that combo box.

Is this possible?

Tx in advance
0
Comment
Question by:CCBelux
  • 3
4 Comments
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 22596830
I guess you run code to add a DocVariable with the result of the combobox.  Something like:

    ActiveDocument.Variables.Add Name:=("Priority"), Value:=ComboBox1.Text

Then just Insert > Field > DocVariable > Priority in your header.

0
 

Author Comment

by:CCBelux
ID: 22657019
Hi JOrzech,

Thanks or your comment.

I'm not sure were to add this line of code. Do I have to go to the VB editor and past it there as a macro or is it something else?

Secondly, I cannot find the name of the drop-down list I've inserted on the header page. Via the Developer tab there's a button "Properties". When clicking there I reach a screen where I see a name and label (which is "confidentiality" for both). does this mean the code have to look like below?

thank in advance for your answer

CCBelux
ActiveDocument.Variables.Add Name:=("Priority"), Value:=Confidentiality

Open in new window

dropdown-options.png
0
 

Author Comment

by:CCBelux
ID: 22711453
anyone? AngelIII any idead;-)
0
 

Accepted Solution

by:
CCBelux earned 0 total points
ID: 22832505
Found an add-on developped by Greg Maxey that does exactly what I needed. http://gregmaxey.mvps.org/Mapped_Content_Control.htm The add-on creates a content control that you can copy/paste as many times as you want. When the value is modified in of he the copies, all the other are updated respectively.

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question