A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Refering to Fields in a Contact



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old January 13th 06, 04:25 AM posted to microsoft.public.outlook.program_vba
Chaplain Doug
external usenet poster
 
Posts: 38
Default Refering to Fields in a Contact

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

--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
changing info in contact fields fowlriverjoe Outlook - Using Contacts 1 February 20th 06 10:29 PM
Some fields cannot be edited on "All Fields" tab on Contact forms BR Outlook - Using Contacts 1 February 19th 06 07:54 PM
Dozens of custom contact fields, import into Outlook? Possible? [email protected] Outlook - Using Contacts 2 February 13th 06 05:02 PM
Import Contact Data for certain fields only - update not replace entire contact Pennycook Outlook - Using Contacts 4 January 19th 06 06:07 AM
How do I control printing of the fields in an Outlook Contact? Sue Mosher [MVP-Outlook] Outlook - Using Contacts 0 January 18th 06 05:06 PM


All times are GMT +1. The time now is 05:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.