Solved

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

Posted on 2008-09-29
4
539 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
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…

761 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