I would like to create a tool to copy specifed tables (RTELEM_TYPE_TABLE) from a base document into new documents. For examle the base document contains 4 tables, and I would like to create 4 document, and copy 1-1 table into each document.
Is this possible? (I hope yes )
I can find the tables with the navigator which I would like to copy, but I can’t insert it into the new document. Always shows “Type mismatch” error.
Could someone please help me, how to copy a specifed table into a document?
I know (or i think i know) why the Type Mismatch error occures. When I position the Navigator (nav) to the specified RTELEM_TYPE_TABLE and then rtt = nav.GetElement, the rtt variable contains a RichTextTable object (the table i would like to copy into a new document). I can’t insert it into a new doc because the CopyItem and CopyItemToDocument methods are for NotesItems and not for RichTextTables.
This is my main problem, and I could not found anything to solve this problem.
Is there any way to convert the object, or to insert the “rtt” (RichTextTable) variable into a document? ( RichTextItem )
Manually - yes. Depends on situation which you have.
Or programically - by creating 4 copies of base RT item, then removing in each RT item 3 (“don’t needed”) tables by: Call notesRichTextTable.Remove.
So I must create 4 copies from the base document, then remove the tables which are not needed and leave the 1 table in each document.
I’ll try this, thx.
My only concern is, what if the size of the tables are big (20-50-100MB). Won’t this slow down things? (if I don’t have other choises, then this will be done)
I don’t know what is your bussiness situation in that case.
What is base document? Is it something like configuration document?
Why do you have in base document 4 tables in one RT and you need to copy one table to one RT?
Question form my first post is if it is possible to split tables to 4 RT items in base document - so I mean to process that operation only one time (yes, it may be slow) not every time you will create new document from base document.
The situation is a bit complicated, but I’ll try to explain it.
My collegaues are updating many many tables (more than 4) in a document, inserting files, sections, pictures, etc. into it manually. When one of the tables is ready, I have to copy the completed table into a new document, and save it in the TR, so the new document contains only the completed table.
To make things worse, in the base document, the tables are in sections (when the table is ready, the title of the section is changed so the tool can find the completed tables) and then I have to copy the table in the section into a new document.
At the moment, I can locate the table which must be copied, so the only problem is how to copy the selected table into the new doc automatically.
I’ve found DXLExporter, but don’t know what is it exactly. Can it be used for this?