View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How can I use a combo box to populate text field in Word 2007?

For the creation of Word forms, the new content controls in Word 2007, in my
opinion, leave a lot to be desired. Personally I would use the legacy form
fields and create a dropdown box for your entries and use a REF field to
reproduce the content. REF fields in page headers do not update
automatically, but you can use the update macro at
http://www.gmayor.com/installing_macro.htm to force an update run on exit
from the dropdown field.

If you decide to follow this route, Greg has an add-in that makes the use of
legacy form fields much more accessible in Word 2007 -
http://gregmaxey.mvps.org/Classic%20Form%20Controls.htm and has more
information on repeating text - http://gregmaxey.mvps.org/Repeating_Data.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Thomas Mallié wrote:
Hi Greg,

thanks for your answer, but could you detail where I have to put that
code? I don't know how it works with Word 2007.

cheers

"Greg Maxey" wrote:

Perhaps you could put a bookmark in the following section header
e.g., Sect2Class and then use the ComboBox change event:

Private Sub ComboBox1_Change()
Dim oRng As Word.Range
Set oRng = ActiveDocument.Bookmarks("Sect2Class").Range
oRng.Text = Me.ComboBox1.Value
ActiveDocument.Bookmarks.Add "Sect2Class", oRng
End Sub


Thomas Mallié wrote:
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, Restricted 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 in the header 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


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org

McCain/Palin '08 !!!