P
Paul
Hi,
I'm using Access 2003
I've got a form with a button inside a record that will trigger the code as
mentioned below. This code will insert a hyperlink to whatever path i put in
there but what I'm trying to accomplish is that the hyperlink will point to a
specific record
As far as the code for sending an e-mail with a hyperlink in it that's no
problem, here's the code I got so far:
Private Sub button_Click()
DoCmd.SetWarnings False
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim strHTML As String
Dim strHyperlink As String
Dim strExportDirectory As String
Set olApp = Outlook.Application
Set objMail = olApp.CreateItem(olMailItem)
strHyperlink = "file:///C:\Windows\"
strHTML = "<HTML><Body>Test Body.<p><p><a Href=" & strHyperlink & "
target=new>Testing Link</a></body></html>"
With objMail
..BodyFormat = olFormatHTML
..HTMLBody = strHTML
..To = "e-mail address"
..Subject = "Some Subject"
..Display
End With
Set olApp = Nothing
Set objMail = Nothing
DoCmd.SetWarnings True
End Sub
Any suggestoins anybody?
Cheers,
Paul
I'm using Access 2003
I've got a form with a button inside a record that will trigger the code as
mentioned below. This code will insert a hyperlink to whatever path i put in
there but what I'm trying to accomplish is that the hyperlink will point to a
specific record
As far as the code for sending an e-mail with a hyperlink in it that's no
problem, here's the code I got so far:
Private Sub button_Click()
DoCmd.SetWarnings False
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim strHTML As String
Dim strHyperlink As String
Dim strExportDirectory As String
Set olApp = Outlook.Application
Set objMail = olApp.CreateItem(olMailItem)
strHyperlink = "file:///C:\Windows\"
strHTML = "<HTML><Body>Test Body.<p><p><a Href=" & strHyperlink & "
target=new>Testing Link</a></body></html>"
With objMail
..BodyFormat = olFormatHTML
..HTMLBody = strHTML
..To = "e-mail address"
..Subject = "Some Subject"
..Display
End With
Set olApp = Nothing
Set objMail = Nothing
DoCmd.SetWarnings True
End Sub
Any suggestoins anybody?
Cheers,
Paul