General information
Category:
COM/DCOM and OLE Automation
Title:
Notes object model ( accessing Address book through COM )
Hi Ariel,
I saw your thread regarding accessing Lotus Notes Address book from VFP as i am looking something similar to do with Notes.
I want to loop through Notes Address book ( i.e. Contacts ) and read the values like FirstName, lastName, MobilePhoneNumber etc..
I find out lObject = GetNextDocument(DomDoc) skips to next document( record ).
Domsession = createobject("Notes.Notessession")
*Domsession = createobject("Lotus.Notessession")
DomDir = Domsession.GetDatabase("","names.nsf")
DomContacts = DomDir.GetView("People")
DomDoc = DomContacts.GetFirstDocument()
DomItem = DomDoc.GetFirstItem("LastName")
if vartype(DomItem) = "O"
?DomItem.text && this will print Lastname from Contacts
* StrName = DomItem.Value(0) && this gives error
endif
DomItem = DomDoc.GetFirstItem("FirstName")
?DomItem.text && prints firstname
Just one more thing.
When I run this code it opens up Notes in the background. Is there a way i don't see this.
Regards
Dejan Jocic
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only