Script to keep last folder path in retrievable

Greetings

Is this feasible from a scripting perspective?
To have a facility where the current lister folder path is stored to a global variable. Call this variable Global_Var_Path
I have read of talk of glbal variable somewhere. I presume this would be a variable that has a lifetime the same as that of Opus itself?
I have also read of environment variables...Not sure if this was a reference to windows environment variables or not. Thinking about it if windows env vars were used that would facilitate retrieval within other applications which would be useful.
I also see a method known as OnActivateLister which might be relevant in a solution.
I would be interested in retrieving the variable with a keystroke.

To take a step back this is what I am interested in doing. I am frequently in a an application such as word, excel, etc and I want to save the current document in a folder location which I most recently visited in DO. So I want what could be considered a dedicated clipboard which is automatically updated with the most recent folder location that I visited in DO. And an easy shortcut key to reteive.

Many thanks for any replies or suggestions.

Have a look at tools like these, which add features to the File Open dialogs, including being able to jump to the path Opus is showing:

I don't know if either/both will work with the non-standard File Open dialogs in Microsoft Office (assuming that is still the case) but they might.

Thanks @Leo. I will look into these...