Hi Everyone:
Sorry if this is a really stupid question,but here goes:
I want to send a worksheet in the body of the mail,in the worksheet I have hidden cells:I unhide them but they still show up in the body of the email I send,Can some please show me how I unhide them in my macro? my code is pretty simple:
Sub Send_Range()
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
.Introduction = "This is a sample worksheet."
.Item.To = "E-Mail_Address_Here"
.Item.Subject = "My subject"
.Item.Send
End With
End Sub
if it helps any: my hidden cells are from column F : column H,but i want the values in column I to be displayed.
if this is not doable my other (much disliked) option is have the the activesheet saved on the desktop and then the user sends it as an attachment.i really really dont want to do this
Sub MailSheet()
Dim shtName As String
shtName = ActiveSheet.Name
ActiveSheet.Copy
ActiveWorkbook.SaveAs FileName:=Application.GetSaveAsFilename("Copy of " & shtName, "Microsoft Excel File, *.xls")
Application.DisplayAlerts = False
Application.Dialogs(xlDialogSendMail).Show
With ActiveWorkbook
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.DisplayAlerts = True
End Sub
so my request is either:
1)i am able to remove the hidden cells from the email body OR
2)send the activesheet as an attachment without saving on the users PC
Can someone please guide me?
Regards
Arun