Help with email macro

L

Logan

I'm having problems with the following macro.
When I open the emailed worksheet, the message comes up
"This workbook contains links to other data sources."
Is there a way to have the macro remove the links before it
is emailed?

Sub Mail_ActiveSheet()
Dim strDate As String
Dim FName1, FName2, FName3, Fullname
FName1 = "CK0"
FName2 = Range("AU2").Value & "-"
FName3 = Range("J4").Value
Fullname = FName1 & FName2 & FName3
ActiveSheet.Copy
strDate = Format(Date, "dd-mm-yy") & " " & Format(Time,
"h-mm-ss")
ActiveSheet.SaveAs "Report Sheet for " & Fullname _
& " " & strDate & ".xls"
ActiveWorkbook.SendMail "email address", _
Fullname
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.Fullname
ActiveWorkbook.Close False
End Sub
 
T

Tom Ogilvy

Not with any built in method.

you might down load findlink.xla from Stephen Bullen's site at
http://www.bmsltd.ie go to the MVP page (see links on the left).

I don't know if the code is exposed - but if it is you might examine it to
see where to look for links - otherwise, you can use the xla to remove
links.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top