i want to check a word file using vb.net and check that the styles in the document are proper or not.
I have to check for these expressions in word document
a.Verdana + 16 pt + Bold + Red
b.Verdana + 12 pt + Bold + Italic + Blue
c.Verdana + 11 pt + Bold + Italic + Brown
d.Arial + 10 pt + Black
I have tried this,
If objDoc.Range.Font.Name = "Arial" And objDoc.Range.Font.Size = 10 Then
If objDoc.Range.Font.Color = WdColor.wdColorBlack Then
End If
MsgBox("ok")
Else
MsgBox("not ok")
End If
But with this code it shows msgbox "OK" only when the whole word document consist of Arial,10,Black
and shows msgbox "Not Ok" when it consist the above expressions except for the Arial,10,Black
So basically i need help to find out all the expressions in the same word document which consist of all the above expressions/Styles.
Any Help will be really really appreciable.. Plz help me with this still not able to find a solution..