F
Frank B
To avoid the security dialog, tried "ClickYes" works
great. But wanted to try Redemption, and the following
does not include the ATTACHMENT in the Email. Same sort
of idea works fine with the Object Model. Any ideas why
no Attachment??? Thanks, Frank
Sub SafeSendEmail()
Dim MyApp As Object, MyNameSpace As NameSpace
Dim SafeItem, oItem, MyAttach
Set MyApp = CreateObject("Outlook.Application")
Set MyNameSpace = MyApp.GetNamespace("MAPI")
On Error GoTo SafeSendEmailERR
MyNameSpace.Logon
'
Set SafeItem = CreateObject("Redemption.SafeMailItem")
Set oItem = MyApp.CreateItem(0) ' Create a new message
SafeItem.Item = oItem ' Set Item property
type
'
Set MyAttach = SafeItem.Attachments
MyAttach.Add "C:\Test.txt" ' ??? Not working
SafeItem.Save ' ??? not sure if needed.
'
SafeItem.Recipients.Add "(e-mail address removed)"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Body = "This is the SAFE.Body."
SafeItem.Display
'Stop
SafeSendEmailEXIT:
Set MyAttach = Nothing
Set oItem = Nothing
Set SafeItem = Nothing
Set MyNameSpace = Nothing
Set MyApp = Nothing
Exit Sub
SafeSendEmailERR:
MsgBox "Outlook: " & Err.Description & Err
Stop
Resume Next
End Sub
great. But wanted to try Redemption, and the following
does not include the ATTACHMENT in the Email. Same sort
of idea works fine with the Object Model. Any ideas why
no Attachment??? Thanks, Frank
Sub SafeSendEmail()
Dim MyApp As Object, MyNameSpace As NameSpace
Dim SafeItem, oItem, MyAttach
Set MyApp = CreateObject("Outlook.Application")
Set MyNameSpace = MyApp.GetNamespace("MAPI")
On Error GoTo SafeSendEmailERR
MyNameSpace.Logon
'
Set SafeItem = CreateObject("Redemption.SafeMailItem")
Set oItem = MyApp.CreateItem(0) ' Create a new message
SafeItem.Item = oItem ' Set Item property
type
'
Set MyAttach = SafeItem.Attachments
MyAttach.Add "C:\Test.txt" ' ??? Not working
SafeItem.Save ' ??? not sure if needed.
'
SafeItem.Recipients.Add "(e-mail address removed)"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Body = "This is the SAFE.Body."
SafeItem.Display
'Stop
SafeSendEmailEXIT:
Set MyAttach = Nothing
Set oItem = Nothing
Set SafeItem = Nothing
Set MyNameSpace = Nothing
Set MyApp = Nothing
Exit Sub
SafeSendEmailERR:
MsgBox "Outlook: " & Err.Description & Err
Stop
Resume Next
End Sub