Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook, reading values of custom fields

Status
Not open for further replies.

remco5897

Technical User
Oct 27, 2001
48
NL
I have added several custom fields to the Task. Let's call them MyField001 and MyField002.

I want to read these values from code in Access.

The code I have so far:

Function ReadingFolder()
Dim ol As Outlook.Application
Set ol = CreateObject("Outlook.Application")
Dim fd As Outlook.MAPIFolder
Set myFolder = ol.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks)

Dim ns As Outlook.NameSpace
Dim itms As Outlook.Items
Dim itm As Object

'Get to the current session of Outlook
Set ns = ol.GetNamespace("MAPI")

'Retrieve a collection of tasks in Tasks folder
Set itms = ns.GetDefaultFolder(olFolderTasks).Items

Set myItem = ns.GetDefaultFolder(olFolderTasks).Items(1)

End Function


This works fine and returns the subject of the Task but how can I read the values from one of my custom fields e.g. MyField001.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top