Style pane customization

F

fisch4bill

Can anyone tell me how to programmatically adjust/expand the

"Application.TaskPanes.Item(wdTaskPaneFormatting).Visible = True"

procedure to force the showing of Heading 2 & Heading 3 in the task pane. I
can get the pane itself to automatically show, and I can programmatically
adjust the characteristics of the two styles to what I need them to be, but,
I can't seem to find any code to manage the stylesthat display in the pane
like I can manually; specifically to change the "Hide until used" switch to
"Show". I'm working on a rather large project of nearly 3500 documents that
need to be standardized and it's getting really old having to manually do
this every time I open a document. I'm doing this at work and I think there
are some network-access-priviledge issues that prevent me from simply saving
the changes to my NORMAL.dot template as I think I could do at home.

I'm pretty familiar with VBA in Excel, and have received much awesome help
from the Excel gurus. I'm just beginning my foray into Word macros, and
hoping that the Word experts are just as prolific and helpful.

TIA for any assistance
Bill
 
F

Fumei2 via OfficeKB.com

Unfortunately what little of TaskPanes that is exposed to VBA is, IMO, a bit
weird.

Sub ShowAllStyles()
ActiveDocument.FormattingShowFilter = wdShowFilterStylesAll
Application.TaskPanes.Item(wdTaskPaneFormatting).Visible = True
StylesAndFormattingRefresh
End Sub



Public Sub StylesAndFormattingRefresh()
SendKeys "{Enter}"
Dialogs(wdDialogFormatStylesCustom).Execute
End Sub

will display the TaskPanes with all Styles showing.

You may also want to look at:

http://word.mvps.org/FAQS/MacrosVBA/TaskPanesReferenceContentBody.htm#_Toc82745202
 
F

fisch4bill

Thank you very much for the quick and appropriate response, this is exactly
what I needed. I was sure there would be a way, I just hadn't found it yet.
Thanks again.

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top