I need to create a new Outlook Mail Item using a pre existing oft template. This works fine, but my problem is when I need to then add text to the body of the template. when i attempt this, it writes over the template body.
The current template body consists if a table with three rows and I need to add user input to the middle row?
I followed the MSDN example to create the item but I'm unsure of how to do this next part.
Is it possible to add text to an oft template without writing over the top of it?
private void button1_Click(object sender, EventArgs e)
{
Outlook.Application application = new Outlook.Application();
Outlook.Folder f =
application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts)
as Outlook.Folder;
Outlook.MailItem mail =
application.CreateItemFromTemplate(@"C:\Documents and Settings\riversd\Desktop\DataBase\Notification.oft", f)
as Outlook.MailItem;
mail.BodyFormat = Outlook.OlBodyFormat.olFormatHTML;
mail.Body = "<p>TEST</p>";
mail.Save();