Article ID: 201100
Article Last Modified on 11/23/2006
Sub Item_Open
' Set the NameSpace object
Set objOLNS = Application.GetNameSpace("MAPI")
' Set the Contacts folder, which is in the MAPI NameSpace
Set objContactFolder = objOLNS.GetDefaultFolder(10)
' Set the collection of all Contact items
Set objAllContacts = objContactFolder.Items
' Set the object referring to the form page the combo box is on
Set objFormTab = Item.GetInspector.ModifiedFormPages("TabName")
' Set the object referring to the combo box
Set objCombo = objFormTab.Controls("ComboBox1")
' Loop through all of the contacts
For Each Contact in objAllContacts
' Add the current contact's full name to the combo box
objCombo.AddItem Contact.FullName
Next
End Sub
146636 OL2000: Questions About Custom Forms and Outlook Solutions
Additional query words: OutSol OutSol2000 higher OL2K list box listbox
Keywords: kbcode kbhowto kbprogramming KB201100