Default Paragraph Style RRS feed

  • Question

  • Hi,

    I would like to find out what the style is of each paragraph in a Word doc.

    Currently I am doing this by: 

    StringValue style = p.ParagraphProperties.ParagraphStyleId.Val;

    However I have noticed that sometimes a paragraph which is simply text (not a header for example) will not have a style. Why is this? Shouldn't it have the style of "Normal", or is it safe to assume that if it has no style then it is the "Normal" style.

    Also does anyone know if it is possible to pull out which StyleSet was used in the doc? 



    Wednesday, July 11, 2012 2:15 PM


  • Hi Smithys,

    Thanks for posting in the MSDN Forum.

    It's based on my experience that styledefinitionpart is not a option part of a docx document. So it can be omitted at some where.

    Have a good day,


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, July 12, 2012 4:49 AM