creating a hyperlink using outlook automation

E

EricB

Does anyone knows how to create a hyperlink using outlook
automation.

I have created the following in a module:

With objOutlookMsg
.To = Forms!frmElectronicSuggestion!
sbfresponsibleemail!fldEmailSectionContact
.Subject = "Automated Message: Electronic Suggestion
Box"
.HTMLBody = "<HTML><BODY><FONT face=Verdana><H5>A JAS
ELECTRONIC SUGGESTION HAS BEEN SUBMITTED AND IS WAITING
FOR YOUR ACTION</H4>" & _
"<HTML><H6>Open the Electronic Suggestion
Box to view more details and assign the name of the " & _
" Implementor who will be responsible for
handling the proposed suggestion.</H5>" & _
"<TABLE BORDER='3' CELLPADDING='3'
BGCOLOR='#80CBF6'>" & _
"<TR VALIGN='TOP'>" & _
"<TD NOWRAP><FONT
SIZE='2'>ID :</FONT></TD>" & _
"<TD NOWRAP><FONT SIZE='2'>" & Forms!
frmElectronicSuggestion!fldSuggestionNr
& "</FONT></TD></TR>" & _
"<TR VALIGN='TOP'>" & _
"<TD NOWRAP><FONT SIZE='2'>Date
Submitted :</FONT></TD>" & _
"<TD NOWRAP><FONT SIZE='2'>" & Forms!
frmElectronicSuggestion!fldDateEntered
& "</FONT></TD></TR>" & _
"<TR VALIGN='TOP'>" & _
"<TD NOWRAP><FONT SIZE='2'>Title of
Suggestion :</FONT></TD>" & _
"<TD NOWRAP><FONT SIZE='2'>" & Forms!
frmElectronicSuggestion!fldTitleIdea & "</FONT></TD></TR>"
& _
"<TR VALIGN='TOP'>" & _
"<TD NOWRAP><FONT SIZE='2'>Submitted
by :</FONT></TD>" & _
"<TD NOWRAP><FONT SIZE='2'>" & Forms!
frmElectronicSuggestion!fldNameRequestor
& "</FONT></TD></TR>" & _
"</BODY></FONT></TABLE></HTML>" & _
"<P>" & _
"<HTML><H6><HREF>\\servera\Applications\SHA
RED\suggestions\ElectronicBox.mdb</H6></HTML>"
.Recipients.ResolveAll
.Send
End With

When you receive the message in your inbox the hyperlink
does not get created.
 
D

Dan Artuso

Hi,
Here is the syntax for a link:
<A HREF="PathGoesHere">TextGoesHere</A>

Although in Outlook I usually just use:
<file://PathGoesHere>
 
E

EricB

Doesn't work


Here is what I have:

Public Function EMailSectionContact()

Dim strmsg As String
Dim retval As Integer

On Error GoTo Send_Err

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
.To = Forms!frmElectronicSuggestion!
sbfresponsibleemail!fldEmailSectionContact
.Subject = "Automated Message: Electronic Suggestion
Box"
.HTMLBody = "<HTML><BODY><FONT face=Verdana><H5>A JAS
ELECTRONIC SUGGESTION HAS BEEN SUBMITTED AND IS WAITING
FOR YOUR ACTION</H4>" & _
"<HTML><H6>Open the Electronic Suggestion
Box to view more details and assign the name of the " & _
" Implementor who will be responsible for
handling the proposed suggestion.</H5>" & _
"<TABLE BORDER='3' CELLPADDING='3'
BGCOLOR='#80CBF6'>" & _
"<TR VALIGN='TOP'>" & _
"<TD NOWRAP><FONT
SIZE='2'>ID :</FONT></TD>" & _
"<TD NOWRAP><FONT SIZE='2'>" & Forms!
frmElectronicSuggestion!fldSuggestionNr
& "</FONT></TD></TR>" & _
"<TR VALIGN='TOP'>" & _
"<TD NOWRAP><FONT SIZE='2'>Date
Submitted :</FONT></TD>" & _
"<TD NOWRAP><FONT SIZE='2'>" & Forms!
frmElectronicSuggestion!fldDateEntered
& "</FONT></TD></TR>" & _
"<TR VALIGN='TOP'>" & _
"<TD NOWRAP><FONT SIZE='2'>Title of
Suggestion :</FONT></TD>" & _
"<TD NOWRAP><FONT SIZE='2'>" & Forms!
frmElectronicSuggestion!fldTitleIdea & "</FONT></TD></TR>"
& _
"<TR VALIGN='TOP'>" & _
"<TD NOWRAP><FONT SIZE='2'>Submitted
by :</FONT></TD>" & _
"<TD NOWRAP><FONT SIZE='2'>" & Forms!
frmElectronicSuggestion!fldNameRequestor
& "</FONT></TD></TR>" & _
"</BODY></FONT></TABLE></HTML>" & _
"<P>" & _
"<file://SERVER1/Applications/SHARED/ELECSU
GGESTIONS/ElectronicBox.mdb>"
.Recipients.ResolveAll
.Send
End With

DoCmd.Hourglass False
Set objOutlook = Nothing

GoTo Send_End

Send_Err:
MsgBox ("The message to " & Forms!
frmElectronicSuggestion!sbfresponsibleemail!
fldEmailSectionContact & " could not be sent. The name
may not exist in Outlook or may not be unique. Click on
OK to open the message, then click on the 'Check names'
button and select a recipient or close the message.")
objOutlookMsg.Display

Send_End:
DoCmd.Hourglass 0

End Function

The hyperlink does not appear in the e-mail message.
Thanks for any help...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top