I am writing a VBA code through which my code will send the active sheet of Zoho sheet as an attachment
on the specified email address of our workplace's email id domain address.
Is there any different code other than you specified if my email server is other than zoho like in this case it is our domain name at zoho workplace.
Public Sub Worksheet_Change()
Application.EnableEvents = false
On Error Goto ENEV
ThisWorkbook.HasRoutingSlip = True
With ThisWorkbook.RoutingSlip
'.from = "suvarna.mohite@glogic.co.in"
.Recipients = "suvarna.mohite@glogic.co.in" 'Can send mail to multiple recepients
.Subject = "Trial mail from zoho VBA"
.Message = "Hello! Have a Good Day!! Mail content. " & "Sending trial link here:" & ActiveSheet.Name
.AttachWorkbook = True
'.AttachmentFormat = "pdf"
.SheetName = ActiveSheet.Name ' this will send the active sheet.
End With
ThisWorkbook.Route
ENEV:
Application.EnableEvents = true
End Sub
With this code we get the email but no attachment with it.
Kindly give me your feedback.