Solved

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

Posted on 2008-09-29
4
535 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now