Using CDO with Outlook

S

systemx

Hi all,

I'm hoping someone can help me out with this. I have been trying to get
the 'Reply Time' for email messages from outlook into excel.
Unfortunately, MS does not support this (only for appointments).

The script below was put together by a friend for me - to test the
function out - but the CDOPR_Message_Class for reply time does not seem
to work. All others tested worked perfectly.

Just wandering if anyone has managed to do this before...and if so what
they used as the class?

Thanks

Rob

Sub ReadInboxData()

Dim objSession As MAPI.Session
Dim objFolder As MAPI.folder
Dim objMessages As MAPI.messages
Dim objMessage As MAPI.Message
Dim objFields As MAPI.Fields
Dim objfield As MAPI.field

Dim i As Integer

Set objSession = New MAPI.Session
objSession.Logon \"\", \"\", ShowDialog:=False, NewSession:=False

Set objFolder = objSession.GetDefaultFolder(CdoDefaultFolderInbox)


Set objMessages = objFolder.messages
Set objMessage = objMessages.GetFirst
For i = 1 To objMessages.Count

Set objMessage = objMessages.GetNext
Set objFields = objMessage.Fields
Set objfield = objFields.Item(CdoPR_MESSAGE_CLASS)
MsgBox objfield

Next i

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top