I am currently using the following code to open up lotus notes and send an email out.
However, the code that actually opens Lotus Notes prompts me for a password everytime. I was wondering how can I pass a password through so I can automate this?
This code (Maildb.OPENMAIL) opens notes and always prompts for a password.
-----------------------------------------------------------
Dim WasOpen As Integer 'Checking to see if the Mail DB was alread
Set Session = CreateObject("Notes.NotesSession")
domSession.Initialize (rstPsswd!PassWd)
UserName = Session.UserName
MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set Maildb = Session.GetDatabase("", MailDbName)
If Maildb.IsOpen = True Then
WasOpen = 1 'Already open for mail
Else
WasOpen = 0
Maildb.OPENMAIL 'This will prompt you for password
End If
Set MailDoc = Maildb.CreateDocument
However, the code that actually opens Lotus Notes prompts me for a password everytime. I was wondering how can I pass a password through so I can automate this?
This code (Maildb.OPENMAIL) opens notes and always prompts for a password.
-----------------------------------------------------------
Dim WasOpen As Integer 'Checking to see if the Mail DB was alread
Set Session = CreateObject("Notes.NotesSession")
domSession.Initialize (rstPsswd!PassWd)
UserName = Session.UserName
MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set Maildb = Session.GetDatabase("", MailDbName)
If Maildb.IsOpen = True Then
WasOpen = 1 'Already open for mail
Else
WasOpen = 0
Maildb.OPENMAIL 'This will prompt you for password
End If
Set MailDoc = Maildb.CreateDocument