![]() |
Emailing Range in Body CC Problem
I have a Workbook set up with a Send macro as below which places the Range("A51:P103") into the body
of the email. But the problem i am having is related to the CC -ing. If a sheet is sent and CC to another person, the next time a sheet needs to be emailed, the CC address from the previous sent sheet is also included. I am not sure if this is a Excel or a Outlook glitch though. Is there a solution to add to this to solve it? Has anyone else had this problem ? Corey.... Sub Send() Call Unprotect Call Hiderows Call Unprotect 'Call Hidecolumns Application.DisplayAlerts = False ' Select the range of cells on the active worksheet. ActiveSheet.Range("A51:P103").Select ' Show the envelope on the ActiveWorkbook. ActiveWorkbook.EnvelopeVisible = True On Error GoTo Macro With ActiveSheet.MailEnvelope .Introduction = "Please accept this an Official Email..." .Item.To = Range("J64") .Item.CC = Range("J65") .Item.Subject = Range("R66") .Item.Send 'Display Range("R63").Value = Date & " " & Time Call Unhiderows Range("A1").Select Macro: Call Unhiderows End With Call Protect Range("A1").Select End Sub |
Emailing Range in Body CC Problem
Hi, I guess you should reset the variables that hold the values of the mail
addresses. This should solve your issue. "Corey" wrote: I have a Workbook set up with a Send macro as below which places the Range("A51:P103") into the body of the email. But the problem i am having is related to the CC -ing. If a sheet is sent and CC to another person, the next time a sheet needs to be emailed, the CC address from the previous sent sheet is also included. I am not sure if this is a Excel or a Outlook glitch though. Is there a solution to add to this to solve it? Has anyone else had this problem ? Corey.... Sub Send() Call Unprotect Call Hiderows Call Unprotect 'Call Hidecolumns Application.DisplayAlerts = False ' Select the range of cells on the active worksheet. ActiveSheet.Range("A51:P103").Select ' Show the envelope on the ActiveWorkbook. ActiveWorkbook.EnvelopeVisible = True On Error GoTo Macro With ActiveSheet.MailEnvelope .Introduction = "Please accept this an Official Email..." .Item.To = Range("J64") .Item.CC = Range("J65") .Item.Subject = Range("R66") .Item.Send 'Display Range("R63").Value = Date & " " & Time Call Unhiderows Range("A1").Select Macro: Call Unhiderows End With Call Protect Range("A1").Select End Sub |
All times are GMT +1. The time now is 04:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com