T
TaylorGaffney
I have upgraded my laptop from XP SP2 to Vista SP1.
Since I have upgraded, I am unable to send these simple reports in an
access program I have created. I was able to do this for well over a
year before upgrading to Vista.
If you need more info, or questions please ask. I need to resolve
this quickly.
CODE:
Public Function PTOeMail(sTo As String, sSubject As String, sMsg As
String, Optional sCC As String, Optional sAttachment As String)
Dim olApp As Object
Dim myItem
On Error GoTo Email_GooFed
Set olApp = CreateObject("outlook.application")
Set myItem = olApp.Application.CreateItem(0)
myItem.To = sTo
myItem.Subject = sSubject
myItem.Body = sMsg
myItem.CC = sCC
myItem.Attachments.Add sAttachment
myItem.Send
EMail_ExIT:
Exit Function
Email_GooFed:
MsgBox "Your system was unable to generate the email message. " _
& "You will have to notify them differently if necessary.",
vbInformation
Resume EMail_ExIT
End Function
I get this message on every attempt.
<b>"Your system was unable to generate the email message. " _
& "You will have to notify them differently if necessary."</b>
Since I have upgraded, I am unable to send these simple reports in an
access program I have created. I was able to do this for well over a
year before upgrading to Vista.
If you need more info, or questions please ask. I need to resolve
this quickly.
CODE:
Public Function PTOeMail(sTo As String, sSubject As String, sMsg As
String, Optional sCC As String, Optional sAttachment As String)
Dim olApp As Object
Dim myItem
On Error GoTo Email_GooFed
Set olApp = CreateObject("outlook.application")
Set myItem = olApp.Application.CreateItem(0)
myItem.To = sTo
myItem.Subject = sSubject
myItem.Body = sMsg
myItem.CC = sCC
myItem.Attachments.Add sAttachment
myItem.Send
EMail_ExIT:
Exit Function
Email_GooFed:
MsgBox "Your system was unable to generate the email message. " _
& "You will have to notify them differently if necessary.",
vbInformation
Resume EMail_ExIT
End Function
I get this message on every attempt.
<b>"Your system was unable to generate the email message. " _
& "You will have to notify them differently if necessary."</b>