locked
Show Styles dialog box in Word 2010 RRS feed

  • Question

  • Hi,

    I'm working in a Word 2010 Project with C# and I need show the Style Dialog Box (same as do ctrl-alt-shift-s in Word)

    It's possible?

    Best regards.

     


    Saturday, January 19, 2013 6:36 PM

Answers

  • Make use of the TaskPanes collection (of the Word Application object). The corresponding line of code in VBA would be:
     
    Application.TaskPanes(0).Visible = True

    Stefan Blom, Microsoft Word MVP
    • Marked as answer by hoscarc Monday, January 21, 2013 11:56 AM
    Saturday, January 19, 2013 7:03 PM
  •   wdApp.TaskPanes[Word.WdTaskPanes.wdTaskPaneApplyStyles].Visible = true;


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by hoscarc Monday, January 21, 2013 11:56 AM
    Sunday, January 20, 2013 7:56 AM
  • Cindy, Stefan, Thanks very much!

    Finally the Box I need was:

    Globals.ThisDocument.Application.TaskPanes[Word.WdTaskPanes.wdTaskPaneFormatting].Visible = true;  

    But thanks to you both I could to "play" with the differents TaksPanes untill find that I need. Thanks!

    Best regards

    • Marked as answer by Quist Zhang Monday, January 21, 2013 11:53 AM
    Sunday, January 20, 2013 1:58 PM

All replies

  • Make use of the TaskPanes collection (of the Word Application object). The corresponding line of code in VBA would be:
     
    Application.TaskPanes(0).Visible = True

    Stefan Blom, Microsoft Word MVP
    • Marked as answer by hoscarc Monday, January 21, 2013 11:56 AM
    Saturday, January 19, 2013 7:03 PM
  •   wdApp.TaskPanes[Word.WdTaskPanes.wdTaskPaneApplyStyles].Visible = true;


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by hoscarc Monday, January 21, 2013 11:56 AM
    Sunday, January 20, 2013 7:56 AM
  • Cindy, Stefan, Thanks very much!

    Finally the Box I need was:

    Globals.ThisDocument.Application.TaskPanes[Word.WdTaskPanes.wdTaskPaneFormatting].Visible = true;  

    But thanks to you both I could to "play" with the differents TaksPanes untill find that I need. Thanks!

    Best regards

    • Marked as answer by Quist Zhang Monday, January 21, 2013 11:53 AM
    Sunday, January 20, 2013 1:58 PM
  • You are welcome.

    Stefan Blom, Microsoft Word MVP

    Sunday, January 20, 2013 2:34 PM