I am trying to send an excel file I have downloaded from chrome that has a variable ID in an email message and am getting this error. To get the file name of the most recent downloaded file, I am using the following:
Directory.GetFiles(“C:\Users\willl\Desktop\RPA\BotAThon”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).ToString(0)
I am assigning this to the variable “RecentFile” and then trying to send it with the following:
With “RecentFile” in the attach files part. Can anyone please help out? I think the issue is with the variable. Thanks.