Last post Nov 11, 2014 01:38 AM by N1ZAM
Nov 11, 2014 01:38 AM|N1ZAM|LINK
I am trying to get the font size of the font in a word document and for some weird reason it give font size as Font Size = 9999999. What is actually going wrong?
float FontSize = 0;
FontSize = paragraph.Range.Font.Size;
And I am printing them on the web form.
Further i am trying to capture paragraph properties as follows
doc.paraFontSize = docs.Paragraphs[i + 1].Range.Font.Size;
doc.paraIsBold = docs.Paragraphs[i + 1].Range.Font.Bold.Equals(1);
doc.paraStyle = docs.Paragraphs[i + 1].get_Style();
doc.styleName = doc.paraStyle.NameLocal;
and later in the code check it with the paragraph after that some thing like this
if (docs.Paragraphs[j].Range.Text != string.Empty && doc_style.paraFontSize == docs.Paragraphs[j].Range.Font.Size && doc_style.paraIsBold == docs.Paragraphs[j].Range.Font.Bold.Equals(1) && doc_style.styleName == docs.Paragraphs[j].get_Style().NameLocal)
Is this valid?