C
Chaplain Doug
Outlook 2003. I have created a custom contact form and added two
"user-defined" fields called "Employment Date" and "Spouse Birthday." How
may I programmatically reference these fields in a contact? For instance, in
the following code, how would I reference the fields?
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
Debug.Print itm.FullName 'No problem for a standard contact field
Debug.Print itm.????????? 'What do I put for a user-defined
field?
Next
"user-defined" fields called "Employment Date" and "Spouse Birthday." How
may I programmatically reference these fields in a contact? For instance, in
the following code, how would I reference the fields?
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
Debug.Print itm.FullName 'No problem for a standard contact field
Debug.Print itm.????????? 'What do I put for a user-defined
field?
Next