Has the Recent Files changed drastically?

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 16789
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Has the Recent Files changed drastically?

Post by ChrisGreaves »

I have now moved to the Win11 Acer, but still running Word2003 until the SSD & RAM arrive.
Each version of Windows, as far back as I can remember (Word97 at least) seems to have a different way of storing Recent Files.
Sure enough my Most-Recenty-Used Word2003 application, written long before MSOffice increased its File list from 9 to, I think 50, needs a new set of file specifications, thus today:-

Code: Select all

    Dim strRoot As String
''''    strRoot = strGetSpecialFolderPath("Recent")' 8997: "GetUsersRecent" contains a hard-coded path "C:\Users\Chris068\AppData\Roaming\Microsoft\Office\Recent"
''''    strRoot = "C:\Users\Chris068\AppData\Roaming\Microsoft\Office\Recent"' 8997: "GetUsersRecent" contains a hard-coded path "C:\Users\Chris068\AppData\Roaming\Microsoft\Office\Recent"
''''    strRoot = strFixPath(Environ("UserProfile")) ' 8997: "GetUsersRecent" contains a hard-coded path "C:\Users\Chris068\AppData\Roaming\Microsoft\Office\Recent"
''''    strRoot = strRoot & "AppData\Roaming\Microsoft\Office\Recent" ' 8997: "GetUsersRecent" contains a hard-coded path "C:\Users\Chris068\AppData\Roaming\Microsoft\Office\Recent"
    strRoot = "C:\Users\cprgr\AppData\Roaming\Microsoft\Windows\Recent"
So far so good.

But the code which follows that definition now blows stack space:-
MRUse01.png
I have a long time tried-and-tested function which should grab file names from the list of recent files:-

Code: Select all

Public Function Filer_GetFolderItems(strAr() As String, strRootPath As String)
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    '
    '   Filer_GetFolderItems loads a strng array with the Fullname of every file in a given folder tree.
    '   The program code is modified from my own Filer modules
    '
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Dim FI As Shell32.FolderItem
    Dim lng As Long
    Dim DicFolder As New Scripting.Dictionary
    With New Shell
        With .NameSpace(strRootPath)
            For Each FI In .Items
                If Not (FI Is Nothing) Then
                    If FI.IsFolder Then ' Recurse down the folder tree
                        Call Filer_GetFolderItems(strAr, strRootPath)
                    Else
                        Debug.Print FI.Name
                        lng = lng + 1
                        DicFolder(lng) = FI.Name
                    End If
                End If
            Next
        End With
    End With
    Call GetASetOfFiles(strRootPath, DicFolder, strAr) 'see what we've got
    Set FI = Nothing
    Set DicFolder = Nothing
    'Sub TESTFiler_GetFolderItems()
    '    Dim strAr() As String
    '    ReDim strAr(0)
    '    Call Filer_GetFolderItems(strAr, "C:\Users\Chris\Recent\", True)
    'End Sub
End Function
and while there may be a bug in this code, that it has worked for versions of Windows since, I think, at least as far back as 2005, leads me to think that this latest Win11 implementation of the Recent List might have changed radically from versions in Win7, WinXP, and perhaps even Win95.

I see recent posts on "Jump Lists" which to me seem like implementation of Windows code that operates on the recent File list as does my MRUse application, except Jump Lists are geared towards filtering the recent files list to a specific application ("right click on the icon ...") whereas MRUse just builds a humongous list of every file in Word2003.

I am not asking for the VBA code to be debugged; that will be my jiob after I have cleared up the format of the *new* **improved** recent files list.

Thanks in Advance for any steering.
Cheers, Chris
You do not have the required permissions to view the files attached to this post.
Fill your face with laughter, then there will be no room for tears.

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

Re: Has the Recent Files changed drastically?

Post by HansV »

As far as I know, the lists of recently opened files of the Office apps are stored in the registry, but unfortunately in a (to me) confusing way.
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 16789
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Has the Recent Files changed drastically?

Post by ChrisGreaves »

As far as I know, the lists of recently opened files of the Office apps are stored in the registry,
Thank you Hans. I do recall a registry source of data some time in the past. Perhaps this Win11 folder/file format is a new expression of the source data, an expression designed more for internal Win11 use than for poor illiterate VBA coders like me.

I have strong memories of having to locate different sources of raw data with each of my infrequent upgrades of the OS, and some of them did involved reading data from the registry.

Too I am not forgetting that still there may be a bug in my code for filename reclamation; just because it has worked well for a quarter-century (or whatever) is no guarantee that MS hasn't "changed the rules"

Too there is the remote possibility that the files I brought over from the Win7 DELL last week may have a corrupted folder structure in some way.

Back to work, Me!

but unfortunately in a (to me) confusing way.
Alas! :sad: So there is no hope for me :evilgrin: :flee: :flee:
Cheers, Chris
Fill your face with laughter, then there will be no room for tears.