Hello everyone, for years I've had a vba macro in excel that autosends emails for me. My computer was upgraded to Office 2013 a couple of weeks ago and now some of my emails are not working properly. The email is created fine, but when I try to send the message it says, "The property does not exist. the field you want to modify is not valid for this type of item." I can create the email from scratch w/ the same: to, subject, body, and attachment and it sends fine.
Here is the main part of the macro, the attachment is an excel workbook. Any ideas?
Thank you!
Here is the main part of the macro, the attachment is an excel workbook. Any ideas?
Code:
Set OutMail = OutApp.CreateItem(0)
Set FileCell = cell.Offset(0, 5)
With OutMail
.To = cell.Offset(0, 1).Value
.bcc = cell.Offset(0, 11).Value
.Subject = cell.Offset(0, 2).Value
.Body = cell.Offset(0, 3).Value
'Adding multiple files to the email, first it checks to see if there are attachments.
If FileCell <> "" Then
For Each FileCell In rng.SpecialCells(xlCellTypeVisible)
If Trim(FileCell) <> "" Then
If Dir(FileCell.Value) <> "" Then
.Attachments.Add FileCell.Value
End If
End If
Next FileCell
End If
Thank you!