Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Word from Excel
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...... -- JT |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Word from Excel
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. -- Regards, Tom Ogilvy "JT" wrote: 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...... -- JT |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Word from Excel
JT -
I think you might be mixing early and late binding, which could be causing some problems. You might want to take a look at http://word.mvps.org/FAQs/InterDev/E...ateBinding.htm and http://word.mvps.org/FAQs/InterDev/C...WordFromXL.htm Ed On Apr 18, 9:24 am, JT wrote: 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...... -- JT |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Word from Excel
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 "JT" wrote in message ... 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...... -- JT |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Hyperlink doesn't open Word doc the same way as Word does | Excel Discussion (Misc queries) | |||
How to open a word doc while in Excel | Excel Discussion (Misc queries) | |||
open word doc from within excel with VBA | Excel Programming | |||
Graph Excel Selection, Open Word File, Embed Graph Into Word | Excel Programming | |||
In Excel VBA, open .txt with Word? | Excel Programming |