I am working on sending an automated mail from my MS ACCESS 2003 database application. My VBA code letting me to pull up the outlook template file (Test) and this is fine, I am also able to pull up the other required fields like To, CC etc (Send). Now the problem is I have a variable field called Help Desk Comment and I am also want to insert this field into my Outlook Template.
My question is is it possible to insert additional string / value in runtime into the outlook template file?
I need expert help to clear my idea and get this thing done.
Appreciate your any help on this.
Public Function SendMyEmail()Dim db As DAO.DatabaseDim MyOutlook As Outlook.ApplicationDim MyMail As Outlook.MailItemSet MyOutlook = New Outlook.ApplicationSet db = CurrentDb()Set MyMail = MyOutlook.CreateItemFromTemplate("\\..\datagrp\Call Tracker\Expenses_Call\TE.oft")MyMail.SentOnBehalfOfName = "email@example.com"MyMail.To = Form_frmTemplate.txtTo.ValueMyMail.CC = Form_frmTemplate.txtE_CC.ValueMyMail.Subject = Form_frmTemplate.txtE_sub.ValueMyMail.OriginatorDeliveryReportRequested = FalseMyMail.ReadReceiptRequested = FalseMyMail.DisplayEnd Function