Reply
 
Thread Tools Display Modes
  #1   Report Post  
omolano
 
Posts: n/a
Default How do I set up a combobox on word?

Im trying to create a form using the control box, but I don't know how to
populate the comboBox in word.
  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default How do I set up a combobox on word?

On Wed, 9 Nov 2005 20:33:02 -0800, "omolano"
wrote:

Im trying to create a form using the control box, but I don't know how to
populate the comboBox in word.


You have to write VBA (macro) code in the Document_New and
Document_Open procedures.

The simplest method, if the contents of the list will always be the
same, is to use something like

Private Sub Document_New()
With ComboBox1
.AddItem "one"
.AddItem "two"
' etc.
.ListIndex = 0
End With
End Sub

You'd need the same thing in Document_Open, because the combo box
doesn't store the list in the document file when the document is
closed.

If you need to get values from a database, see the combo box part of
the article at
http://msdn.microsoft.com/library/de...dc_activeX.asp

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
apply a template to existing documents Bubba Gump Shrimp Page Layout 2 July 28th 05 04:46 PM
Does Word have Keyboard Merges like Word Perfect does? Donnas Mailmerge 1 June 28th 05 09:30 PM
Word2000 letterhead merge BAW Mailmerge 3 June 25th 05 01:17 PM
Underscore (_) will not always display in RTF files (Word 2002). David A Edge Microsoft Word Help 6 June 14th 05 10:39 AM
Boiletplates from Word Perfect linda Microsoft Word Help 1 January 28th 05 05:37 PM


All times are GMT +1. The time now is 11:31 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"