N
Nancy T.
We publish a monthly trade magazine and I have a database with all of our
advertisers and the months that they run ads. Every month I send an e-mail
reminder to several of them reminding them of the deadline date to submit a
new ad for the next issue. I have been doing this for about 2 years with no
problems. Recently I had a problem with my Vista computer and I had to
totally reinstall Vista, which meant that I had to reinstall all of my
programs. (I really HATE Vista!) I reinstalled Office 2007, then remembered
that it did not include Access. I then had to install Access from Office XP.
(I hate Vista, but I DESPISE Office 2007!) Anyhow, now my form to send my
e-mail is not working. Everything works fine up to when I hit the button to
send. Here is a truncated version of the code. All the strings are loaded
with text prior to this.
Dim msg As Outlook.MailItem
Private Sub cmdSendEMail_Click()
Dim msg As Outlook.MailItem
On Error GoTo ErrorHandler
strRecipients = Me![txtRecipients].Value
strSubject = Me![txtMessageSubject].Value
strBody = Me![txtMessageBody].Value
(This next line is the one that generates the error)
Set msg = appOutlook.CreateItem(olMailItem)
With msg
.To = "(e-mail address removed)" (this is my e-mail address here)
.BCC = strRecipients
.Subject = strSubject
.Body = strBody
.Display
.Send
End With
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
Resume ErrorHandlerExit
End Sub
There error message I get is Error No: 13; Description: Type mismatch
There references that are checked are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
Microsoft Outlook 12.0 Object Library
Any ideas what may be suddenly causing this error?
TIA,
Nancy
advertisers and the months that they run ads. Every month I send an e-mail
reminder to several of them reminding them of the deadline date to submit a
new ad for the next issue. I have been doing this for about 2 years with no
problems. Recently I had a problem with my Vista computer and I had to
totally reinstall Vista, which meant that I had to reinstall all of my
programs. (I really HATE Vista!) I reinstalled Office 2007, then remembered
that it did not include Access. I then had to install Access from Office XP.
(I hate Vista, but I DESPISE Office 2007!) Anyhow, now my form to send my
e-mail is not working. Everything works fine up to when I hit the button to
send. Here is a truncated version of the code. All the strings are loaded
with text prior to this.
Dim msg As Outlook.MailItem
Private Sub cmdSendEMail_Click()
Dim msg As Outlook.MailItem
On Error GoTo ErrorHandler
strRecipients = Me![txtRecipients].Value
strSubject = Me![txtMessageSubject].Value
strBody = Me![txtMessageBody].Value
(This next line is the one that generates the error)
Set msg = appOutlook.CreateItem(olMailItem)
With msg
.To = "(e-mail address removed)" (this is my e-mail address here)
.BCC = strRecipients
.Subject = strSubject
.Body = strBody
.Display
.Send
End With
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
Resume ErrorHandlerExit
End Sub
There error message I get is Error No: 13; Description: Type mismatch
There references that are checked are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
Microsoft Outlook 12.0 Object Library
Any ideas what may be suddenly causing this error?
TIA,
Nancy