M
Mike Miller
I have a macro I created in Outlook 2000 to send a
specific set of files to a specific address. It worked
fine in 2000, but I'm having a problem in 2003. When I
run the macro, it works fine and the files are sent as
expected; no errors, warnings or anything else. However,
the next time I open Outlook, I get a message saying
something had a serious failure the last time Outlook was
ran and it was disabled; when I look at Help, About, I see
that the VBA add-in has been disabled, and my macro won't
work any more. I can re-enable the macro, close Outlook,
restart, and the macro works fine again, but again, the
next time I open Outlook, I'll see the same error.
Here's the macro:
Sub SendAlmanac()
'create the email
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
'add the Recipient
myItem.Recipients.Add "(e-mail address removed)"
myItem.Subject = "Subject"
'attach the files
myAttachments.Add "c:\file1"
<NOTE - this line contains the actual path to a file,
which I have verified is correct; there are about 10 files
in all>
'send the message
myItem.Send
End Sub
specific set of files to a specific address. It worked
fine in 2000, but I'm having a problem in 2003. When I
run the macro, it works fine and the files are sent as
expected; no errors, warnings or anything else. However,
the next time I open Outlook, I get a message saying
something had a serious failure the last time Outlook was
ran and it was disabled; when I look at Help, About, I see
that the VBA add-in has been disabled, and my macro won't
work any more. I can re-enable the macro, close Outlook,
restart, and the macro works fine again, but again, the
next time I open Outlook, I'll see the same error.
Here's the macro:
Sub SendAlmanac()
'create the email
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
'add the Recipient
myItem.Recipients.Add "(e-mail address removed)"
myItem.Subject = "Subject"
'attach the files
myAttachments.Add "c:\file1"
<NOTE - this line contains the actual path to a file,
which I have verified is correct; there are about 10 files
in all>
'send the message
myItem.Send
End Sub