1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| ' prepare email
' -------------
Dim notesDb As Object
Dim notesDoc As Object
Dim notesRTF As Object
Dim notesSession As Object
Dim strTo As String
Dim strCC As String
Dim strSubject As String
Dim strBody As String
Dim strTime As String
Dim strClipboard As String
'------------------
' email Macro
' -----------------
strTime = Format(Now, "mm/dd/yyyy - hh:mm:ss")
strBody = msgtext0$
' -------------------
' Setup Lotus Notes
' -------------------
strCC = "Emailadress1"
strTo = "Emailadress2"
strSubject = ("name")
' -------------------
' Opens Lotus Notes
' -------------------
Set notesSession = CreateObject("Notes.Notessession")
Set notesDb = notesSession.getDatabase("", "")
Call notesDb.Openmail
' -------------------
' Makes New Memo
' -------------------
Set notesDoc = notesDb.CreateDocument
Call notesDoc.replaceitemvalue("Sendto", strTo)
Call notesDoc.replaceitemvalue("Copyto", strCC)
Call notesDoc.replaceitemvalue("Subject", strSubject)
Call notesDoc.replaceitemvalue("Body", strBody)
' -------------------
' Sends message
' -------------------
notesDoc.Send (False)
notesDoc.SaveMessageOnSend = True
Set notesSession = Nothing
' ---------
' end email
' --------- |
Partager