I am not able to create object for word doc,this is the code i wrote,the object sets to nothing,when i run the code

If blnChkFirst = False Then
Set owordapp = CreateObject("Word.Applicatiion")
Else
Set owordapp = GetObject(, "Word.Applicatiion")
If Err.Number <> 0 Then
Set owordapp = CreateObject("Word.Applicatiion")
owordapp.Visible = True
Set odoc = owordapp.Documents.Add
owordapp.Documents.Add
owordapp.WindowState = wdWindowStateNormal
Err.Clear
End If
End If

plz do help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.