0

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

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by cguan_77
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.