Excel Email Function

  • Thread starter Thread starter carl
  • Start date Start date
C

carl

I am trying to use the excel email function to send
a "filtered" worksheet.

I am testing the funtion by sending the filtered section
to my own address (in case this matters).

When I receive the email (Outlook2000), all looks fine.
When I reply to the email, I noticed that I could see the
entire spreadsheet (including the unfiltered part)

Is there a way to allow the recipient of the email to only
see the filtered part of the worksheet.
 
cool. but the email address i need to use is on the
spreadsheet i'm sending - I can't access the spreadsheet
cell during the macro.

i am filtering the spreadsheet by email address - which
will always be in column k. is there a way for the macro
to look at that column for the email address ?
 
Try this

Sub test()
Dim Recipient As String
Dim cell As Range
For Each cell In Columns("K").Cells.SpecialCells(xlCellTypeConstants)
If cell.EntireRow.Hidden = False And cell.Value Like "*@*" Then
Recipient = Recipient & cell.Value & ";"
End If
Next
Recipient = Left(Recipient, Len(Recipient) - 1)
MsgBox Recipient
End Sub

Use Recipient in the SendMail line now
 
Back
Top