You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with documents, it's common to need to find a table that contains a specific bookmark. This can become complex when dealing with nested tables, as a bookmark could be situated within multiple layers of tables. This KB article outlines methods to find either the innermost or outermost table containing a given bookmark, catering to scenarios involving nested tables.
20
+
When working with documents, it's a common requirement to find a table that contains a specific bookmark. This can become complex when dealing with nested tables, as a bookmark could be situated within multiple layers of tables. This KB article outlines methods to find either the innermost or outermost table containing a given bookmark, catering to scenarios involving nested tables.
21
21
22
22
This KB article also answers the following questions:
23
23
- How can I find a table containing a specific bookmark in a document?
@@ -26,9 +26,13 @@ This KB article also answers the following questions:
26
26
27
27
## Solution
28
28
29
-
To find a table containing a specific bookmark, especially in documents with nested tables, you can use the following two methods: `GetInnermostTableContainingBookmark` and `GetOutermostTableContainingBookmark`. These methods help in identifying either the innermost or outermost table that contains the bookmark, depending on the nesting level of tables in the document.
29
+
To find a table containing a specific bookmark, especially in documents with nested tables, you can use the following custom methods: `GetInnermostTableContainingBookmark` and `GetOutermostTableContainingBookmark`. These methods help in identifying either the innermost or outermost table that contains the bookmark, depending on the nesting level of tables in the document.
30
30
31
31
1.**Load the document and identify the bookmark:**
32
+
2.**Define methods to get the innermost and outermost tables containing the bookmark:**
33
+
-**GetInnermostTableContainingBookmark:**
34
+
-**GetOutermostTableContainingBookmark:**
35
+
3.**Retrieve the innermost and outermost tables containing the bookmark (as needed):**
32
36
33
37
```csharp
34
38
RadFlowDocumentdocument;
@@ -40,13 +44,10 @@ using (Stream input = File.OpenRead("input.docx"))
If the bookmark is in a single table, both methods will yield the same result. These methods ensure you can accurately find the table containing a specific bookmark, regardless of the complexity of the document's table structure.
0 commit comments