Hi I just wanted to get multiple Files from a Folder and Store it in a string variable,
The problem is, after I get and Stored the list of String in One String using this strText = String.Join(“,”,strFilearr.toarray) It gives me the full path of Each Files, the reason why it throws some error.
mail.Attachments.Add() → Takes a File Path. Hence if you want to add multiple files as attachment then you need the input argument to be (An Array of String) String and you will have to loop over this String and call the mail.Attachments.Add() method within the loop.
Hi I already tried this method but it Didn’t work for me bcoz, I have email template in outlook (.oft file) and I must replace some data like <nickname, startdate, etc…> that the reason why i need to use invoke code activity. the data came from excel file and replace it in the email template.
Example of data needs to replace.
and im working on attachment of files im still getting errors
First perform the following to get the Files to be Attached in a String: in_Attachments=Directory.GetFiles("<FolderPath>")
On Invoked Code Arguments change the AttachedFile Type from String to String. Next inside the code you can call a for each loop to loop through the String Array AttachedFile and within the loop add one file at a time to the mail object as follows: