M
Miha Abrahamsberg
Hello!
I'm using the following to send mail in Access (2003) via Outlook (2003):
Public Function SendEMail(SubjectLine As String, MyBodyText As Variant,
EMailAddress As String, EMailAddressCC As String, path1 As String)
Dim MyOutlook As Outlook.Application
Dim MyMail As Outlook.MailItem
Set MyOutlook = New Outlook.Application
Set MyMail = MyOutlook.CreateItem(olMailItem)
MyMail.To = EMailAddress
MyMail.CC = EMailAddressCC
MyMail.Subject = SubjectLine
MyMail.Body = MyBodyText
MyMail.Attachments.Add path1, olByValue, 1, "My Displayname"
MyMail.Display
Set MyMail = Nothing
Set MyOutlook = Nothing
End Function
I have 2 questions:
1. Every time MS Outlook is prompting me that "something/someone" is trying
to send mail and I have to confirm it. Is there a way to turn this warning
off?
2. I use a txt file to "fill" the "MyBodyText" value. Is there a way to use
rich or html text in this manner?
Thank you in advance!
Miha
I'm using the following to send mail in Access (2003) via Outlook (2003):
Public Function SendEMail(SubjectLine As String, MyBodyText As Variant,
EMailAddress As String, EMailAddressCC As String, path1 As String)
Dim MyOutlook As Outlook.Application
Dim MyMail As Outlook.MailItem
Set MyOutlook = New Outlook.Application
Set MyMail = MyOutlook.CreateItem(olMailItem)
MyMail.To = EMailAddress
MyMail.CC = EMailAddressCC
MyMail.Subject = SubjectLine
MyMail.Body = MyBodyText
MyMail.Attachments.Add path1, olByValue, 1, "My Displayname"
MyMail.Display
Set MyMail = Nothing
Set MyOutlook = Nothing
End Function
I have 2 questions:
1. Every time MS Outlook is prompting me that "something/someone" is trying
to send mail and I have to confirm it. Is there a way to turn this warning
off?
2. I use a txt file to "fill" the "MyBodyText" value. Is there a way to use
rich or html text in this manner?
Thank you in advance!
Miha