Toolbars not showing when automating Word

Article contributed by Ibby

There is a specific situation, when automating Word, when the Word application displays without the toolbars. This occurs if, in your code, you maximize the Word application before making it visible ie:

Dim oWord As Word.Application

Set oWord = New Word.Application

oWord.WindowState = wdWindowStateMaximize
oWord.Visible = True

Set oWord = Nothing

To get around this, make Word visible before you maximize it, ie:

Dim oWord As Word.Application

Set oWord = New Word.Application

oWord.Visible = True
oWord.WindowState = wdWindowStateMaximize

Set oWord = Nothing