N
Neil Greenough
I have the following code:-
Private Sub cmdSendHomeEmail_Click()
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", Me.Email)
Set notesrtf = notesdoc.createrichtextitem("body")
Rem attach Error Report doc
's = ActiveDocument.Path + "\" + ActiveDocument.Name
Call notesrtf.embedObject(1454, "", Me.Email, "Mail.rtf")
Rem send message
Call notesdoc.Send(False)
Set notessession = Nothing
End Sub
I had this on one form in a database and it worked, so I have copied it to a
from in another database and I am now getting an error:-
"Compile error: Method or data member not found"
Now, my email field is called "Email" and so i don't see what the problem
is? I want to basically send an email via lotus notes by clicking this
button to the email address in the 'Email' field on that specific record on
the form
Any ideas as this is quite urgent?
Thanks
Private Sub cmdSendHomeEmail_Click()
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", Me.Email)
Set notesrtf = notesdoc.createrichtextitem("body")
Rem attach Error Report doc
's = ActiveDocument.Path + "\" + ActiveDocument.Name
Call notesrtf.embedObject(1454, "", Me.Email, "Mail.rtf")
Rem send message
Call notesdoc.Send(False)
Set notessession = Nothing
End Sub
I had this on one form in a database and it worked, so I have copied it to a
from in another database and I am now getting an error:-
"Compile error: Method or data member not found"
Now, my email field is called "Email" and so i don't see what the problem
is? I want to basically send an email via lotus notes by clicking this
button to the email address in the 'Email' field on that specific record on
the form
Any ideas as this is quite urgent?
Thanks