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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mass (legal!) EMailing

Status
Not open for further replies.

davidrsutton

Programmer
Oct 6, 2004
94
GB
I work in local government and want to be able to click a button that when clicked populates the BCC field of our VIM Mail client (lotus notes) with all the Email addresses in the email field of a certain table. I have been working on this for about a week with absolutely no luck. Any help would be greatly appreciated.
 
See the following. All you will need to do is find the field name of the BCC field.


Private Sub SendMessage(strAddressee As String, strSubject As String, strBody As String)
On Error GoTo ErrorHandler

'Try to switch to Notes. If Notes not open then exit sub-routine
AppActivate "Lotus Notes"
AppActivate "Microsoft Access"

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

ExitHere:
Exit Sub

ErrorHandler:
Select Case Err.Number
Case Else
MsgBox Err.Number & " " & Err.Description & "."
Resume ExitHere
End Select

End Sub

Please do not feed the trolls.....
 
The BCC field is called "EnterBlindCopyTo".

Ed Metcalfe.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top