Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating items in combobox in Outlook!

Status
Not open for further replies.

lywong111

Programmer
Apr 4, 2004
13
US
Hi,
I have a form in a sub folder called "Project Profiles". It has a coding in the form that goes like this:
Function Item_Open()
Dim objNameSpace
Dim objProjectProfileFolder
Dim objAllProfiles
Dim objFormPage
Dim objComboClient
Dim objProjectProfile

Set objNameSpace = Application.GetNameSpace("MAPI")
Set objProjectProfileFolder = objNameSpace.Folders("Invoice Tracking").Folders("Project Profiles")

Set objAllProfiles = objProjectProfileFolder.Items

Set objFormPage = Item.GetInspector.ModifiedFormPages("Project Profile")
Set objComboClient = objFormPage.Controls("cboCompany")

For Each objProjectProfile in objAllProfiles
objComboClient.AddItem objProjectProfile.cboCompany
Next
End Function

When I run the form, it gives:
Object doesnt support this property or method: "objProjectProfile.cboCompany"


What is wrong with the code??

If I wanted populate the items in combo box from another folder (Invoice Tracking\Billing)in this form, How should I go about doing it? Just change to:
Set objProjectProfileFolder = objNameSpace.Folders("Invoice Tracking").Folders("Billing") ????

Pls advice all Experts! Thanks!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top