|
Question : Email Missing Signature
|
|
I need the code below to add a signature. I already have one stored in lotus notes, i'd like to use that one. Also, I need to attach a file and am not sure how to do that. Lets say the path is the C Drive
Private Sub Command37_Click() Dim rs As New ADODB.Recordset Dim strEmail As String Set Lotus2 = CreateObject("Notes.NotesSession") Set mailbox = Lotus2.GetDatabase("", "") mailbox.OPENMAIL Set msg = mailbox.CreateDocument msg.ReplaceItemValue "Form", "Memo" Set msgNoteText = msg.CreateRichTextItem("Body") If Format(Date - 1, "dddd") = "Sunday" Then msg.ReplaceItemValue "Subject", "AM Consolidated DSR" & " " & Date - 3 msgNoteText.AppendText "Attached is the AM Consolidated DSR" & " " & Date - 3
Else msg.ReplaceItemValue "Subject", "AM Consolidated DSR" & " " & Date - 1 msgNoteText.AppendText "Attached is the AM Consolidated DSR" & " " & Date - 1 msg.ReplaceItemValue "Signature", "Signature" End If
Set SendTo = msg.ReplaceItemValue("SendTo", "") rs.Open "tblAttendeeList", CurrentProject.Connection, adOpenDynamic, adLockOptimistic Do While Not rs.EOF If Not IsNull(rs!Email) Then strEmail = rs!Email SendTo.AppendToTextList strEmail End If rs.MoveNext Loop rs.Close Set rs = Nothing msg.Save True, True CreateObject("Notes.NotesUiWorkspace").EDITDOCUMENT True, msg End Sub
Thank you.
|
|
Answer : Email Missing Signature
|
|
If you can, I would use Lotus.NotesSession instead of Notes.NotesSession. The only downside is that you may have to supply a password.
However, NotesuiDocument is ONLY available via Notes., not Lotus., because BY DEFINITION it has a user interface, which means it is using the lcinet, i.e., Notes, not an invisible API. As such, you need to use it with Notes.NotesSession.
|
|
|
|