Using a command line switch to open the most recently used document
You can open Word and have the most recently used (MRU) file opened
automatically by clicking on the Windows Start button, selecting Run,
and typing:
winword.exe /mFile1.
The /m switch normally means “run a macro called [whatever
follows the m]”, but it can also be used to run almost any WordBasic
command, and “File1” is the WordBasic command to open the MRU
file. The only WordBasic commands which don't appear to work when
following the /m switch are those which rely on a document already being open.
Alternatively, you can create a new shortcut to Word; right-click on it and select
Properties; and on the Shortcut tab, where it says “Target”,
add /mFile1 to the end of the path, so it looks
like this:
"C:\Program Files\Microsoft
Office\Office\WINWORD.EXE" /mFile1
Make sure that the path of Winword.exe is still set to the folder where
Office is installed.
You can now use the new shortcut when you want to start Word with the most recently used file and your usual shortcut when you don't.
However, note that using the /m switch prevents any AutoExec macros you
may have from running. Also, if the MRU file is inaccessible or has
been deleted or renamed, this method won't find the most recently used
file that does exist; it will just create a blank document. If you
want it to open the most recently used valid file, or if you don't
want to disable your AutoExec macros, you'll need to use a macro.
|