Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Nichole Knight   on Feb 15 In MS Office Category.

  
Question Answered By: Aberto Rossi   on Feb 15

I've used several variations of 'Shell".
You should be able to use:

WordFile = "C:\temp\SampleFile.doc"
WID = Shell("C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE " &
WordFile, 1)

In cases where I want to Leave Word running, but open/close multiple Word files,
I've used:

WID = Shell("C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE ", 1)
Application.Wait (Now + TimeValue("0:00:03")) 'this added to ensure Word is
started before opening  files
Set wrd = GetObject(, "Word.Application")
'set up loop
WordFile = "C\temp\SampleFile.doc"
wrd.Documents.Open WordFile
wrd.Documents.Close
'close loop
wrd.quit

In this case, you would have to determine which application is to run  based on
the file  extension.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Opening non-Office file from Excel Or get search suggestion and latest updates.


Tagged: