Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim thisdb As NotesDatabase
Dim profileview As NotesView
Dim User as String
Dim profiledoc As NotesDocument
Set thisdb = session.CurrentDatabase
Set profileView = thisdb.GetView("User Profiles")
User = session.commonusername
Set profileDoc = profileView.GetDocumentByKey( User, True )