Solved

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

Posted on 2008-09-29
4
540 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Suggested Courses

751 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