开发者

Open XML - Using stylePaneFormatFilter attribute to show "Normal" style along with the custom styles and clear formatting option

开发者 https://www.devze.com 2023-03-02 20:38 出处:网络
I want to make changes programatically to the Word 2007 document so that It ONLY displays the \"Normal\" style, all the custom styles which user created and the \"Clear formatting\" option in the styl

I want to make changes programatically to the Word 2007 document so that It ONLY displays the "Normal" style, all the custom styles which user created and the "Clear formatting" option in the style pane.

Now I able to show the custom styles and the clear formatting 开发者_JS百科option but not the Normal style.

From :- http://msdn.microsoft.com/fr-fr/library/documentformat.openxml.wordprocessing.stylepaneformatfilter.aspx

0x1000 - Specifies that a style should be present which removes all formatting and styles from text. 0x0002 - Specifies that only styles with the customStyle attribute should be displayed in the list of document styles.

I sum the hex values above to get 1002 to show both Custom Styles and the Clear Formatting. But I dont see a way to show the "Normal" style as thats is built in style. However, when you apply clear formatting on any paragraph, by default word applied Normal style. That said, users want to see "Normal" style. :-(

Is there a way to do this?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号