troubleshooting Question

Accessing Notes Items in Domino with VB.NET

Avatar of NTNBower
NTNBower asked on
Lotus IBM.NET Programming
3 Comments1 Solution1282 ViewsLast Modified:
After the "doc = dbNotes.CreateDocument" line doc looks OK except items is Nothing.
After the line "item = doc.GetFirstItem("Invoice_Number") " item is Nothing, which goes along with the previous.
How do I associate the doc variable with the form "Document" which is in the dbNotes database?  The form "Docuemnt" contains the fields/items that I am trying to populate.

I am using VS2005, VB.NET, and the Interop.Domino library, which doesn't seem to have a UIDocument.
    ' Setup Notes database access
        Dim NotesSession As New NotesSession
        Dim dbNotes As NotesDatabase
        Dim doc As NotesDocument
        Dim item As NotesItem
        Dim strArray As String()
        Dim I As Int32
        Dim Field As String

        frmMergeIC.sbMerge.Text = "Moving image to Notes"

        ' Add the image
            dbNotes = NotesSession.GetDatabase(NotesServer, NotesDatabase)
            doc = dbNotes.CreateDocument

            ' Update the Invoice Number
            item = doc.GetFirstItem("Invoice_Number")
            strArray = Split(invnum, "*")
            For I = 0 To UBound(strArray)
                Field = strArray(I)
                If Field <> "" Then Call item.AppendToTextList(Field)
            Next I

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros