Hi,
How can we find the style and content of textbox via Aspose Words.
Regards,
Divesh Salian
Hi,
How can we find the style and content of textbox via Aspose Words.
Regards,
Divesh Salian
Hi Divesh,
<span style=“font-size:10.0pt;
font-family:“Courier New”;color:#2B91AF;mso-font-kerning:0pt;mso-ansi-language:
PL;mso-no-proof:yes”>Document<span style=“font-size:10.0pt;font-family:
“Courier New”;mso-font-kerning:0pt;mso-ansi-language:PL;mso-no-proof:yes”> doc
= new Document(MyDir
foreach (Shape shp in doc.GetChildNodes(NodeType.Shape, true))
{
// iterate through each Paragraph node of Shape
foreach (Paragraph para in shp.GetChildNodes(NodeType.Paragraph, true))
{
//Get text of Paragraph
String txt = para.ToString(SaveFormat.Text);
Style style = para.ParagraphFormat.Style;
String StyleName = style.Name;
}
}
Document doc = new Document(MyDir + "19439_GraphicsInsideTextBo.doc");
foreach (Shape shp in doc.GetChildNodes(NodeType.Shape, true))
{
// iterate through each Run node of Shape
foreach (Run run in shp.GetChildNodes(NodeType.Run, true))
{
//Get text of Run
String txt = run.Text;
//Get font name
String fontname = run.Font.Name;
//Get font size
double size = run.Font.Size;
}
}
Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.