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

Lotus notes e-mail 1

Status
Not open for further replies.

44nato44

Programmer
Dec 12, 2008
115
NL
Hi

My code below is working fine, but my problem is when lotus notes is locked and it wants to send a mail, in the background the password input box opens to request the password, but the user cannot see it so the user thinks something is wrong and closes the DB.

I want to move the password input box (or what you call it) up front so the user can see it, any ideas how I do that ?


Function NotesMailSend(strRecipient As String, strSubj As String, strBody As String)

On Error GoTo Err_NotesMailSend

Dim objNotes As Object
Dim objNotesDB As Object
Dim objNotesMailDoc As Object
Dim lotusWindow

Set objNotes = GetObject("", "Notes.Notessession")
Set objNotesDB = objNotes.getdatabase("", "")

Call objNotesDB.openmail

Set objNotesMailDoc = objNotesDB.CreateDocument

Call objNotesMailDoc.replaceitemvalue("SendTo", strRecipient)
Call objNotesMailDoc.replaceitemvalue("Subject", strSubj)
Call objNotesMailDoc.replaceitemvalue("Body", strBody)

Call objNotesMailDoc.Send(False)
MsgBox "E-Mail Send to Admin and manager", vbInformation, "ABN Amro"
Set objNotes = Nothing

Exit_NotesMailSend:
Exit Function

Err_NotesMailSend:
Select Case Err.Number
Case 429, 7063
MsgBox "A e-mail was not send to the Manager or approver, please make sure that you send a mail manually", vbInformation, "ABN Amro"
Case Else
MsgBox Err.Number & Chr(13) & Err.Description
Resume Exit_NotesMailSend
End Select

End Function
 
I'd try to play with RunCommand acCmdAppMinimize

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV, not as elegant as I wanted but this will work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top