Command line in the RunApp action

  • Thread starter Thread starter Jess
  • Start date Start date
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??
 
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
 
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"
 
Back
Top