+ Reply to Thread
Results 1 to 3 of 3

How to add a contact in names.nsf

  1. How to add a contact in names.nsf

    Here is my python code,I dont know why all operation return
    success,but In Notes I dont see any new contact.But the change
    operation is OK.Such change a property of contact.


    "
    from win32com.client import Dispatch
    import pywintypes
    try:
    session = Dispatch('Lotus.NotesSession')
    session.Initialize("zclino2")

    db = session.getDatabase("", "names.nsf")
    doc = db.CreateDocument()
    result = doc.Save(True,False)
    print "result:",result
    "

  2. Re: How to add a contact in names.nsf

    On Oct 15, 8:10*am, Chunlin Zhang wrote:
    > Here is my python code,I dont know why all operation return
    > success,but In Notes I dont see any new contact.But the change
    > operation is OK.Such change a property of contact.
    >
    > "
    > from win32com.client import Dispatch
    > import pywintypes
    > try:
    > * * session = Dispatch('Lotus.NotesSession')
    > * * session.Initialize("zclino2")
    >
    > * * db = session.getDatabase("", "names.nsf")
    > * * doc = db.CreateDocument()
    > * * result = doc.Save(True,False)
    > * * print "result:",result
    > "


    Hi,
    if this is the whole code it is pretty clear, because the views are
    filtered on various fields and as you don't specify any of them the
    document isn't visible.

    martin

  3. Re: How to add a contact in names.nsf


    >
    > Hi,
    > if this is the whole code it is pretty clear, because the views are
    > filtered on various fields and as you don't specify any of them the
    > document isn't visible.
    >
    > martin

    Thanks for your advice.
    I have solved it now.
    the document 's property "Form" & "Type" should be set as "person"

+ Reply to Thread