Hi all
I am currently running a macro with the following script.....
Sub Understood()
Dim OutlookApp As Object
Dim Mess As Object, Recip As String, rng As Range
Set rng = Range("B3:K28")
Recip = "name@companyname.com"
Set OutlookApp = CreateObject("Outlook.Application")
Set Mess = OutlookApp.CreateItem(olMailItem)
With Mess
.Subject = "Subject"
.HTMLBody = RangetoHTML(rng)
.Recipients.Add Recip
.cc = ['[sheetname.xlsm]workbookpage'!$g$9]
.Send
End With
End Sub
This works fine until the following issue occurs.....
When the page with this macro is sent to someone it is sent as a copy of a workbook so the CC section of the script fails as the filename is wrong.
How to I change this script to read that it needs to find G9 in the active workbook.
Thanks in advance
I am currently running a macro with the following script.....
Sub Understood()
Dim OutlookApp As Object
Dim Mess As Object, Recip As String, rng As Range
Set rng = Range("B3:K28")
Recip = "name@companyname.com"
Set OutlookApp = CreateObject("Outlook.Application")
Set Mess = OutlookApp.CreateItem(olMailItem)
With Mess
.Subject = "Subject"
.HTMLBody = RangetoHTML(rng)
.Recipients.Add Recip
.cc = ['[sheetname.xlsm]workbookpage'!$g$9]
.Send
End With
End Sub
This works fine until the following issue occurs.....
When the page with this macro is sent to someone it is sent as a copy of a workbook so the CC section of the script fails as the filename is wrong.
How to I change this script to read that it needs to find G9 in the active workbook.
Thanks in advance