Macro Using voltage securemail

  • Thread starter Thread starter kd
  • Start date Start date
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
 
Is the Send Secure button added by that SecureMail software? If so you have
to ask them if the software can be called by a macro. That button is not an
Outlook button so you can't just call it from the Outlook or Office object
models.
 
Hello, hope this message finds you well.
I know is being a long time since this post was made but, I hope my approach to solve this issue helps someone.

The method I use is sendkeys method.

So what you can do is:

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
SendKeys "%H", True '(This opens the "Message" tab)
SendKeys "Y1", True '(This press the "Send Secure" button)
End With
con = con + 1
GoTo Step100

End If
Step1000:


End Sub

Hope this helps
 
Back
Top