K
kd
Hi,
I need to send emails automatically using Voltage SecureMail as my
attachments contains confidential info., so that the email goes Email
encryption. I have created a macro to send emails automatically but need help
to send them using 'Send secure' button. Therefore I need to include a code
in the following macro.
Any help greatly appreciated
Regards,
KD
Sub Send_Email_Attachment()
ESUBJECT = "ABC"
Ebody = "Hi," & (Chr(13)) & (Chr(13)) & " Thanks for any help." & (Chr(13))
& (Chr(13)) & "Regards" & (Chr(13)) & "KD" & (Chr(13)) & (Chr(13))
con = 4
Step100:
NewFileName = Range("b" & con).Value
sendTo = Range("c" & con).Value
If NewFileName = "" Then
GoTo Step1000
Else
Set obOutApp = CreateObject("Outlook.Application")
obOutApp.Session.Logon
Set obOutMail = obOutApp.CreateItem(0)
'Create email with attachments
With obOutMail
.To = sendTo
.CC = ""
.BCC = ""
.Subject = ESUBJECT
.Attachments.Add (NewFileName)
.Body = Ebody
' .Display
.send
End With
con = con + 1
GoTo Step100
End If
Step1000:
End Sub
I need to send emails automatically using Voltage SecureMail as my
attachments contains confidential info., so that the email goes Email
encryption. I have created a macro to send emails automatically but need help
to send them using 'Send secure' button. Therefore I need to include a code
in the following macro.
Any help greatly appreciated
Regards,
KD
Sub Send_Email_Attachment()
ESUBJECT = "ABC"
Ebody = "Hi," & (Chr(13)) & (Chr(13)) & " Thanks for any help." & (Chr(13))
& (Chr(13)) & "Regards" & (Chr(13)) & "KD" & (Chr(13)) & (Chr(13))
con = 4
Step100:
NewFileName = Range("b" & con).Value
sendTo = Range("c" & con).Value
If NewFileName = "" Then
GoTo Step1000
Else
Set obOutApp = CreateObject("Outlook.Application")
obOutApp.Session.Logon
Set obOutMail = obOutApp.CreateItem(0)
'Create email with attachments
With obOutMail
.To = sendTo
.CC = ""
.BCC = ""
.Subject = ESUBJECT
.Attachments.Add (NewFileName)
.Body = Ebody
' .Display
.send
End With
con = con + 1
GoTo Step100
End If
Step1000:
End Sub