P.s First posted at excel forum. But no answers there. So will try here if some have any solution. Also here i have seen som threads, but so far no solution. Please have a look thanks
Calendar entry meeting in lotus notes calendar with macro
Hi I have long time been looking for a solution for this task in lotus notes. I have found allot, but so far not any solution thats work.,
Below i have a code, which can send a mail to multi recieptients. I would like if some knows to change this one, so it send to my own mail also in the inbox.
But the main thing is if some knows a working code to make a calendar meeting in lotus notes with a macro.
Please see if some can help with this.
Thanks
Sincerely
abjac
My code(Found on the net) to send mail with macro in lotus notes. Need that to be changed so it send to my own inbox also..
Calendar entry meeting in lotus notes calendar with macro
Hi I have long time been looking for a solution for this task in lotus notes. I have found allot, but so far not any solution thats work.,
Below i have a code, which can send a mail to multi recieptients. I would like if some knows to change this one, so it send to my own mail also in the inbox.
But the main thing is if some knows a working code to make a calendar meeting in lotus notes with a macro.
Please see if some can help with this.
Thanks
Sincerely
abjac
My code(Found on the net) to send mail with macro in lotus notes. Need that to be changed so it send to my own inbox also..
Code:
Sub SendEmailUsingCOM()
'*******************************************************************************************
' Unlike OLE automation, one can use Early Binding while using COM
' To do so, replace the generic "object" by "commented" UDT
' Set reference to: Lotus Domino Objects
'*******************************************************************************************
Dim nSess As Object 'NotesSession
Dim nDir As Object 'NotesDbDirectory
Dim nDb As Object 'NotesDatabase
Dim nDoc As Object 'NotesDocument
Dim nAtt As Object 'NotesRichTextItem
Dim vToList As Variant, vCCList As Variant, vBody As Variant
Dim vbAtt As VbMsgBoxResult
Dim sFilPath As String
Dim sPwd As String
'*******************************************************************************************
'To create notesession using COM objects, you can do so by using.
'either ProgID = Lotus.NotesSession
'or ClsID = {29131539-2EED-1069-BF5D-00DD011186B7}
'Replace ProgID by the commented string below.
'*******************************************************************************************
Set nSess = CreateObject("Lotus.NotesSession") 'New:{29131539-2EED-1069-BF5D-00DD011186B7}
'*******************************************************************************************
'This part initializes the session and creates a new mail document
'*******************************************************************************************
sPwd = Application.InputBox("Type your Lotus Notes password!", Type:=2)
Call nSess.Initialize(sPwd)
Set nDir = nSess.GetDbDirectory("")
Set nDb = nDir.OpenMailDatabase
Set nDoc = nDb.CREATEDOCUMENT
'*******************************************************************************************
'If you want to send it to multiple recipients then use variant array to get the names from
'the specified range as below
'Add / Remove Comment mark from vCCList as per your needs.
'*******************************************************************************************
vToList = Application.Transpose(Range("A1").Resize(Range("A" & Rows.Count).End(xlUp).Row).Value)
vCCList = Application.Transpose(Range("B1").Resize(Range("B" & Rows.Count).End(xlUp).Row).Value)
'*******************************************************************************************
'If you want to send it to multiple recipients then use variant array to get the names from
'the specified range as below
'Add / Remove Comment mark from vCCList as per your needs.
'*******************************************************************************************
With nDoc
Set nAtt = .CreateRichTextItem("Body")
Call .ReplaceItemValue("Form", "Memo")
Call .ReplaceItemValue("Subject", "Test Lotus Notes Email using COM")
With nAtt
.AppendText (Range("C2").Value)
'Decide if you want to attach a file.
vbAtt = MsgBox("Do you want to attach document?", vbYesNo, "Attach Document")
Select Case vbAtt
Case 6
.AddNewline
.AppendText ("********************************************************************")
.AddNewline
sFilPath = Application.GetOpenFilename
Call .EmbedObject(1454, "", sFilPath) '1454 = Constant for EMBED_ATTACHMENT
Case 7
'Do Nothing
End Select
End With
Call .ReplaceItemValue("CopyTo", vCCList)
Call .ReplaceItemValue("PostedDate", Now())
Call .Send(False, vToList)
End With
End Sub
Last edited: