Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    TaskPane / Visible (Word 2007)

    The VBA command to close the ApplyStyles task pane doesn't seem to function. If I add the toggleButton control to the Ribbon, the same is true: it toggles to visible, but does not hide with the subsequent click. The "sister" task pane StyleInpsector functions as expected. I've tried CommandBars in place of TaskPanes in the following code, but without success. Is there a secret to this? My guess is that it's a bug, since the built-in toggleButton exhitis similar behavior.

    Application.TaskPanes.Item(wdTaskPaneApplyStyles). Visible = False

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: TaskPane / Visible (Word 2007)

    I don't have Word 2007, so I cannot help you. I just wanted to note that the instruction

    Application.TaskPanes(wdTaskPaneApplyStyles).Visib le = False

    does work correctly in Word 2002.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: TaskPane / Visible (Word 2007)

    Without looking, I would say that wdTaskPaneApplyStyles was not availalbe in versions prior to 2007. (It's a "floating" pane that is an effective replacement for the Style drop-down on the old Formatting toolbar.)

    The line of code which I posted doesn't raise an error; it's just non-functional. When I step through the code, the line appears to execute... but the task pane does not close.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: TaskPane / Visible (Word 2007)

    You're correct, sorry.
    Since wdTaskPaneApplyStyles doesn't exist in Word 2002, it acts the same as wdTaskPaneFormatting = 0.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •