Combobox is empty

K

Koos Koets

Hi Experts,

After generating a Word document and adding a Combobox with this code there
raises a problem

Set oWrd = CreateObject("Word.Application")
oWrd.Documents.Add
set Shape= oWrd.activedocument.InlineShapes.AddOLEControl
(ClassType:="Forms.ComboBox.1")
With shape.OLEFormat.Object
.AddItem "Test 1"
.AddItem "Test 2"
End With
oWrd.Activate

The text in the combobox is at this moment visible in the word document of
the activated Word session.

After saving and closing the document , i open the document again. Now the
entries "Test 1"and "Test 2" don't exists anaymore in the combobox. Does
anyone knows whats going on her?

Thanks already

greatings Koos
 
K

Koos Koets

Hi Experts,

After generating a Word document and adding a Combobox with this code
there
raises a problem

Set oWrd = CreateObject("Word.Application")
oWrd.Documents.Add
set Shape= oWrd.activedocument.InlineShapes.AddOLEControl
(ClassType:="Forms.ComboBox.1")
With shape.OLEFormat.Object
.AddItem "Test 1"
.AddItem "Test 2"
End With
oWrd.Activate

The text in the combobox is at this moment visible in the word document of
the activated Word session.

After saving and closing the document , i open the document again. Now the
entries "Test 1"and "Test 2" don't exists anaymore in the combobox. Does
anyone knows whats going on her?

Thanks already

greatings Koos
 
V

Van T. Dinh

Sorry, wrong newsgroups. These newsgroups are for Microsoft Access, a
database application.

Try one of the Word newsgroups, possibly Word VBA.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top