Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling Lotus Notes Via VBA

Status
Not open for further replies.

Ed2020

Programmer
Nov 12, 2001
1,899
GB
I have the following code which sends an email from a Lotus Notes email account:
Public Sub SendMail(strAddressee As String, strSubject As String, strBody As String)

Dim objNotesWS As Object Dim notesdb As Object

Set objNotesWS = CreateObject("Notes.NotesUIWorkspace")

Set notesdb = objNotesWS.COMPOSEDOCUMENT(, , "memo")

notesdb.FIELDSETTEXT "EnterSendTo", strAddressee notesdb.FIELDSETTEXT "Subject", strSubject notesdb.FIELDSETTEXT "Body", strBody

notesdb.Send

notesdb.Close Set notesdb = Nothing Set objNotesWS = Nothing

End Sub

This works fine, providing the user doesn't have their auto spell check turned on. I can use send keys to alter the state of this property, but if auto-spell check is off then sendkeys turns it on!

Anyone got any ideas??

Ed Metcalfe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top