Hi,
I have a macro that opens an .rpt file in Excel, formats it, saves it as a Excel document and then emails it to a select group of people. Is there to send this as a hyperlink instead of sending the document itself?
Workbooks.OpenText Filename:= _
"S:\REPSTAT\Queries\Weekly\Thursday\APAM_Terr115.rpt", Origin:=437, StartRow _
:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, comma:=False _
, Space:=False, Other:=True, OtherChar:="~", FieldInfo:=Array(Array(1, 1 _
), Array(2, 2), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), _
Array(9, 1), Array(10, 1), Array(11, 2), Array(12, 1), Array(13, 1), Array(14, 1), Array(15 _
, 1), Array(16, 1), Array(17, 1), Array(18, 1)), TrailingMinusNumbers:=True
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Rows("1:1").Select
Selection.Font.Bold = True
Selection.Font.Underline = xlUnderlineStyleSingle
Cells.Select
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.ColorIndex = xlAutomatic
End With
Selection.Columns.AutoFit
ActiveWindow.SmallScroll ToRight:=8
Columns("L:M").Select
Selection.NumberFormat = "[<=9999999]###-####;(###) ###-####"
Columns("N:R").Select
Selection.Style = "Currency"
Range("A1").Select
ActiveWorkbook.SaveAs Filename:= _
"S:\REPSTAT\Queries\Weekly\Thursday\APAM_Terr115.xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.SendMail Recipients:=Array("LName, FName"), _
Subject:="Weekly Territory 115 APAM Assets & Sales Report "
ActiveWindow.Close
Bookmarks