![]() Go to "File" > "Options" > "Customize Ribbon", and check the box next to "Developer". Next, you need to have the Developer tab visible. So, first, you'll need to create an XML file which contains the properties you want to have available, so please look at the appropriate section of Microsoft's walkthrough to see what that looks like 's walkthrough goes about this very differently, using Visual Studio (which is not necessarily required), but it has a good example XML file, so I recommend you take a look at that part of it at least. (cellChild as StructureDocumentTag) Įlse if (cellChild.DocumentObjectType = DocumentObjectType.Paragraph)įoreach (DocumentObject pobj in (cellChild as Paragraph).ChildObjects) If (cellChild.DocumentObjectType = DocumentObjectType.StructureDocumentTag) ![]() (pobj as StructureDocumentTagInline) Įlse if (obj.DocumentObjectType = DocumentObjectType.Table)įoreach (TableRow row in (obj as Table).Rows)įoreach (DocumentObject cellChild in cell.ChildObjects) If (pobj.DocumentObjectType = DocumentObjectType.StructureDocumentTagInline) ![]() If (obj.DocumentObjectType = DocumentObjectType.Paragraph)įoreach (DocumentObject pobj in (obj as Paragraph).ChildObjects) StructureTags structureTags = new StructureTags() įoreach (Section section in document.Sections)įoreach (DocumentObject obj in ) Static StructureTags GetAllTags(Document document) List tagInlines = structureTags.tagInlines Using (Document document = new structureTags = GetAllTags(document) Step 3: Use foreach sentence to get all tags in the Word document. Here, each content control will be identified by tag. Step 2: Create two lists to store tags which are distributed in lines and a table separately. Step 1: Create a new Word document and load the test file. By default, the border and the title of the control do not appear if we don't click the protected section. This article illustrates how to get all controls and their properties including alias, id and tag via Spire.Doc.įirstly, check the test file that contains six content controls distributed in lines and a table. Therefore, it is necessary for developers to get the properties of content controls when dealing content controls at run time. NET Framework, XML elements that are stored in the document, and other data sources. You can bind content controls to database fields, managed objects in the.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |