W
Worsty
Here is my code I'm using in Access. It works great with the exception of
invoking the template I'm using on my default email box message form. What
I'm trying to do is to use the "wallpaper" set to the inbox new message as
the default wallpaper in the email message I'm generating from Access.
This is the only piece of the puzzel I can't get to work.
Can somebody please help me????
Thanks,
*******************************
Code
********************************
Dim MyOutlook As Outlook.Application
Dim MyMail As Outlook.MailItem
Dim MyBodyText As String
Dim frm As Form
Dim ctl As Control
Dim varItem As Variant
Dim strSQL As String
Dim myattachments As Variant
Dim lItemCount As Long
'send email with spreadsheet
Set MyOutlook = New Outlook.Application
Set MyMail = MyOutlook.CreateItem(olMailItem)
MyMail.To = "(e-mail address removed)"
MyMail.CC = ""
MyMail.BCC = Text1
MyMail.BodyFormat = olHTML
MyMail.Subject = "Monthly Newsletter"
MyBodyText = "Here is the document"
Set myattachments = MyMail.Attachments
myattachments.Add "C:\JetComp.doc"
MyMail.SentOnBehalfOfName = ""
MyMail.Body = MyBodyText
MyMail.Display
Set MyMail = Nothing
Set myattachments = Nothing
Set MyOutlook = Nothing
Expand AllCollapse All
Manage Your Profile
©2005 Microsoft Corporation. All rights reserved. Terms of Use |Trademarks
|Privacy Statement
invoking the template I'm using on my default email box message form. What
I'm trying to do is to use the "wallpaper" set to the inbox new message as
the default wallpaper in the email message I'm generating from Access.
This is the only piece of the puzzel I can't get to work.
Can somebody please help me????
Thanks,
*******************************
Code
********************************
Dim MyOutlook As Outlook.Application
Dim MyMail As Outlook.MailItem
Dim MyBodyText As String
Dim frm As Form
Dim ctl As Control
Dim varItem As Variant
Dim strSQL As String
Dim myattachments As Variant
Dim lItemCount As Long
'send email with spreadsheet
Set MyOutlook = New Outlook.Application
Set MyMail = MyOutlook.CreateItem(olMailItem)
MyMail.To = "(e-mail address removed)"
MyMail.CC = ""
MyMail.BCC = Text1
MyMail.BodyFormat = olHTML
MyMail.Subject = "Monthly Newsletter"
MyBodyText = "Here is the document"
Set myattachments = MyMail.Attachments
myattachments.Add "C:\JetComp.doc"
MyMail.SentOnBehalfOfName = ""
MyMail.Body = MyBodyText
MyMail.Display
Set MyMail = Nothing
Set myattachments = Nothing
Set MyOutlook = Nothing
Expand AllCollapse All
Manage Your Profile
©2005 Microsoft Corporation. All rights reserved. Terms of Use |Trademarks
|Privacy Statement