checking the style of selected text from a word doc using vb.net RRS feed

  • Question

  • I need to write a code which extracts requried digits from a word file.If the style of those digits is not "anchor",then those digits should be copied in a seperate excel file.

    I dont know what function to use to check the style of the selected range that contains those digits whose style is to be checked.


    The above stmt works.

    But,if i use:

    if rng.Style Is "anchor" then




    end if

    The above code dosent wrks.

    I hv tried many other alternatives for it,but all failed.It alwz shows that text is not in "anchor " style.(i.e. it alwz go in else)

    Plz give me correct wrkn code for it.Its very urgent.Thnks in advance.

    Tuesday, January 17, 2012 9:20 AM