Excel VBA, create email error, the property does not exist. the field you want to modify is not valid for this type of item.

graphage

Board Regular
Joined
Mar 7, 2002
Messages
87
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?

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!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

graphage

Board Regular
Joined
Mar 7, 2002
Messages
87
I may have just figured it out. I shorted the body a little bit and I think it is working. If you don't hear back from me then that fixed it. It is odd because I haven't lengthened the body recently, so maybe the maximum length has been shortened.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,854
Messages
5,833,993
Members
430,250
Latest member
Reggie Mcqueen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top