Two questions for this one.
First question:
I have this code that Ive been messing with. I have it displaying my message the way that I want, but I would like two parts of it to be Hyperlinks.
I want WinFilePath and MacFile Path to be Hyperlinks in the Email body.
Second question:
How can i get this to work in MacOS environment?
As is, MacOS won't allow for the creation of the Outlook Object.
My brief research on this says that I either:
Can't do this,
or i might be able to use an AppleScript.
Help on the First question and advice on the Second is much appreciated.
Thank you for you time.
-Gafftape
First question:
I have this code that Ive been messing with. I have it displaying my message the way that I want, but I would like two parts of it to be Hyperlinks.
Code:
Sub Workbook_AfterSave(ByVal Success As Boolean)
If Success Then
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
'added these 2 variables
Dim WinFilePath As String
Dim MacFilePath As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
'This is the location on the server where the Road Support form is located.
WinFilePath = "\\FILESERVERXX\Shared\RTR"
'This is the same loaction as WinFilePath but formatted for Mac users.
MacFilePath = "smb:\\FILESERVERXX\Shared\RTR"
'Edit "strbody" to change the E-mail message
strbody = "Hello there! - The Road Support Form has been updated by " & Environ("USERNAME") & " at " & Format(Now(), "ddd dd mmm yy hh:mm") & vbCr & vbCr & "The updated file can be found at:" & vbCr & "For Windows Users: " & WinFilePath & vbCr & vbCr & "For Macitosh Users:" & MacFilePath
'Edit the recipients below.
On Error Resume Next
With OutMail
.To = ""
.Subject = "The Road Support form has been Updated" & " - " & Format(Now(), "ddd dd mmm yy")
.Body = strbody
.display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End If
End Sub
I want WinFilePath and MacFile Path to be Hyperlinks in the Email body.
Second question:
How can i get this to work in MacOS environment?
As is, MacOS won't allow for the creation of the Outlook Object.
My brief research on this says that I either:
Can't do this,
or i might be able to use an AppleScript.
Help on the First question and advice on the Second is much appreciated.
Thank you for you time.
-Gafftape