[AccessD] OT - Access Using Outlook Redemption

Andy Lacey andy at minstersystems.co.uk
Mon Nov 21 07:03:33 CST 2005


Hi Paul
Well I'm not convinced you need Redemption just to read emaisl, but assuming
you have other reasons why you need to use it then try:

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookFolder As MAPIFolder
Dim objOutlookNameSpace As Outlook.NameSpace
Dim objSafeMailItem As Object



Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookNameSpace = objOutlook.GetNamespace("MAPI")
Set objOutlookFolder = objOutlookNameSpace.GetDefaultFolder(olFolderInbox)
For Each objOutlookMsg In objOutlookFolder.Items
Set objSafeMailItem = CreateObject("Redemption.SafeMailItem")
objSafeMailItem.Item = objOutlookMsg
With objSafeMailItem
If .UnRead Then
Debug.Print .Subject
Debug.Print .Body
End If
End With
Next

--
Andy Lacey
http://www.minstersystems.co.uk




--------- Original Message --------
From: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
To: "'Access Developers discussion and problem solving'"
<accessd at databaseadvisors.com>
Subject: [AccessD] OT - Access Using Outlook Redemption
Date: 21/11/05 12:08


To all,

Can anyone guide me or has anyone got any sample code for using Outlook
redemption via Access, basically all I want to do is scan an Outlook folder
for Unread emails and grab the subject line and the body message of that
particular email.

Thanks in advance for any help and/or sample code on this..

Paul Hartland

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

________________________________________________
Message sent using UebiMiau 2.7.2




More information about the AccessD mailing list