N
Neil Greenough
I have a vba code to open Lotus Notes and create a new email; this code is
behind a button on a form. Lotus Notes is installed on my work's network,
with each employee having their own account.
Now, when the button is clicked, a windows appears prompting the user to set
up a Lotus Notes account.
Any idea why this is? Any way around it? The code I am using is:-
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
behind a button on a form. Lotus Notes is installed on my work's network,
with each employee having their own account.
Now, when the button is clicked, a windows appears prompting the user to set
up a Lotus Notes account.
Any idea why this is? Any way around it? The code I am using is:-
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