Dears, Like many posts, I am also new for VBA
We created an Excel sheet with an Email Macro,,, where user(s) can send an email with file link to the next person for review or whatever... the code below is working perfect in PC Outlook but I am unable set it for MAC Users;
Sub Make_Outlook_Mail_With_File_Link()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
If ActiveWorkbook.Path <> "" Then
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<font size=""3"" face=""Calibri"">" & _
"Below RFQ link for your review and action.<br><br>" & _
"<A HREF=""file://" & ActiveWorkbook.FullName & _
""">Link to the file</A>" & _
"<br><br>Thanks and Kind Regards,</font>"
On Error Resume Next
With OutMail
.to = ""
.CC = ""
.BCC = ""
.Subject = "RFQ #: " & Activesheet.Name & " | " & Activesheet.Range("D8") & " | " & Activesheet.Range("D13")
.HTMLBody = strbody
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Else
MsgBox "The ActiveWorkbook does not have a path, Save the file first."
End If
End Sub
Any timely help will be appreciated.
Thanks
We created an Excel sheet with an Email Macro,,, where user(s) can send an email with file link to the next person for review or whatever... the code below is working perfect in PC Outlook but I am unable set it for MAC Users;
Sub Make_Outlook_Mail_With_File_Link()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
If ActiveWorkbook.Path <> "" Then
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<font size=""3"" face=""Calibri"">" & _
"Below RFQ link for your review and action.<br><br>" & _
"<A HREF=""file://" & ActiveWorkbook.FullName & _
""">Link to the file</A>" & _
"<br><br>Thanks and Kind Regards,</font>"
On Error Resume Next
With OutMail
.to = ""
.CC = ""
.BCC = ""
.Subject = "RFQ #: " & Activesheet.Name & " | " & Activesheet.Range("D8") & " | " & Activesheet.Range("D13")
.HTMLBody = strbody
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Else
MsgBox "The ActiveWorkbook does not have a path, Save the file first."
End If
End Sub
Any timely help will be appreciated.
Thanks