How to find the string in the whole document contains H1 to H3 tag available or not

how to find the string in the whole document contains H1 to H3 tag available or not

It must be any string .but atleast any one of the string contains h1,h2 and h3 tag.

kindly provide in c# code

Kindly help me on this

@siva1950 Paragraphs imported from HTML from <h1>...<h6> tags are paragraphs with the appropriate heading styles applied. So you can simply select the heading paragraphs from your document. For example you can use the following code:

// Define list of styles we are interested in.
StyleIdentifier[] styles = new StyleIdentifier[] { StyleIdentifier.Heading1, StyleIdentifier.Heading2, StyleIdentifier.Heading3 };

// Select the paragraphs.
List<Paragraph> paragraphs = doc.GetChildNodes(NodeType.Paragraph, true).Cast<Paragraph>()
    .Where(p => styles.Any(i => i == p.ParagraphFormat.StyleIdentifier)).ToList();

I have been replacing tag value in word

After Replacing I have been send heading to document builder for TOC

But replacing value contains bullet value After toc generation document get improper alignment i have sample doc reference

1 showing unnecessary in toc.can you give guidelines how to remove that.
only toc should avail

kindly help me on this

@siva1950 It looks like the TOC is inserted into ha heading paragraph, what has numbering, Please try using code like this:

builder.InsertTableOfContents("\\o \"1-3\" \\h \\z \\u");
builder.Writeln();
builder.ParagraphFormat.ClearFormatting();

2 posts were split to a new topic: Add extra one column in existing table

Hi alexey,
Greeting for the day

I Need help that how to find font and color has been used for the string in c#.
and Also
Need help that how to find font and color has been used for the whole word document in c#.

@siva1950 The question is answered here:
https://forum.aspose.com/t/how-to-find-font-and-color-has-been-used-for-the-string/268761