To anyone who can help,
I'm using Access to send an e-mail out after they hit a button. My e-mail client is Lotus Notes. I'm trying to add a hyperlink into the body of the e-mail so that the recipient can easily go to a specific file.
I have looked everywhere but can't seem to figure it out. I even tried looking up how to send html e-mails using Notes, but it doesn't look like this is possible.
Anyone have any idea whether this is even doable? Can I add hyperlinks in RTF e-mails? Or do I have to create an HTML e-mail? In that case anyone have a code to create HTML e-mails in Lotus Notes? This is the code I used:
Sub CreateMailandAttachFileAdr(Optional IsSubject As String = "", Optional SendToAdr As String, Optional Recip As Variant, Optional BCCToAdr As String = "", Optional IsBody As String = "", Optional Attach1 As String = "", Optional Attach2 As String = "")
Const EMBED_ATTACHMENT As Integer = 1454
Const EMBED_OBJECT As Integer = 1453
Const EMBED_OBJECTLINK As Integer = 1452
Dim s As Object ' use back end classes to obtain mail database name
Dim db As Object '
Dim doc As Object ' front end document
Dim beDoc As Object ' back end document
Dim workspace As Object ' use front end classes to display to user
Dim bodypart As Object '
Call CreateNotesSession&
Set s = CreateObject("Notes.Notessession") 'create notes session
Set db = s.GETDATABASE("", "") 'set db to database not yet named
Call db.OPENMAIL ' set database to default mail database
Set beDoc = db.CREATEDOCUMENT
Set bodypart = beDoc.CREATERICHTEXTITEM("Body")
' Filling the fields
'###################
beDoc.Subject = IsSubject
beDoc.sendto = SendToAdr
beDoc.CopyTo = CCToAdr
beDoc.BlindCopyTo = BCCToAdr
beDoc.body = IsBody
' Attaches I
'###########
' Call bodypart.EmbedObject(EMBED_ATTACHMENT, "", DirWithPathFileName, FileName)
If Len(Attach1) > 0 Then
If Len(Dir(Attach1)) > 0 Then
Call bodypart.EMBEDOBJECT(EMBED_ATTACHMENT, "", Attach1, Dir(Attach1))
End If
End If
' Attaches II
'############
If Len(Attach2) > 0 Then
If Len(Dir(Attach2)) > 0 Then
Call bodypart.EMBEDOBJECT(EMBED_ATTACHMENT, "", Attach2, Dir(Attach2))
End If
End If
Set workspace = CreateObject("Notes.NotesUIWorkspace")
' Positioning Cursor
'###################
Call workspace.EditDocument(True, beDoc).GotoField("Body")
'Call workspace.EditDocument(True, beDoc).GotoField("Subject")
Set s = Nothing
End Sub
I'm using Access to send an e-mail out after they hit a button. My e-mail client is Lotus Notes. I'm trying to add a hyperlink into the body of the e-mail so that the recipient can easily go to a specific file.
I have looked everywhere but can't seem to figure it out. I even tried looking up how to send html e-mails using Notes, but it doesn't look like this is possible.
Anyone have any idea whether this is even doable? Can I add hyperlinks in RTF e-mails? Or do I have to create an HTML e-mail? In that case anyone have a code to create HTML e-mails in Lotus Notes? This is the code I used:
Sub CreateMailandAttachFileAdr(Optional IsSubject As String = "", Optional SendToAdr As String, Optional Recip As Variant, Optional BCCToAdr As String = "", Optional IsBody As String = "", Optional Attach1 As String = "", Optional Attach2 As String = "")
Const EMBED_ATTACHMENT As Integer = 1454
Const EMBED_OBJECT As Integer = 1453
Const EMBED_OBJECTLINK As Integer = 1452
Dim s As Object ' use back end classes to obtain mail database name
Dim db As Object '
Dim doc As Object ' front end document
Dim beDoc As Object ' back end document
Dim workspace As Object ' use front end classes to display to user
Dim bodypart As Object '
Call CreateNotesSession&
Set s = CreateObject("Notes.Notessession") 'create notes session
Set db = s.GETDATABASE("", "") 'set db to database not yet named
Call db.OPENMAIL ' set database to default mail database
Set beDoc = db.CREATEDOCUMENT
Set bodypart = beDoc.CREATERICHTEXTITEM("Body")
' Filling the fields
'###################
beDoc.Subject = IsSubject
beDoc.sendto = SendToAdr
beDoc.CopyTo = CCToAdr
beDoc.BlindCopyTo = BCCToAdr
beDoc.body = IsBody
' Attaches I
'###########
' Call bodypart.EmbedObject(EMBED_ATTACHMENT, "", DirWithPathFileName, FileName)
If Len(Attach1) > 0 Then
If Len(Dir(Attach1)) > 0 Then
Call bodypart.EMBEDOBJECT(EMBED_ATTACHMENT, "", Attach1, Dir(Attach1))
End If
End If
' Attaches II
'############
If Len(Attach2) > 0 Then
If Len(Dir(Attach2)) > 0 Then
Call bodypart.EMBEDOBJECT(EMBED_ATTACHMENT, "", Attach2, Dir(Attach2))
End If
End If
Set workspace = CreateObject("Notes.NotesUIWorkspace")
' Positioning Cursor
'###################
Call workspace.EditDocument(True, beDoc).GotoField("Body")
'Call workspace.EditDocument(True, beDoc).GotoField("Subject")
Set s = Nothing
End Sub