G
gregor2324
Hi everyone
I use the following code to create new document
On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number <> 0 Then
'*** It's not loaded - create a new instance.
Set oWord = CreateObject("Word.Application")
End If
oWord.Visible=true
If oWord.PrintPreview = True Then
oWord.ActiveDocument.ClosePrintPreview
End If
oWord.Documents.Add
It works but when any word document is embedded into IE the last Add
method fails. What can I do?
Thanks in advance.
I use the following code to create new document
On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number <> 0 Then
'*** It's not loaded - create a new instance.
Set oWord = CreateObject("Word.Application")
End If
oWord.Visible=true
If oWord.PrintPreview = True Then
oWord.ActiveDocument.ClosePrintPreview
End If
oWord.Documents.Add
It works but when any word document is embedded into IE the last Add
method fails. What can I do?
Thanks in advance.