View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SupperDuck SupperDuck is offline
external usenet poster
 
Posts: 44
Default Type mismatch error when using outlook

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 = "


.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