View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Create Outlook Distribution lists (default txt file) with excel

Hi nicolascap

You can test the visible cells in the loop

Dim cell As Range
Dim strto As String
For Each cell In ThisWorkbook.Sheets("Sheet1") _
.Columns("C").Cells.SpecialCells(xlCellTypeConstan ts)
If cell.EntireRow.Hidden = False And cell.Value Like "*@*" Then
strto = strto & cell.Value & ";"
End If
Next
strto = Left(strto, Len(strto) - 1)


--
Regards Ron de Bruin
http://www.rondebruin.nl


"nicolascap" wrote in message
...

OK

I managed to use the code but my problem isn't cleared since I wanted
to use Autofilter on "To" or "Cc" for each group to be able to generate
different distribution lists with only the filtered recipients appearing
in the "To" field of the email.

Here I email my whole list...

Attached updated version of the example.

Cheers

nico


+-------------------------------------------------------------------+
|Filename: Contact Example 2.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4414 |
+-------------------------------------------------------------------+

--
nicolascap
------------------------------------------------------------------------
nicolascap's Profile: http://www.excelforum.com/member.php...o&userid=32044
View this thread: http://www.excelforum.com/showthread...hreadid=517924