Telephone fields in Outlook 2007

  • Thread starter Thread starter Marvin Buzz
  • Start date Start date
M

Marvin Buzz

I run Outlook 2007 on my local PC, no exchange server is involved. Using VB,
I want to look at all of the phone and fax fields of each contact. I can
find no doc re the field names that I can use in my VB program. Any help
would be appreciated.

Thanks.
 
Object Browser in VBA is your friend (Alt + F11).
Off the top of my head, the following will be usefuil: BusinessFaxNumber,
BusinessTelephoneNumber, CallbackTelephoneNumber, CarTelephoneNumber,
CompanyMainTelephoneNumber, Home2TelephoneNumber, HomeTelephoneNumber,
MobileTelephoneNumber, OtherFaxNumber, OtherTelephoneNumber,
RadioTelephoneNumber./

You can also look at a contact with OutlookSpy (url below, select a contact
and click the Item button)

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
Thank you. I have found those fields and they contain what I need. If my
contact item is named cont then I would reference an item as
cont.HomeTelephoneNumber for example. If I have a variable that has a value
of "HomeTelephoneNumber" how would I reference the field? cont.variablename
does not work.
 
You have to specify the object property name, you can't use a variable for
that. You'd have to set up a set of if blocks or a case block and test the
value of your variable and then access the property by name depending on the
value of your variable.
 
Back
Top