Mac keyboard shortcut to open recently closed pdf file on preview Lately, preview on Mac is not saving all the pdf highlights (seen some discussion online about this with no solution yet). I highlight quite a bit of pdfs regularly. The one solution, although extremely inefficient, I found is to save and close the file regularly after 1 or 2 new highlights and open it again. Even with this, unfortunately, the highlights are not saved properly 10 to 20% of the time. Anything more than 2 highlight changes, I am certain they all are not saved 90% of the time.
My question is if there is a keyboard shortcut to open a recently closed preview file? It's a pain to right-click preview every time and open the just-closed file from the list? Any ideas to avoid this problem with preview is also very welcome. Thanks in advance!
My question is if there is a keyboard shortcut to open a recently closed preview file?

The following was tested in macOS Catalina 10.15.6 and worked for me while Preview has focus. (No third-party applications needed.)
If you just want to open the most recently closed document in Preview, then the following example AppleScript code used in a Run AppleScript action in an Automator Service/Quick Action and assigned a keyboard shortcut in System Preferences &gt; Keyboard &gt; Shortcuts &gt; Services can do it.

In the Run AppleScript action in the Automator Service/Quick Action, replace the default AppleScript code with the following example AppleScript code:

tell application &quot;System Events&quot; to ¬
    click first menu item of ¬
        menu 1 of menu item &quot;Open Recent&quot; of ¬
        menu 1 of menu bar item &quot;File&quot; of ¬
        menu bar 1 of application process &quot;Preview&quot;



If you want to choose from the Open Recent menu in Preview, then the following example AppleScript code used in a Run AppleScript action in an Automator Service/Quick Action workflow and assigned a keyboard shortcut in System Preferences &gt; Keyboard &gt; Shortcuts &gt; Services can do it.

In the Run AppleScript action in the Automator Service/Quick Action, replace the default AppleScript code with the following example AppleScript code:

tell application &quot;System Events&quot; to ¬
    set OpenRecentMenuList to ¬
        get name of menu items of ¬
            menu 1 of menu item &quot;Open Recent&quot; of ¬
            menu 1 of menu bar item &quot;File&quot; of ¬
            menu bar 1 of application process &quot;Preview&quot;

if the number of items in OpenRecentMenuList is greater than 2 then
    set OpenRecentList to items 1 thru -3 of OpenRecentMenuList
else
    display dialog &quot;The Open Recent menu is empty.&quot; buttons {&quot;OK&quot;} default button 1
    return
end if

set menuItem to (choose from list OpenRecentList) as string

if menuItem is &quot;false&quot; then return

tell application &quot;System Events&quot; to ¬
    click menu item menuItem of ¬
        menu 1 of menu item &quot;Open Recent&quot; of ¬
        menu 1 of menu bar item &quot;File&quot; of ¬
        menu bar 1 of application process &quot;Preview&quot;



I assigned the following keyboard shortcut to the Automator Service/Quick Action in: System Preferences &gt; Keyboard &gt; Shortcuts &gt; Services


Note: The usual security caveats apply. Permissions will need to be granted as prompted and or required in: System Preferences &gt; Security &amp; Privacy &gt; Privacy &gt;

The example AppleScript code is just that and does not contain any error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted.