Using macros to open newest file in a directory

  • Thread starter Thread starter jake
  • Start date Start date
J

jake

Hi,

I was wondering how to go about using a VB macro in Powerpoint 2003 to open
the newest file in a directory? I have been using the followhyperlink method,
but only to the parent folder, then the user must find the newest date and
open it themselves. Is there a way to automate this using VB code? The file I
desire to be opened is the daily date.
 
To clarify: The files to be opened are saved into different folders depending
on the current month. i.e. >Folder2009
January
Today'sDate.file
February
In The Future.file
So the file path changes subfolders depending on the month, so the link
needs to change also. Is there a method for, say, opening the newest file (by
date), and therefore today's date, in all of 2009 and its sub-folders? All
files are pdf files and the daily date is included in the filename.
 
Thanks for that Shyam.

I managed to use the filesearch method with lastmodifiedtoday and it seems
to be working alright.
 
Back
Top