Useful Hacks, Reviews, Tips and Tricks of anything under the moon and the sun.

List the Most Recent used files using MS Word Macro

No comments
If we want to quickly open recently used document in MS word, we usually look for it on the Most Recent Used (MRU) files list under File Menu. A more cooler way to retrieve it is using VBA macro. If your not into office programming there are really no use for this trick (that's why I categorized it as a trick).

If you want to try it, just copy and paste the following code on your VBA Editor.

Sub GetMostRecentUsedFiles()
Dim x As Integer

For x = 1 To RecentFiles.Count
Selection.TypeText Text:=RecentFiles(x).Name
End Sub

To access VBA editor, Go to Tools Menu, select Macro then Visual Basic Editor.

No comments :

Post a Comment