Outlook redemption saveas generating security warning

  • Thread starter Thread starter dkgb
  • Start date Start date
D

dkgb

I am trying to use Outlook Redemption to save an email message upon arrival
to a msg file. Despite using redemption, it generates a security message.
Am I doing something wrong? See code below.


strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
on Error GoTo exitfunction
Set olMail = olNS.GetItemFromID(strID)
On Error GoTo 0
Set SafeMail = CreateObject("Redemption.SafemailItem")
SafeMail.item = olMail

StrPath = StrPath & "Suppliers\" & ID & "-" & Format(rstlog!ID, "#") & ".msg"
SafeMail.item.SaveAs StrPath, olMSG
 
Change the line
SafeMail.item.SaveAs StrPath, olMSG
to
SafeMail.SaveAs StrPath, olMSG

Why do you reopen the item using GetItemFromID?

Set SafeMail = CreateObject("Redemption.SafemailItem")
SafeMail.item = MyMail
StrPath = StrPath & "Suppliers\" & ID & "-" & Format(rstlog!ID, "#") &
".msg"
SafeMail.SaveAs StrPath, olMSG

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top