Hi

Am I able to create controls (for example: combox box) at runtime?
if possible, how can I do it ?

Thanks

RE: Create Control at runtime by HelmutWeber

HelmutWeber
Wed Mar 14 09:20:20 CDT 2007

Hi,

like this:

Selection.FormFields.Add _
Range:=Selection.Range, _
Type:=wdFieldFormDropDown
' or
Selection.InlineShapes.AddOLEControl _
ClassType:="Forms.ComboBox.1"

Try the macrorecorder.
and define a range instead of using the selection.


--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000 (german versions)