Hello All,
I have a requirement where I need to fetch all the objects(from shared project) names in table format and it should be in word document. With the object name I also want to fetch all the child nodes of objects.
For ex: I have Form1 in my project, form will contain methods, datasources as form's sub nodes, also method subnode will contains multiple methods. So all these methods I want in tabular format and in word document.
I have written code to create word document and print the list of all sub-sub nodes present under object. Problem which I am facing right now is, it is showing all object's sun node in one table. Ideally a table should get finish with the object's last sun node but it is not happening.
// Initialize Word object and document wordApplication = new COM("Word.Application"); wordDocuments = wordApplication.documents(); wordDocuments.add(); wordDocument = wordDocuments.item(1); wordSelection = wordApplication.selection(); wordRange = wordSelection.range(); wordTables = wordSelection.tables(); wordTable = wordTables.add(wordRange, 1, 2);
Does any one can guide me how to do end of a wordTable which is created in above code. I will need to create multiple tables in word doc, so it is necessary to close the earlier one otherwise it will create nested tables.
Thanks in advance!!!