Creating new word Files using append

Hello All,
I am stuck at a point where I need to keep creating new .docx files using “Append Text” activity.
To be clearer, I am extracting the body of a mail into a word file using -
Assign Activity (strvar = CurrentMail.Body.ToString) and
then using Append Activity to save it to a file…
Inside Append activity,
In “file path” am providing - (“Saved Attachments"+CurrentMail.SenderEmailAddress+”.docx")
and in place of text the Variable (strvar).
Now, the mail sender is static as by giving conditions to the activity “get outlook mail”.
If I use (“Saved Attachments"+CDate(CurrentMail.Date).ToString(“dd/MM/yyyy”)+”.docx") in file path it gives me error while running.
My requirement is just to create a new word file with every mail body.
Adding, I do need the time Stamp

Sorry for not being able to provide screenshots as my organization laptop prohibits…


This is because filenames does not support / and othe special charqcters so use as below

("Saved Attachments"+CDate(CurrentMail.Date).ToString("ddMMyyyy")+".docx")

Your date format has illegal characters



Hi @Pranay_Kumar_Bose

Use “Save Document As” activity and remove Replace Existing Option in that.

Hope it might help!!

Thanks @Anil_G for pointing out the error/mistake… Also, the given expression works as per my requirement.
Marked it as solution.

Adding further, I upgraded to this expression :
(“Saved Attachments"+CDate(CurrentMail.Date).ToString(“dd”)+”-“+CDate(CurrentMail.Date).ToString(“MM”)+”-“+CDate(CurrentMail.Date).ToString(“yyyy”)+”.docx")

1 Like

Thanks @Parvathy this one also works but sorry I forgot to mention that I specifically need the Time Stamp

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.