Help on getting email .body using redemption

  • Thread starter Thread starter Ian Baker
  • Start date Start date
I

Ian Baker

Hi
I am using Redemption and still get the security prompt when trying to get
the body of an email message. The following code works to get the subject
but not the body:
Sub GetKinderEmails()
Dim SafeItem, oItem, SelEmail

Set SafeItem = CreateObject("Redemption.SafeMailItem")
Set oItem = Outlook.Session.GetDefaultFolder(olFolderInbox).Items
Set SelEmail = oItem.Find("[Subject]=""Kindergarten Record""")

While TypeName(SelEmail) <> "Nothing"
Debug.Print SelEmail.Subject 'Works
Debug.Print SelEmail.Body 'Starts Security Dialogue
Debug.Print "-----------------------------"
Set SelEmail = oItem.FindNext
Wend

End Sub

Any help is appreciated
--
Regards
Ian
If a=ian, b=jackaroo, c=net and d=au then
the answer is (e-mail address removed)
-
 
You're not using your SafeItem at all. Try:

SafeItem.Item = SelEmail
MsgBox SafeItem.Body
 
Thanks Sue - I'm not fully familiar with Redemption yet but what a good
product

--
Regards
Ian Baker
(If a=ian, b=jackaroo, c=net, d=au then me= (e-mail address removed))
-
Sue Mosher said:
You're not using your SafeItem at all. Try:

SafeItem.Item = SelEmail
MsgBox SafeItem.Body

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Ian Baker said:
Hi
I am using Redemption and still get the security prompt when trying to get
the body of an email message. The following code works to get the subject
but not the body:
Sub GetKinderEmails()
Dim SafeItem, oItem, SelEmail

Set SafeItem = CreateObject("Redemption.SafeMailItem")
Set oItem = Outlook.Session.GetDefaultFolder(olFolderInbox).Items
Set SelEmail = oItem.Find("[Subject]=""Kindergarten Record""")

While TypeName(SelEmail) <> "Nothing"
Debug.Print SelEmail.Subject 'Works
Debug.Print SelEmail.Body 'Starts Security Dialogue
Debug.Print "-----------------------------"
Set SelEmail = oItem.FindNext
Wend

End Sub

Any help is appreciated
--
Regards
Ian
If a=ian, b=jackaroo, c=net and d=au then
the answer is (e-mail address removed)
-
 
Back
Top