Excel File Link in Email MAC VBA

Taramera

New Member
Joined
Aug 7, 2014
Messages
5
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
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi, Jim Gordon --- I took this function from DeBruin's web... he has given the solution for Workbook and PDF email from MAC but there is no function for File Link [ file path / document path ]
Secondly, with this function, I cannot break the line in MAC Macro, whereas its working perfectly in PC [ text new lines / paragraphs ].

I would appreciate if I can get a solution for the same.

Regards
 
Upvote 0
Are you trying to put multiple lines into the Subject field?
Is your objective to use the text from a file as the message body?
 
Upvote 0
YES multiple Cells Values [Text] will be in Subject Field
Message body text including current file link path are also written in VBA code.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top