Open events takes forever

G

Guy Cohen

Hi all.
I use VB6 code to change DocVariables inside a Word document.

I use:
Line1:Dim WordApp As Object
Line2:Dim WordDoc As Object
Line3:Set WordApp = CreateObject("Word.Application")
Line4:Set WordDoc = WordApp.Documents.Open(strFileName, , True)

The application hangs. When I use a breakpoint on line 4 - I reach there
after a short time.
I guess line 4 causes the problem.
strFileName contains a filename on my HD!!!

Please advise
Guy
 
H

Harold

Usually, if Word hangs opening a document, it indicates that there is
something wrong with the document or Word is attempting to load an attached
template or link that is not available.

On the other hand if Word is hanging when starting then the issue may be the
Normal.dot, an installed template addin, ComAddin or a problem with one of 2
keys in the Registry,
Word is slow to start, print, or load documents
http://support.microsoft.com/default.aspx?scid=kb;en-us;280821&Product=wrd20

How to troubleshoot damaged Word 2000 documents
http://support.microsoft.com/default.aspx?kbid=211634
 

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