I have been working on a macro to open a word document and write information to it. I am finding that for some reason, the word document is being opened before the macro even starts!

For example:

Code:
Sub ExampleCode()
msgbox "beginning of macro"

.
.
.
wDoc ="[file path]"
Dim objWord As Object
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open(wDoc)
objWord.Visible = True
objDoc.Application.Activate
objWord.ActiveWindow.View.ReadingLayout = False
When running the macro, the word document will open first, then I will get the message box. Any help?