Quote:
Originally Posted by Guessed
I did get an error initially on 365 but then it worked.
I think if you add an
On Error Resume Next
and then re-enable the TaskPanes line then I expect either one or both will work and if it errors then the second one gets it done anyway.
|
Andrew,
Thank you for the suggestion.
SpeakEasy, in Eileen's Lounge, suggested:
ActiveDocument.CommandBars.ExecuteMso "StylesPane"
Nothing with the Styles Pane will work in AutoExec because there is no document open and Word won't display the Styles Pane without an open document. Once a document is open and the StylesPane has been activated in some manner, apparently both visible and width work.