vesan
vesan

Reputation: 3369

Word interop - hiding styles

I'm creating a new Style using Word interop (in Word 2013). It works fine, but I'd like to hide the style from the user. Basically, I'm trying to do the same thing you can do manually when you go to the Styles dialog -> Manage Styles -> Recommended tab and click the Hide button:

enter image description here

Then, the style description looks like this:

Font: (Default) +Headings (Calibri Light), 12 pt, Bold, Space
Before:  6 pt, Style: Hidden, Priority: 100
Based on: Normal
Following style: Normal

Is this possible using Word interop? I can change the Priority property of the style (using the Priority property of the .NET interface), but I can't seem to add the Hidden property. I tried using the "reserved for internal use" Hidden property of the style, but that hides the style completely (even from the Manage Styles window), which I don't want. I also tried playing around with the UnhideWhenUsed and Visibility properties to no avail.

Any ideas are much appreciated.

Upvotes: 1

Views: 472

Answers (1)

Loathing
Loathing

Reputation: 5281

It looks like it's a backwards property, try setting Visibility = true.

Upvotes: 1

Related Questions