RE: Create a hyperlink in a string value
- From: Carole D <CaroleD@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Aug 2008 17:11:01 -0700
My quick-and-dirty solution is to put my cursor at the end of the text URL in
the message and press the spacebar. Outlook then converts the text to a link.
"Eka1618" wrote:
Hello,.
I have an Access Database. In this database, durring several different
ocations an e-mail message will be generate and sent to whoever. What I want
to do is create a string of some sort that will store the location of the
database on the network, and then somehow add this string as a hyperlink to a
predefined e-mail message that generates when the e-mail itself generates. I
am using VB for Access, but no one in those forums seem to know how to create
a link I guess...
Here is the code that already generate the e-mail:
Private Sub btnSend_Click()
Dim emName, emName2 As String, varItem As Variant
Dim emailBody As String
Dim emailSubject As String
'Dim db As String
'db = "<a href = ""G:\Shared Files\Eng_Favs\Test
Database_4_14_08.accdb"">Test Database</a>"
emailSubject = "Product Test Request"
On Error GoTo btnSend_Click_error
If Me!lboRequestor.ItemsSelected.Count = 0 Then
MsgBox "Please select a test requestor"
Exit Sub
End If
Me.PART_NO.SetFocus
emailBody = "Hello, " & vbCrLf & vbCrLf & _
"A product test request has been issued for the following Part Number: " &
Me.PART_NO.Text & _
vbCrLf & vbCrLf & "Please log into the Product Engineering test database to
review this request, Thank You!"
On Error GoTo btnSend_Click_error
If Me!lboRequestee.ItemsSelected.Count = 0 Then
MsgBox "Please select a test requestee"
Exit Sub
End If
For Each varItem In Me!lboRequestee.ItemsSelected
emName = emName & Chr(34) & Me!lboRequestee.Column(2, varItem) & Chr(34) & ","
Next varItem
For Each varItem In Me!lboRequestor.ItemsSelected
emName2 = emName2 & Chr(34) & Me!lboRequestor.Column(2, varItem) & Chr(34) &
","
Next varItem
'remove the extra comma at the end
'add the requestor to the e-mail list recipients
emName2 = Left$(emName2, Len(emName2) - 1)
emName = emName & emName2
'send message
DoCmd.SendObject acSendNoObject, , , emName, , , emailSubject, emailBody,
True, False
DoCmd.Close acForm, "frmRequest", acSaveNo
DoCmd.OpenForm "frmMain", acNormal, , , , acDialog
btnSend_Click_error:
If Err.Number = 2501 Then
MsgBox "You just canceled the e-mail", vbCritical, "Alert"
End If
End Sub
- Prev by Date: Re: shell command bug
- Next by Date: comprimes de acomplia us usa bon marche dans commande acomplia en France corpus acomplia belgique soft en ligne acomplia canada bon marche Sans Prescription acomplia canada Generique Inde
- Previous by thread: shell command bug
- Next by thread: comprimes de acomplia us usa bon marche dans commande acomplia en France corpus acomplia belgique soft en ligne acomplia canada bon marche Sans Prescription acomplia canada Generique Inde
- Index(es):
Relevant Pages
|