Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a word like CA++ and Ca++. Here the ++ are superscript,Here i can't write in superscripts.

My Problem is how can I find the font of the word's Super script is true or false, using vb.net. Am using vs2010 and vb.net

I tried like this
VB
If (Doc.Application.Selection.Range.Characters(3).Font.Superscript = True AndAlso Doc.Application.Selection.Characters(4).Font.Superscript = True) Then
    wsel.SetRange(wsel.Start + StartChar - 1, wsel.Start + EndChar)
    wsel.Font.Superscript = True
    Document.Selection.MoveRight(Unit:=WdUnits.wdCharacter, Count:=1)
 ElseIf (Document.Application.Selection.Text.ToUpper() = "CA++") Then
    wsel.Font.Superscript = False
 End If


Sugget me to get a solution. Thanks in advance
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900