Emailing to Specific Person

N

Neil Greenough

I asked this question a week or so ago, but received no reply so thought I'd
try again :)

Basically, I have the following code. This code is located behind a button
on a form and is used to send an email through Lotus Notes. Now, I'd ideally
like to alter this code, so that, when the button is clicked, the email
address is taken from the field "EmailAddress" on the form (the relevant
table) for the actual contact record being shown, and the new email is then
automatically addressed to that person.

I am looking for any kind individual who can alter the below code so as it
performs the above role.

Many thanks
__________

Dim notesdb As Object
Dim notesdoc As Object
Dim notesrtf As Object
Dim notessession As Object
Set notessession = CreateObject("Notes.Notessession")
Set notesdb = notessession.getdatabase("", "")
Call notesdb.openmail
Rem make new mail message
Set notesdoc = notesdb.createdocument
Call notesdoc.replaceitemvalue("Sendto", strSupportEMail)
Call notesdoc.replaceitemvalue("Subject", "Problem Report")
Set notesrtf = notesdoc.createrichtextitem("body")
Call notesrtf.appendtext("Problem Report")
Call notesrtf.addnewline(2)
Rem attach Error Report doc
's = ActiveDocument.Path + "\" + ActiveDocument.Name
Call notesrtf.embedObject(1454, "", strCurrentPath, "Mail.rtf")
Rem send message
Call notesdoc.Send(False)
Set notessession = Nothing
 
N

Neil Greenough

I simply copied that code from a website and so, I am not too sure what
strSupportEmail is - that's where I was hoping you could help :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top