J
Jonathan Brown
All of a sudden this email code doesn't work anymore. I had written it for
an Access 2000 application. The IT department upgraded to MS Office 2003
about close to a month ago, but this code has continued to work up until a
few days ago. I don't know what has happened to cause it to stop working.
We use Outlook with exchange server. Is there anything that could have
changed on the Exchange server to cause this to stop working? I haven't
changed my references either. I still have the Microsoft Outlook 11 Object
Library selected. When I attempt to run the code and it fails, I click debug
and the following line is highlighted yellow:
objMail = objOutlook.CreateItem(olMailItem)
When I mouse over it I get a tooltip that says: objMail = nothing
Here is my code:
------------------------------------------------------------------------------------------------
'Send Email to an FSR
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)
EmailAddr = Me.Email
CopyEmailAddr = ""
Subj = "Information about the FSR Update database."
Body = "tsup dog"
PathName = ""
With objMail
.To = EmailAddr
.cc = CopyEmailAddr
.Subject = Subj
.Body = Body
.NoAging = True
.Display
End With
'****** Send the email without prompts *******
SendKeys "%{s}", True
'****************************************************
Set objMail = Nothing
Set objOutlook = Nothing
-----------------------------------------------------------------------------------------------
When I run it with error handling, it gives me this error:
Run-time error '-2079129597 (84130003)': The operation failed.
Again, this just suddenly stopped working. Any ideas?
an Access 2000 application. The IT department upgraded to MS Office 2003
about close to a month ago, but this code has continued to work up until a
few days ago. I don't know what has happened to cause it to stop working.
We use Outlook with exchange server. Is there anything that could have
changed on the Exchange server to cause this to stop working? I haven't
changed my references either. I still have the Microsoft Outlook 11 Object
Library selected. When I attempt to run the code and it fails, I click debug
and the following line is highlighted yellow:
objMail = objOutlook.CreateItem(olMailItem)
When I mouse over it I get a tooltip that says: objMail = nothing
Here is my code:
------------------------------------------------------------------------------------------------
'Send Email to an FSR
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)
EmailAddr = Me.Email
CopyEmailAddr = ""
Subj = "Information about the FSR Update database."
Body = "tsup dog"
PathName = ""
With objMail
.To = EmailAddr
.cc = CopyEmailAddr
.Subject = Subj
.Body = Body
.NoAging = True
.Display
End With
'****** Send the email without prompts *******
SendKeys "%{s}", True
'****************************************************
Set objMail = Nothing
Set objOutlook = Nothing
-----------------------------------------------------------------------------------------------
When I run it with error handling, it gives me this error:
Run-time error '-2079129597 (84130003)': The operation failed.
Again, this just suddenly stopped working. Any ideas?