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

Passing Password to Lotus Notes

Status
Not open for further replies.

saliva

Programmer
Oct 16, 2001
3
PR
When traying to pass a the password to a Notes Session with the poSession.Initialize("password") command bring an error "Unknown Name".

Ex. Code

poSession=CreateObject("Notes.NotesSession")
poSession.Initialize('Password')
poDB=poSession.GetDatabase("", "mail\a_jsaliv.nsf")

 
While I've never used the Notes object model, the message would seem to indicate that the Initialize() method is expecting a User Name, or a User Name and password.

Rick
 
Try this


Dim appDc As NotesDocumentCollection
Dim ws As Object
Dim notes As Object
Dim db As Object
Dim domsession As New NotesSession

Private Sub cmdOPEN_click()

Dim notesdata
Dim R5
Dim domdir
Set ws = CreateObject("notes.notesUIWorkspace")
Set notes = CreateObject("Notes.NotesSession")

domsession.Initialize

R5 = notesdata & "your database name.nsf"
Set domdir = domsession.GetDatabase("server path here", R5)
Set db = notes.GetDatabase("filepath here", R5)
Call ws.OpenDatabase(db.Server, db.FilePath, "", "", False, False)

Set domsession = Nothing

End Sub

Hope it helps.
Cassandra
 
The "Unknown Name" error is saying that ".Initialize" is not a known COM/ActiveX member name.
 
Make sure that your project references to Lotus Domino object.
Good luck!

Cassandra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top