Outlook: CreateItemFromTemplate. Why so slow

F

Filips Benoit

Dear All,

The testcode below needs 37 sec. to display the mail, WHY so slow.

Private Sub Command1_Click()
Dim ol As Object
Dim msg As Outlook.MailItem
Dim strBody As String

Set ol = CreateObject("Outlook.Application")
Set msg =
ol.CreateItemFromTemplate("C:\Documents\000FILIP\VoorAnderen\Ycomm\YcommPMS\
EmailTemplates\Template1.oft")
strBody = msg.Body
strBody = Replace(strBody, "FirstName", "Filips")
msg.Body = strBody
msg.To = "(e-mail address removed)"
msg.Display
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top