murray83
Games Collector
- Local time
- Today, 06:50
- Joined
- Mar 31, 2017
- Messages
- 770
morning one and all
this is my current code which isnt broken as it does work just not as i would like
bit highlighted in red i would wish to appear as a link in outlook ( just if you had done ctrl + k in outlook )
but all it does i put it on screen
this is my current code which isnt broken as it does work just not as i would like
Code:
'email script for MTM Report
Public Sub CreateEmailWithOutlookMTM()
'bits for the attachment
Dim myPath As String
Dim strReportName As String
todayDate = Format(Date, "DDMMYY")
myPath = "G:\GENERAL\Databases\Handover\Reports\MTM\"
strReportName = "MTM Handover" & " " & todayDate & ".pdf"
' Create a new email object
Set olApp = CreateObject("Outlook.Application")
Set olMailItem = olApp.createitem(olMailItem)
' Add the To/Subject/Body to the message and display the message
With olMailItem
.To = "test@testing.com "
.cc = ""
.Subject = "MTM Handover"
.Body = "Please see Attached MTM Handover" & Chr$(13) & _
Chr$(13) & "find the database here." & Chr$(13) & _
Chr$(13) & " [COLOR="Red"]< A href=G:\GENERAL\Databases\Handover\Handover Database.mdb >Link< /A >[/COLOR] "
'" G:\GENERAL\Databases\Handover\Handover Database.mdb"
.Attachments.Add myPath & strReportName 'FileName"
.Display ' Displays before sending the message
End With
' Release all object variables
Set olMailItem = Nothing
Set olApp = Nothing
End Sub
bit highlighted in red i would wish to appear as a link in outlook ( just if you had done ctrl + k in outlook )
but all it does i put it on screen