![]() |
|
#7
|
|||
|
|||
|
My Add-In at
Navigation Pane Settings at Word Startup does have code to display the Styles Pane but not change the width of that pane. The Add-In is to let a user set preferences for all documents. Again Application.TaskPanes(wdTaskPanesFormatting).Visib le = True will display the Styles Pane. If you add the following to your templates where you want to force display of the Styles and Navigation Panes it should work: Code:
Sub AutoNew()
' Charles Kenyon 2023-06-03
' Display Navigation Pane and Styles Pane upon creation of new document based on this template
' https://www.msofficeforums.com/175437-post7.html
'
With Application.CommandBars("Navigation")
.Width = 250 ' set to whatevery you want - the default seems wide at 400
.Visible = True
.Position = msoBarLeft
End With
Application.TaskPanes(wdTaskPaneFormatting).Visible = True
Application.CommandBars("Styles").Position = msoBarRight
End Sub
Code:
Sub AutoOpen()
Application.Run AutoNew
End Sub
Code:
Sub AutoOpen()
' Charles Kenyon 2023-06-03
' Display Navigation Pane and Styles Pane upon opening this document
With Application.CommandBars("Navigation")
.Width = 250 ' set to whatevery you want - the default seems wide at 400
.Visible = True
.Position = msoBarLeft
End With
Application.TaskPanes(wdTaskPaneFormatting).Visible = True
Application.CommandBars("Styles").Position = msoBarRight
End Sub
AFAIK, there is currently no way to change the width of the Styles Pane using vba. I believe this changed with Word 2013. The TaskPanes collection does not have width and Word does not pay any attention to it in CommandBars("Styles").Width. Last edited by Charles Kenyon; 06-04-2023 at 06:46 PM. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Quick Styles display changed - just an alert | Charles Kenyon | Word | 2 | 11-22-2021 03:04 PM |
| Unable to connect Styles to the Navigation column. | Balliol | Word | 5 | 08-04-2019 04:25 AM |
| Using the Navigation Pane with modified styles | susandickerson | Word | 3 | 07-10-2014 08:35 PM |
| How to Customize Outlook Panes | Steve_B | Outlook | 0 | 07-08-2014 09:05 AM |
| Can't Display "Recently Used Styles" in Styles Pane | mwildem | Word | 2 | 05-23-2012 01:42 PM |