Another Word <-> IE problem

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top