The correct syntax for providing password is:
session.hashpassword ("Password")
However, using it also turned futile.
The problem now comes at:
Set Maildb = Session.GETDATABASE("", MailDbName)
If Maildb.IsOpen = True Then
'Already open for mail
Else
Maildb.OPENMAIL
End If
Since the database is protected with password, it doesn't get opened straightaway (even after providing password at beginning). The provide password screen pops up again. Here VBA transfers control to inputbox. I tried to use SendKeys. But that wouldn't send keys. I used below syntax:
Else
Maildb.OPENMAIL
application.sendkeys "Password~", True
End If
But the code remained hung at Maildb.OPENMAIL and inputbox remained waiting. So I pressed ALT + TAB to get to the lotus inputbox and inserted password + ENTER. The control returned back to VBA to execute sendkeys which was meaningless (as password was already provided). So the revised question now:=
Can I mimic the operation:
1. To get the lotus-inputbox
2. Punch in password + ENTER
reliably? I've searched many forums to find (MrExcel / Ozgrid / ExpertExchange) and the site above but could not find what I was looking for. Kindly note, of all the trolling, I do not have cross-posted this thread anywhere.