Reading Lotus notes calendar with VB.NET

Hello there,

i succeeded to access my Notes database via VB.NET. I am to “green” to understand all, i.E:

are the calendar entries and the emails all “mixed” in my xxxxx.nsf and just divided by views?

I found a lot of examples to write into the calendar, but do you have a code example how to READ it?

Sorry i am a beginner :slight_smile:

Subject: reading Lotus notes calendar with VB.NET

i want to be a little more detailed:

when reading emails, i have seen that i have to open a view “$Inbox”. Now i was just guessing that i can read calendar documents by reading from “$Calendar” - but if i dont want to guess, where do i get the names of the available views listed?

Further, when i read from this view, i do get a collection of “Documents” with “Items”. I guess the items are the fields (content) of the document, but if i want to call them by name, how can i get them listed, o i know all field names?

Subject: RE: reading Lotus notes calendar with VB.NET

Do you have access to a Notes designer client? If so, I’d start by looking there and seeing how Notes dbs, objects, and methods all work together.

If not…you may want to find a book on Notes development. Trying to code in VB without a good understanding of the object model in Notes is going to be…difficult…

The Notes < 8 designer client is fairly expensive and if your company can’t provide you with one, you may want to download the Notes 8 designer; it’s free. It’s based on Eclipse, but you do get all of the designer help and can see the object model; just be careful not to implement methods that don’t exist for your version of Notes.

Subject: RE: reading Lotus notes calendar with VB.NET

i will try to download and install it as soon as i have my virtual machine running for it. I dont want to install it in my “real” PC, because i fear trouble with my existing Lotus Notes 7 installation (that has to stay there usable… :slight_smile:

but anyway, i was able to read a bit in my calendar like this:

    n_View = MailDB.GetView("($Calendar)")

    n_ViewNav = n_View.CreateViewNav

    n_ViewEntry = n_ViewNav.GetFirstDocument



    Do While Not (n_ViewEntry Is Nothing)



        n_Document = n_ViewEntry.Document



        _startDate = n_Document.GetFirstItem("StartDate")

        _strLine &= _startDate.Text & vbTab

        _endDate = n_Document.GetFirstItem("endDate")

        _strLine &= _endDate.Text & vbTab

        _body = n_Document.GetFirstItem("Body")

        _strLine &= "###" & _body.Text & vbTab

        _subject = n_Document.GetFirstItem("Subject")

        _strLine &= "###" & _subject.Text & vbTab



        Debug.Print(_strLine)



        'next cal entry

        n_ViewEntry = n_ViewNav.GetNextDocument(n_ViewEntry)

    Loop

OF course, i have to guess, what NotesItems could be inside. I was thinking i can inspect the document object with a quick watch, but nothing, all are “stupid” NotesItems.

Using the code above, i get multiple lines with same dates for my repeating issues. I would have expected that they dont have the same dates, but the dates of the repeats…?

Ok, the notes designer will show me more details… but is there another point, where i can have a look for the items to use etc. in the meantime?

Subject: Take a look at this document

http://www-10.lotus.com/ldd/ddwiki.nsf/dx/cs_schema_toc