N
Neil Greenough
I have a form for different contacts. The form contains a field for the
email address for each contact. This field is called "ABC."
Now, on this form, I want to click on a button and for an email to be
automatically created for the email address in that form, so if I am looking
at Joe Bloggs, who is joebloggs@hotmail, when I click the button, an email
automatically opens adressed automatically to joebloggs@hotmail.
I am using Lotus Notes.
So far, I have the following code. Could you confirm this is the complete
code I should put behind the button? Also, could you please alter the code,
so it copies the info from the field 'ABC', so as to automatically address
the email?
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
email address for each contact. This field is called "ABC."
Now, on this form, I want to click on a button and for an email to be
automatically created for the email address in that form, so if I am looking
at Joe Bloggs, who is joebloggs@hotmail, when I click the button, an email
automatically opens adressed automatically to joebloggs@hotmail.
I am using Lotus Notes.
So far, I have the following code. Could you confirm this is the complete
code I should put behind the button? Also, could you please alter the code,
so it copies the info from the field 'ABC', so as to automatically address
the email?
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