The code came from Arvin Meyer at
http://www.datastrat.com/Code/OutlookEmail.txt
"Chris" wrote:
> The Solution is:
> Dim objOutlook As Object
> Dim objEmail As Object
> Set objOutlook = CreateObject("Outlook.application")
> UserName = Name Field
> SubjectText = "Subject Text"
> EmailTemplate = "C:\Users\Me\Templates\Test.Oft"
> Set objEmail = objOutlook.CreateItemFromTemplate(EmailTemplate)
> With objEmail
> .To = UserName
> .Subject = SubectText
> .body = "The body doesn't matter, just the attachment"
> .Attachments.Add "C:\Test.htm"
> '.attachments.Add "c:\Path\to\the\next\file.txt"
> .Display
> '.Send - this didn't work on my setup but .Display did
> '.ReadReceiptRequested
>
> End With
> "Chris" wrote:
>
> > I am trying to send an email using an Outlook Template. My code line is:
> >
> > DoCmd.SendObject acSendNoObject, , , [Name (Last, First)], , , , , True,
> > "<Network Path>\Home\Templates\PRC Equipment Request Confirmation.oft"
> >
> > The code will open the email which I want but it is a blank email and not
> > the template. The template is a HTML format but that should not matter when
> > calling the template.
> >
> > How do I get Access to open the template file?