C
Chaplain Doug
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
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