Wrong navigate to First table

Hi there,

I want to navigate to first table using this code:

// glossary table beauty contest
Aspose.Words.Tables.Table table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, 0, true);
table.SetShading(TextureIndex.TextureSolid, Color.LightGreen, Color.Empty);

Unfortunately, not the table Glossary is navigated, but the header Sectara.
How to workaround? thanks

DISP SRA (41).docx (269.4 KB)

regards

@ibox Please try using the following code:

Aspose.Words.Tables.Table table = doc.FirstSection.Body.Tables[0];

Thank you, Sir
It works, but using section 2:

 Aspose.Words.Tables.Table table = (Aspose.Words.Tables.Table)doc.Sections[1].GetChild(NodeType.Table, 0, true);

regards

1 Like