Liz Doering
liz at symphonyinfo.com
Tue Jun 15 16:05:28 CDT 2004
Bruce, This isn't working quite right, and it's lifted a lot from help, but it might get you started. I'm trying to send an email formatted with a nice certificate and text in the middle of the certificate. I created an Outlook template first, with the certificate built into the template. This becomes the HTMLBody of the email. Then you can build text into that, or rather, in the example below, start the text on the first line of the email, with the certificate underneath it in an ugly fashion. Not quite what my client wants! But I haven't had time to get back to it and finish it. So anything you learn will be appreciated. Liz Public Sub SendCongrats(strBody, strHeader As String, strRecip As String) On Error GoTo eh Dim db As Database Dim myOlApp As Outlook.Application Dim MyItem As Outlook.MailItem Set db = CurrentDb Set myOlApp = CreateObject("Outlook.Application") Set MyItem = myOlApp.CreateItemFromTemplate("Y:\SIS Templates\CERTIFICATE.oft") With MyItem .To = strRecip .Subject = strHeader .BodyFormat = olFormatHTML .HTMLBody = strBody & .HTMLBody .Display End With ex: Set myOlApp = Nothing Set MyItem = Nothing Exit Sub eh: MsgBox Err.Description, , Err.Number Resume ex End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bruce Horn Sent: Tuesday, June 15, 2004 2:14 PM To: Access Developers discussion and problem solving Subject: [AccessD] Automating Outlook Hello - One of our clients has us send regular status announcements to their members via Outlook (data extracted from A2K database). The client has now asked us to include their logo as part of the email. So far no joy in including the OLE object (.jpg) in the email. Anyone have any pointers/advice? Thanks in advance. Regards, - Bruce +++++++++++++++++++++++++ Bruce Horn, CIO/CTO Pivot MDS, LLC Ph: 401-586-6422 Fx: 401-586-6425 www.pivot-mds.com +++++++++++++++++++++++++++++++++++++++++ A conclusion is simply the place you got tired of thinking. +++++++++++++++++++++++++++++++++++++++++ -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com