You were close
Code:
With Application
.TaskPanes(wdTaskPaneFormatting).Visible = True
.CommandBars("Styles").Position = msoBarRight
.CommandBars("Styles").Width = 400
End With
I found the clue to shift to CommandBars here
Keeping the Styles Pane Open by Default (Microsoft Word)
For some hints that explore the vba Task Pane limits, here is another link. Although it appears to have been written in 2004, Word's development tends to move at a glacial pace so it is probably still current.
Word’s Task Panes VBA Reference – Content