none
Programmatically hide styles RRS feed

  • Question

  • I've written a macro to convert a .doc file to a .docx file.  The list of styles ends up quite large.  I've got a routine that deletes all non-built-in styles that are not in use.  However, the list of styles the user can see is still much too long.  How can I programmatically hide the styles I don't want the user to see?  I've tried recording Manage Styles > Recommend > Hide, but, of course, no hint.  I see a modifier for style.UnhideWhenUsed, but no Hide.

    Thanks.

    Monday, February 27, 2012 6:55 AM

Answers

  • Does this simular thread help you achieving your goal:

    http://www.wordbanter.com/showthread.php?t=104344

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Please vote an answer helpful if they helped. Please mark an answer as an answer when your question is being answered.

    • Marked as answer by orlandp Tuesday, February 28, 2012 7:26 PM
    • Unmarked as answer by orlandp Tuesday, February 28, 2012 7:26 PM
    • Marked as answer by orlandp Tuesday, February 28, 2012 7:27 PM
    Tuesday, February 28, 2012 12:30 AM

All replies

  • Does this simular thread help you achieving your goal:

    http://www.wordbanter.com/showthread.php?t=104344

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Please vote an answer helpful if they helped. Please mark an answer as an answer when your question is being answered.

    • Marked as answer by orlandp Tuesday, February 28, 2012 7:26 PM
    • Unmarked as answer by orlandp Tuesday, February 28, 2012 7:26 PM
    • Marked as answer by orlandp Tuesday, February 28, 2012 7:27 PM
    Tuesday, February 28, 2012 12:30 AM
  • It worked.  Added the line ActiveDocument.FormattingShowfilter = wdShowFilterFormattingRecommended

    Thank you.

    Tuesday, February 28, 2012 7:28 PM