Open Word from Excel

J

JT

In my workbook, I have one sheet with high level instructions for the users.
On that sheet. there is a button to open a Word Document with more detailed
instructions for the user to read. It works fairly well and opens quickly.

The issue is once the Word document is open, it is not useable, almost like
it is frozen for 5 to 10 seconds. Once the initial "frozen" period is over,
the user is able to scroll or move through the document.

The code for this button is below:

Dim WApp As Word.Application
Dim WDoc As Word.Document
Set WApp = CreateObject("Word.Application")

Dim ThisPath As String
Dim ThisFile As String

ThisPath = "\\Vs999\public\Accounts\Originals\"
ThisFile = "Instructions - Admin Office.doc"

Set WDoc = WApp.Documents.Open(ThisPath & ThisFile)

WApp.Visible = True

Set WApp = Nothing
Set WDoc = Nothing

Any suggestions or help you can provide to resolve / reduce that waiting
period would be greatly resolved. This the first time I have tried to open a
Word document from Excel. Thanks again......
 
T

Tom Ogilvy

I haven't had that type of experience - although opening anything via
automation incurs some overhead as the application is stared. If you open
the document manually, does it open instantly?

things I could think of would be Norton Anti-Virus running a scan of the
document.

or the document is large and/or has links that have to be updated - so it
naturally takes a while to open.

From your description, it appears the document is visible on the screen
during this period, so I assume you are not talking about the overhead of
starting up word.
 
N

NickHK

Whilst it may not have any effect on the freeze, as you only require the
document to be shown, drop the COM stuff.

Dim ThisPath As String
Dim ThisFile As String

ThisPath = "\\Vs999\public\Accounts\Originals\"
ThisFile = "Instructions - Admin Office.doc"

ThisWorkbook.FollowHyperlink ThisPath & ThisFile, , True

NickHK
 

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