View Single Post
  #2  
Old January 13th 06, 06:24 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Refering to Fields in a Contact

Am Thu, 12 Jan 2006 20:25:02 -0800 schrieb Chaplain Doug:

Please see the Object Browser (F2), switch from All Libraries to Outlook
and select MailItem in the left pane. In the right one you can now browse
for all properties etc.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



Outlook 2003. I am experimenting trying to access fields in my contacts.

I
have the following code. I can for instance reference the contact field
"FullName" using "itm.FullName" However, how do I access fields like

"Home
Phone"? "itm.[Home Phone]" does not work. Thanks for the help.

Dim olApp As New Outlook.Application
Dim olNS As Outlook.Namespace
Dim ctFolder As Outlook.MAPIFolder
Dim ctFolderItems As Outlook.Items
Dim iterateCtItems As Integer
Dim countCtItems As Integer
Dim IC As Integer
Dim Criteria As String
Dim itm As Object

On Error Resume Next
Set olNS = olApp.GetNamespace("MAPI")
Set ctFolder = olNS.Folders("Public Folders")
Set ctFolder = ctFolder.Folders("All Public Folders")
Set ctFolder = ctFolder.Folders("Good News Contacts")
Set ctFolderItems = ctFolder.Items
countCtItems = ctFolderItems.Count
For Each itm In ctFolderItems
DoEvents
debug.print itm.FullName
Next
End Sub

Ads