We're moving everything across to Share point, and the below Macro doesn't want to work. It gives the file name etc, but seems to be missing random characters after the .xlsx file name.
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"">" & _
"Sylvia,<br><br>" & _
"I would like to inform you that the next sales quote :<br><B>" & _
ActiveWorkbook.Name & "</B> has been created.<br>" & _
"Click on this link to open the file : " & _
"<A HREF=""file://" & ActiveWorkbook.FullName & _
""">Link to the file</A>" & _
"<br><br>Regards," & _
"<br><br>Design Team</font>"
On Error Resume Next
With OutMail
.To = "####.####@####.co.uk"
.CC = ""
.BCC = ""
.Subject = ActiveWorkbook.Name
.HTMLBody = strbody
.Display 'or use .Send
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 thoughts how this could be rectified for Sharepoint files, almost as if sending the same link as the 'Share button' extracts to?
Thanks
Calvin
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"">" & _
"Sylvia,<br><br>" & _
"I would like to inform you that the next sales quote :<br><B>" & _
ActiveWorkbook.Name & "</B> has been created.<br>" & _
"Click on this link to open the file : " & _
"<A HREF=""file://" & ActiveWorkbook.FullName & _
""">Link to the file</A>" & _
"<br><br>Regards," & _
"<br><br>Design Team</font>"
On Error Resume Next
With OutMail
.To = "####.####@####.co.uk"
.CC = ""
.BCC = ""
.Subject = ActiveWorkbook.Name
.HTMLBody = strbody
.Display 'or use .Send
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 thoughts how this could be rectified for Sharepoint files, almost as if sending the same link as the 'Share button' extracts to?
Thanks
Calvin