Hello everyone. First off I'm a novice at using Macros and hope this not a stupid question. I'm using a Macro that I found to email data from a spreadsheet. It works fine from my computer. I gave a copy of it to some of my co-workers to use also. When they run it they get an error. The error is 'Run-Time error 1004'. Here is the code:
Sub DaysReport()
'
' DaysReport Macro
'
' Select the range of cells on the active worksheet.
ActiveSheet.Range("a2:h26").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Item.To = ActiveSheet.Range("i3")
.Item.Subject = ActiveSheet.Range("i2")
.Item.Send
End With
'
End Sub
The red highlight is where the error occurs. Another difference is that I have Office 16 and they are using 10, but I built it with 10.
Sub DaysReport()
'
' DaysReport Macro
'
' Select the range of cells on the active worksheet.
ActiveSheet.Range("a2:h26").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Item.To = ActiveSheet.Range("i3")
.Item.Subject = ActiveSheet.Range("i2")
.Item.Send
End With
'
End Sub
The red highlight is where the error occurs. Another difference is that I have Office 16 and they are using 10, but I built it with 10.