C#/Domino COM: Problems reading RTF tables

Discussion in 'Lotus Notes Programming' started by Primoz Kosir, Jun 26, 2017.

  1. Primoz Kosir

    Primoz Kosir New Member

    Joined:
    Jun 26, 2017
    Messages:
    1
    Likes Received:
    0
    I'm developing a document parsing application in C# (Visual Studio 2015) using the Domino v1.2 COM library for server (IBM Lotus Notes/Domino 9.0.1)

    I'm having issues with extracting the tables in a rich text TXDocReason item - here's what I'm doing:

    - extract a document from a database
    - extract TXDocReason item into a NotesRichTextItem
    - create a NotesRichTextNavigator using the rich text item above
    - Use NotesRichTextNavigator.FindFirstElement and NotesRichTextNavigator.FindNextElement to look for RTELEM_TYPE_TABLE elements
    - Check if any table elements found to NotesRichTextTable objects (The table exists for sure!!!)

    I'm encountering a problems that the code below don't return any table inside TXDocReason.

    //------initialization code----
    NotesDocument doc = docView.GetFirstDocument();
    Array itemArray = (System.Array)doc.Items;
    for (int i= 0; i< i.Length; i++)
    {
    NotesItem notesItem = (NotesItem)itemArray.GetValue(i);
    if (name != "TXDocReason") continue;
    NotesRichTextItem richTextItem = (NotesRichTextItem)notesItem;
    NotesRichTextNavigator rtnav = richTextItem.CreateNavigator();
    if (rtnav.FindFirstElement(RT_ELEM.RTELEM_TYPE_TABLE))
    {
    //------read table----
    while (rtnav.FindNextElement(RT_ELEM.RTELEM_TYPE_TABLE))
    {
    //------read table----
    }
    }
    }

    I can retrieve all other elements (RTELEM_TYPE_DOCLINK, RTELEM_TYPE_FILEATTACHMENT, RTELEM_TYPE_SECTION etc.) except the tables. The count of the tables inside RTF is always zero.

    What I doing wrong? How can I extract a table and its cell?

    Any ideas?

    Regards Primoz
     
    Primoz Kosir, Jun 26, 2017
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. romi

    C++ (COM) Toolkit for Domino

    romi, Aug 23, 2004, in forum: Lotus Notes Administration
    Replies:
    0
    Views:
    271
  2. romi

    C++ COM Toolkit for Domino

    romi, Aug 23, 2004, in forum: Lotus Notes Technical Queries
    Replies:
    0
    Views:
    273
  3. romi

    C++ (COM) Toolkit for Domino

    romi, Aug 23, 2004, in forum: Lotus Notes Technical Queries
    Replies:
    0
    Views:
    303
  4. romi

    C++ (COM) Toolkit for Domino

    romi, Aug 23, 2004, in forum: Lotus Notes General Discussion
    Replies:
    0
    Views:
    316
  5. Rupesh
    Replies:
    0
    Views:
    345
    Rupesh
    Mar 22, 2005
  6. Preeti Singh

    Reading domino server’ mailbox using C#

    Preeti Singh, Jul 18, 2009, in forum: Lotus Notes General Discussion
    Replies:
    0
    Views:
    440
    Preeti Singh
    Jul 18, 2009
  7. romi

    C++ (COM) Toolkit for Domino

    romi, Aug 23, 2004, in forum: Lotus Notes Programming
    Replies:
    0
    Views:
    278
  8. Iain Wilson

    Problems reading records via Notes SQL Driver

    Iain Wilson, Jan 12, 2005, in forum: Lotus Notes Programming
    Replies:
    1
    Views:
    363
    swalch@proposion.com
    Feb 9, 2005
Loading...