Ordinarily, with early binding, you'd use something like:
Code:
Dim wdApp As Word.Application, bStrt As Boolean
On Error Resume Next
bStrt = False ' Flag to record if we start Word, so we can close it later.
Set wdApp = GetObject(, "Word.Application")
'Start Word if it isn't running
If wdApp Is Nothing Then
Set wdApp = CreateObject("Word.Application")
If wdApp Is Nothing Then
MsgBox "Can't start Word.", vbExclamation
Exit Sub
End If
' Record that we've started Word, so we can terminate it later.
bStrt = True
End If
On Error GoTo 0
wdApp.Visible = True
With late binding, you'd replace:
Dim wdApp As Word.Application
with:
Dim wdApp As Object