PDA

View Full Version : Run-Time Error '1004': Method 'HasRoutingSlip' of object '_Workbook' failed



enming
10-11-2016, 11:04 AM
Hi,
I hope anyone can help me change this to code that is using "ActiveWorkbook.SendMail".
The reason is my original code won't work on EXCEL 2010 now.
There were not enough examples to support "ActiveWorkbook.SendMail" from Microsoft, I can't figure out how to update this myself.

Range("A6").Select
ActiveWorkbook.HasRoutingSlip = True
With ActiveWorkbook.RoutingSlip
.Recipients = "Speidel, Byron"
.Subject = "PK53 Cash"
.Message = ""
.Delivery = xlAllAtOnce
.ReturnWhenDone = False
.TrackStatus = False
End With
ActiveWorkbook.Route

Much appreciation.
Ming

Kenneth Hobs
10-11-2016, 11:59 AM
Welcome to the forum!

It was removed starting with 2007.

Here are some examples for sendmail and more. http://www.snb-vba.eu/VBA_Excelgegevens_mailen_en.html