Discussion Locked

Exchange Automation

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I succesfully link and open Exchange 5 folders and got (Outlook) Task data. I want to build a report and my problem is that I can't get all fields (that i can manage through outlook) in the table that I'm using through Access and VB. How can I identify in wich Exchange proprietary object/table (besides Tasks) are the additional fields?

4 replies

by topwop

jorozco I am not sure what exactly it is you are looking to find, however here is a basic way to list messages from the inbox for example. If you want to get something from another folder like from deleted items then simply change the olFolderInboxto olFolderDeleted. make a form with a list box and add this code belowto see what I mean.

Dim objOutlook As New Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objInbox As MAPIFolder
Dim objMail As MailItem

'Get the MAPI reference
Set objNameSpace = objOutlook.GetNamespace("MAPI")

'Pick up the Inbox
Set objInbox = objNameSpace.GetDefaultFolder(olFolderInbox)

'Loop through the items in the Inbox
For Each objMail In objInbox.Items lstFolders.AddItem objMail.Subject
Next objMail

This discussion is closed to new replies.