I’m looking to use the string format function to create a dynamic mail message body in send outlook mail message. Basically, I need to replace a few placeholder values in my txt file for the message of my email. However, I’m having some trouble getting it to work.
This is the body template (its an image file because this forum won’t let me post a txt file):
The three placeholders {1}, {2}, and {3} are supposed to be replaced with the variables “PersName”, “Game” and “Reminder” in my sequence. I’m having trouble using the following body code:
String.Format(“{1}{2}{3}”,Template,PersName,Game,Reminder)
Hello! Thanks for your response. I’m able to substitute {0} for “Robotics.” I’m assuming you mean “Robotics” to be a variable for a certain value. However, the body ends up literally displaying “Robotics” and not the dynamic value I need it to show. Any way around this?
This might be bit different as what you after, but since you are gonna send out dynamic emails to a list of people, from what it looks like in the database.xlsx, the below sample will loop through all rows in the excel file and send email to each of them, if you want you can add some condition, for example, only email out to the people that reminder day equal today or something. Dynamic Email.zip (20.5 KB)