Search

Wednesday, August 27, 2008

Program to Add Contacts to Lotus notes using C# .Net

how to add the contacts in Lotus Notes Database using C# .Net programmatically this was the problem i faced a year back and struggled for two long weeks before getting answer so when i was documenting the code i came across this solution so thought of posting it here so it may be useful for any one who might be searching for this see the below sample code

in below example i am adding only first name to the Lotus notes domino database

Domino.NotesSession Session = new Domino.NotesSession();
Session.Initialize("password12345");

First, Session.GetDatabase("", "names.nsf")
"" for the local databases and the extension for a database is ".nsf"

Then, you should use
document.ReplaceItemValue("FirtsName", "some name")

Second, you forget to add
document.ReplaceItemValue("Form", "Contact")

Then, it is doc.Save(false, false)
You do not want to force a save and you do not want to create a response document (if you know Lotus Notes).

hope this might help you if you have any further doubts leave a mail at feedback[at] ceveni [dot] com

1 comments:

Unknown said...

Session.Initialize("password12345");

Which password you used here?

I only have a Gmail account configured in Lotus note. The contacts list can be accessed at the beginning without login.

Thanks for any responses

Post a Comment

Other Interesting Articles



Related Article Widget by Yogith

Search Powered by Google