|
-
Apr 5th, 2020, 01:13 PM
#1
Thread Starter
PowerPoster
Open the most recent file in a folder of files with the default program?
Hi there folks. I am working on a program for students to do their classroom work at home. Anyway, I have weekly newsletters of what they will be learning for the week. I use shellexecute open them, for example..
ShellExecute Me.hwnd, "open", App.Path & "\ResourceFiles\WorkActivities\WeeklyNewsletters\\WeeklyNewsletter-" & lblDate.Caption & ".pdf", vbNullString, vbNullString, SW_SHOWNORMAL
However, what I would like to do, is have it open the most recent newsletter in the folder. The folder has only newsletters, but I would like the program to just open the most recent one.
Would anyone know how to get the shellexecute to look at the date created or modified for the files and use that to decide which one is the newest downloaded into the folder?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|