Open Last Document

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Open Last Document

Post by Sundog »

For an earlier version of Word, I had a shortcut on my Desktop that opened the Word document I most recently worked on, the one at the top of the Recently Used documents list. The shortcut target was

Code: Select all

"C:\\MyPathWhatever\winword.exe" mOpenLastDoc
In Word 2010, this shortcut opens a blank page. When looking at the 2010 File > Recent selection, I find listings for Recent Documents and Recent Places, not Recently Used.

Is there an equivalent for mOpenLastDoc in Word 2010?

Ooops, let me try /mOpenLastDoc!

Same result, blank page.
Sundog

User avatar
HansV
Administrator
Posts: 78626
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Open Last Document

Post by HansV »

OpenLastDoc must have been a macro in your Normal.dot:

Code: Select all

Sub OpenLastDoc()
    RecentFiles(1).Open
End Sub
If you re-create this macro in Normal.dotm, it should hopefully make your shortcut work again (with /mOpenLastDoc)
Best wishes,
Hans

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Re: Open Last Document

Post by Sundog »

Thanks, Hans! I completely forgot that I had to create a macro. (Too long ago.) That's what the "/m" is for, right?
Sundog

User avatar
HansV
Administrator
Posts: 78626
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Open Last Document

Post by HansV »

Yes, /mmacroname means run the macro macroname.
Best wishes,
Hans