Searching a directory for last two day's documents, return partial filename to bookmarks

I need to search a directory with subfolders named by month, specifically, for the filenames of the last two created documents in the folder, referencing the current nonstandard date I specified in the activedocument. The date is bookmarked by day, month, and year values. I want to return only that nonstandard date value in the name of the file and put it in the bookmarks in the activedocument.

Anyone got any ideas on how to automate a search of a directory like this to return the last day

Reason being: Our document creation cycle is daily, but some days are skipped (holidays, weekends, days off, etc.) so I can't just do a Format = Calendar1.Value - 1, "dd" to return the previous day into the bookmark.



Answer this question

Searching a directory for last two day's documents, return partial filename to bookmarks

  • Searching a directory for last two day's documents, return partial filename to bookmarks