How to I open the latest created excel file in a folder which the folder is in another folder

Try remove “Str_directoryPath,” in the code

After I remove the “Str_directoryPath”, this error appears: [Assign: Object reference not set to an instance of an object.]

Hi @RPA_Innovation

Instead of currentfolder use directory

Cheers

Please make sure Str_directoryPath is your parent folder path where the other folders are located. I think in your case, it is “C:\Users\rpa01\Documents\Tmall”

Try this. I’ve also added error handling if there’s no Excel File in the folder.

Get First Files.zip (3.3 KB)