Hello everyone,
I have Lotus Notes 6.5 with XP and using Excel VBA.
I am attempting to put a hyperlink into a email programmaticly that will take a user to a place on the web. All other users have Notes installed on their machines. I can get the email sent out without the hyperlink, but I’d like to have the text appear in blue to say “click here” and have the link take the user to Google, for example.
I know I can do this by going through Notes and going to Create - Hotspot - Link Hotspot, but how do I do this via vb/vba code? I’ve tried to fond some code examples on the Domino Designer Help or on the web but I haven’t had much luck.
Here’s what I am currently doing with some modifications:
Public Sub SendEmail(strTo As String, strSubject As String, strBody As String, _
Optional strAttachPath As Boolean, Optional strCC As String, Optional strBBC As String)
Dim session As Object
Dim db As Object
Dim doc As Object
Dim rtitem As Object
Set session = CreateObject("Notes.NotesSession")
Set db = session.GetDatabase("", "")
Call db.OpenMail
Set doc = db.CreateDocument
doc.Form = "Memo"
doc.SendTo = strTo
doc.CopyTo = strCC
doc.BlindCopyTo = strBBC
doc.Subject = strSubject
doc.Body = strBody
'Unused
If strAttachPath Then
Set rtitem = doc.CreateRichTextItem("Attachment")
Call rtitem.EMBEDOBJECT(1454, "", "G:\Test2.csv")
Call rtitem.ADDNEWLINE(1, True)
End If
doc.SaveMessageOnSend = True
Call doc.Send(False)
Set rtitem = Nothing
Set doc = Nothing
Set db = Nothing
Set session = Nothing
End Sub