Help on getting email .body using redemption

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)
-
 
S

Sue Mosher [MVP-Outlook]

You're not using your SafeItem at all. Try:

SafeItem.Item = SelEmail
MsgBox SafeItem.Body
 
I

Ian Baker

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)
-
 

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