Command line in the RunApp action

J

Jess

I think i'm a bit out of my depth here!
I want to use the macro to open a Word template document.
I've selected the RunApp action, but what should i type in
the command line?

I've been sucessful in getting word to open by entering
="c:\Program Files\Microsoft Office\Office\winword.exe"
and have tried both
="c:\Program Files\Microsoft Office\Office\winword.exe
C:\Documents and Settings\Administrator\Application
Data\Microsoft\Templates\Despatch note.dot"
and
="c:\Program Files\Microsoft Office\Office\winword.exe
C:\Documents and Settings\Administrator\My Documents\order
book\Despatch note.dot"
to get it to open the template (which is also located in
my documents), as well as various other combinations!

what's missing??
 
S

StCyrM

Hi Jess:

Microsoft article Q109705, which partly read as follows:

Microsoft Access 7.0 and 97 support long file names. If you
are using long file names that contain spaces you will need to
concatenate double quotation marks around what you are trying to run
or open as shown in the following example:

RunApp
-------------------------------------------------------------
Command Line: ="c:\msoffice\winword\winword.exe " & Chr(34) & _
"c:\my documents\mydoc" & ".doc" & Chr(34)

Hope this helps

Maurice St-Cyr
 
S

Steve Schapel

Jess,

You don't need the = sign, and you need to sparate the two sections of
the command line (i.e. the application programme file and the document).
So...
"C:\Program Files\Microsoft Office\Office\winword.exe" "C:\Documents and
Settings\Administrator\Application Data\Microsoft\Templates\Despatch
note.dot"
 

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

Similar Threads

Locating winword.exe for RunApp Macro 1
RunApp 2
Variable RunApp 4
RunApp question 2
Open Word 2007 docx in Access 2007 - error 1
RunApp 1
Switching to Word from Access: path to winword.exe 8
runapp problems 2

Top