how to attach excel file from path in in out look with current date
kindly let me know on this any example would be helpful
how to attach excel file from path in in out look with current date
kindly let me know on this any example would be helpful
Hi @T_Y_Raju ,
currentDate.ToString(“yyyyMMdd”)
Compose File Path:
Concatenate the file path with the formatted date to create the full file path of the Excel file.
path.GetFileNameWithoutExtension(filePath).ToString + “_” + currentdate + Path.GetExtension(filePath).ToString
3.rename the file with new file path or copy the file to new file path
Send Outlook Email :
Use the Send Outlook Mail Message
activity to send an email.
To
, Subject
, and Body
.Attachments
field, provide the newFilepath` variable.Thanks ,
Can you provide more detail? What do you mean with current date? Does the filename already contain the current date? You’re trying to rename the file then attach it? We need specific details in order to help.
There’s no reason to create a variable to assign the current date to. Just put it in the expression.
path.GetFileNameWithoutExtension(filePath).ToString + “_” + Now.ToString(“yyyyMMdd”) + Path.GetExtension(filePath).ToString