gcue Posted March 30, 2010 Posted March 30, 2010 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") MsgBox(0,"",$first_name) WEnd
BrettF Posted March 31, 2010 Posted March 31, 2010 Just a long shot because I can't see a real problems. What does VarGetType ($first_name) return? Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now