This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Subject: VBA : choose mailbox and send mail from Excel ?
Feedback Type: Question
Product Area: Notes 8 Client
Technical Area: Application development
Platform: Windows Vista client
Release: 8.0.2
Reproducible: Always
Hi to all,
I have a simple to send an email from Excel :
======================================
Private Sub Lotus_SimpleAndWorking()
Dim Session As Object
Dim Dir As Object
Dim Doc As Object
Dim Workspace As Object
Dim EditDoc As Object
'Creation of a memo in Lotus Notes
Set Workspace = CreateObject("Notes.NotesUIWorkspace")
Set Session = CreateObject("notes.NOTESSESSION")
Set Dir = Session.GetDatabase("", "")
Call Dir.OPENMAIL
'Creation d'un document
Set Doc = Dir.CreateDocument
Doc.form = "Memo"
Doc.Subject = "my subject"
Doc.SendTo = "to whom it may concen"
Doc.body = "some body"
'Display the Mail in Lotus Notes
Set EditDoc = Workspace.EditDocument(True, Doc)
Set Session = Nothing
Set Dir = Nothing
Set Doc = Nothing
Set Workspace = Nothing
Set EditDoc = Nothing
End Sub
======================================
It's sending email from my personal account (mail\Mail2\965203.nsf).
But i want to send email from another account. An account used by several people including me.
For that purpose i've change that line :
Set Dir = Session.GetDatabase("", "")