(P.S.: "AppendDocLink" im NotesRichtextItem ist dein Ansatzpunkt )
Public Sub SendNotesMail(Subject As String, Recipient As String, BodyText As String, SaveIt As Boolean) Dim Maildb As Object 'The mail database Dim UserName As String 'The current users notes name Dim MailDbName As String 'THe current users notes mail database name Dim MailDoc As Object 'The mail document itself Dim Session As Object 'The notes session Dim EmbedObj As Object 'The embedded object (Attachment) Dim rt As Object 'Start a session to notes Set Session = CreateObject("Notes.NotesSession") UserName = Session.UserName 'Open the mail database in notes Set Maildb = Session.GETDATABASE("Domino01", "wziffels.nsf") If Maildb.IsOpen = True Then Else Maildb.OPENMAIL End If 'Set up the new mail document Set MailDoc = Maildb.CREATEDOCUMENT MailDoc.Form = "Memo" MailDoc.sendto = Recipient MailDoc.Subject = Subject MailDoc.Body = BodyText Set rt = MailDoc.CREATERICHTEXTITEM("TestDocLink") rt.APPENDTEXT ("Click here: ") rt.APPENDDOCLINK Maildb, Maildb.Title MailDoc.SAVEMESSAGEONSEND = SaveIt 'Send the document MailDoc.PostedDate = Now() 'Gets the mail to appear in the sent items folder MailDoc.SEND 0, Recipient 'Clean Up Set Maildb = Nothing Set MailDoc = Nothing Set Session = Nothing Set EmbedObj = Nothing End Sub Function test() SendNotesMail "Testmail VBA", "wziffels", "Nur ein Text", True End Function
MailDoc.Body = BodyText
Set rt = MailDoc.CREATERICHTEXTITEM("Body") Call rt.AppendText( BodyText ) Call rt.AddNewline(1) Call rt.APPENDTEXT ("Click here: ") Call rt.APPENDDOCLINK( Maildb, Maildb.Title )
Call notesRichTextItem .AppendDocLink( linkTo , comment$ [, HotSpotText$ ] )
rt.APPENDDOCLINK Maildb, Maildb.Title, "Link zur Datenbank"