Combobox is empty

  • Thread starter Thread starter Koos Koets
  • Start date Start date
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
 
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
 
Sorry, wrong newsgroups. These newsgroups are for Microsoft Access, a
database application.

Try one of the Word newsgroups, possibly Word VBA.
 
Back
Top