wh00t
Registered User.
- Local time
- Today, 13:01
- Joined
- May 18, 2001
- Messages
- 264
Hi there, I have the following code as a public sub, which I obtained from these forums...
-------------
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
----------------
but I have a problem
the theory is, I insert the following line of code onto another section where I wish to activate this code
SendMail("gareth.chappell@manor-bakeries.co.uk","Test","This is a test mail")
but it says '= expected'
any help would be appreciated
-------------
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
----------------
but I have a problem
the theory is, I insert the following line of code onto another section where I wish to activate this code
SendMail("gareth.chappell@manor-bakeries.co.uk","Test","This is a test mail")
but it says '= expected'
any help would be appreciated