Populating a combo box?

L

Linn Kubler

Hi,

I'm trying to build a custom form based on the standard appointment form in
OL. I want to add a combo box to my form but I can't figure out how to
populate the list. I know I can use the AddItem method but I don't know
where to put the code. Is there an Init() method or Load() method like in
VFP? I only have 4 items to list in this combo box is it possible to simply
enter them directly? I can't seem to identify the proper property for this.

Thanks in advance,
Linn
 
S

Sue Mosher [MVP-Outlook]

Open the form in design mode, click View Code on the toolbar, then choose Script | Event Handler. The event that fires when the item opens in its own window is ... the Open event.

If you want to enter the list directly, right-click the control, choose Properties, go to the Value tab, and enter the delimited list under Possible Values.

See http://www.outlookcode.com/d/propsyntax.htm#unbound for essential information on Outlook form control syntax, which is not the same as VB/VBA userforms. You might also find the information at http://www.outlookcode.com/d/formcontrols.htm#listcombo useful.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
L

Linn Kubler

Thanks Sue,

I was originally trying to avoid assigning this control to a field but I
changed my mind which allowed me to set the Possible Values. I also found
an example of the Item_Open() subroutine.

Linn

Open the form in design mode, click View Code on the toolbar, then choose
Script | Event Handler. The event that fires when the item opens in its own
window is ... the Open event.

If you want to enter the list directly, right-click the control, choose
Properties, go to the Value tab, and enter the delimited list under Possible
Values.

See http://www.outlookcode.com/d/propsyntax.htm#unbound for essential
information on Outlook form control syntax, which is not the same as VB/VBA
userforms. You might also find the information at
http://www.outlookcode.com/d/formcontrols.htm#listcombo useful.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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