EXCEL and OUTLOOK

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

carl

Hi. I am trying to enhance the attached code. I would
like to have the code read a string of email addresses in
the filtered Column k. For example, if Column k is
filtered down to (e-mail address removed),[email protected] the
macro can't read these two addresses and the email gets
sent to unknown (Outlook generates a Unknown Recipient
type message).

Thank you in advance.

Sub Mail_Selection2()
 
Hi Carl

I have seen that you posted this a few times.
I was to busy to try and test it for you.

I will look at it this evening for you.
 
Hi Carl

I try some things but I can't get it working the way I want.
I suggest you split up the string in different cells in the same row.
 
HI. Thank you for taking a look at this for me.

If I split the addresses up over say 3 columns, will I
need to modify the code to look at columns K,L,M. If so,
how ? Thanks again in advance.
 
Hi CARL

Try this then

Dim str As Variant

For Each cell In Columns("K").Cells.SpecialCells(xlCellTypeFormulas)
If cell.EntireRow.Hidden = False And cell.Value Like "*@*" Then
str = Array(cell.Value, cell.Offset(0, 1).Value, cell.Offset(0, 2).Value)
Exit For
End If
Next cell
 
Back
Top