For a long time I have used a macro to send an Excel worksheet via mail (downloading and sending ) but when I updated to Windows 10 everything failed and I cannot understand why. This is the code:
Set olApp = New Outlook.Application (error showing here)
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
xHTMLBody = "<BODY style=font-size:10pt;font-family:Calibri>Hi,<br><br> Kindly find the attached weekly PL <b>" & "</b><br>"
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Weekly PL"
.HTMLBody = xHTMLBody & "<br><br>Regards<br>Vinit</BODY>"
.Attachments.Add (ThisWorkbook.Path & "\" & "WEEKLY PL.PDF")
.Attachments.Add (ThisWorkbook.Path & "\" & "WEEKLY PL.pptm")
' .Attachments.Add
.Display
End With
Set olNs = olApp.GetNamespace("MAPI")
Do you know what can it be?
Set olApp = New Outlook.Application (error showing here)
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
xHTMLBody = "<BODY style=font-size:10pt;font-family:Calibri>Hi,<br><br> Kindly find the attached weekly PL <b>" & "</b><br>"
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Weekly PL"
.HTMLBody = xHTMLBody & "<br><br>Regards<br>Vinit</BODY>"
.Attachments.Add (ThisWorkbook.Path & "\" & "WEEKLY PL.PDF")
.Attachments.Add (ThisWorkbook.Path & "\" & "WEEKLY PL.pptm")
' .Attachments.Add
.Display
End With
Set olNs = olApp.GetNamespace("MAPI")
Do you know what can it be?