View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
systemx[_10_] systemx[_10_] is offline
external usenet poster
 
Posts: 1
Default Using CDO with Outlook


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


--
systemx
------------------------------------------------------------------------
systemx's Profile: http://www.excelforum.com/member.php...o&userid=29254
View this thread: http://www.excelforum.com/showthread...hreadid=527076