Jump to content

almost there!


Recommended Posts

all i get is blank values...

Public DomSession As New NotesSession

Sub GetUserNames()

StrTestDomSession = DomSession.CommonUserName

Set DOMNAB = DomSession.GetDatabase("SERVER06", "names.nsf")

Set DomView = DOMNAB.GetView("($Users)")

Set DomAssoc = DomSession.GetDatabase("SERVER06", "ALIST.nsf")

Set DomAssocView = DomAssoc.GetView("(Export by Username)")

nIndex = 1

strinitials = Trim(Cells(nIndex + 5, 1).Value)

Set DomDoc = DomView.GetDocumentByKey(strinitials, True)

Set DomAss = DomAssocView.GetDocumentByKey(strinitials, True)

MsgBox (strinitials)

Do Until strinitials = ""

If Not (DomDoc Is Nothing) Then

Cells(nIndex + 5, 3) = DomDoc.GetItemValue("FirstName")(0)

End If

nIndex = nIndex + 1

end sub

$username = "BEE32"

$session = ObjCreate("Notes.NotesSession")
$testsession = $session.CommonUserName

;~ $session.InitializeUsingNotesUserName

$DOMNAB = $session.GetDatabase("SERVER06","names.nsf")
$DomView = $DOMNAB.GetView("($Users)")

$DomAssoc = $session.GetDatabase("SERVER06","ALIST.nsf")
$DomAssocView = $DomAssoc.GetView("(Export by Username)")

$DomDOC = $DomView.GetDocumentByKey($username, True)
$DomAss = $DomAssocView.GetDocumentByKey($username, True)

While 1
    If Not IsObj($DomDOC) Then ExitLoop

$first_name = $DomDOC.GetItemValue("FirstName")


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...