Working with MultiValue Listbox - hide the second column?

R

Rafael

All,

I have an Outlook custom form that allows the user to search for the current
contact's email address on a selectable contacts folder
(namespace.PickFolder). The script works well and returns the first email
entry found.

What I want to do is the following:

1. Return all found entries that match the current email address and add
each entry to a list box( I have this done already)
2. Click on one of the entries (email address) and allow the user to open
the corresponding contact item based on the entry ID to make sure it is the
intended contact.

I know how to retrieve the EntryID of the contact found but I don't want to
show that information to the users.

Is it possible to populate a listbox with just the email address and used
the second column to store the EntryID and yet hide this second column from
the user?

Perhaps I'm going about this the wrong way so any ideas will be greatly
appreciated.

Regards,

Rafael
 
S

Sue Mosher [MVP-Outlook]

Set the ColumnWidths property of the box so that the column you want to hide has a width of 0.

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

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

Rafael

Ok, a follow up question Sue, how do I search for a contact by it's EntryID?

This code works for finding email but not for EntryID:

Works for email:
objContact = myItems.Find("[Email1Address]= """ & myEmail & """")

Does NOT work for EntryID:
objContact = myItems.Find("[EntryID]= """ & myEntryID & """")


Thanks,

Rafael

Set the ColumnWidths property of the box so that the column you want to hide
has a width of 0.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
 
S

Sue Mosher [MVP-Outlook]

If you looked at the Help topic on Find, you'd see that EntryID doesn't work with it. Instead, use the Namespace.GetItemFromID method.

--
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