Type mismatch error when using outlook

S

SupperDuck

Dear all,

There is a macro that is very long. It seperates rows to sheets, sheets to
workbooks and sends the e-mail.

There are 7 computers that uses this macro - and no error in 6 of them , but
receive "Type Mismatch" error in one of them.

I don't know why it is - may be because of the differ in office version
(just a guess).

the error is given on the line " Set olMail = olApp.CreateItem(olMailItem)"

Could you please help?

regards,



Set olApp = New Outlook.Application

Set olMail = olApp.CreateItem(olMailItem)

With olMail

.To = "(e-mail address removed)"


.Subject = DateString & " tarihli firma bakiyeleri ve raporlar"
.Attachments.Add FolderName & "\Boyama.xls"
.Attachments.Add FolderName & "\Per Tum.xls"
.Attachments.Add FolderName & "\Per Firma.xls"
.Attachments.Add FolderName & "\Per Parça.xls"
.Attachments.Add FolderName & "\KIT.xls"

.Body = yazi
.Display


End With

Set olMail = Nothing

Set olApp = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top