Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
This code from ron de bruin sends an e-mail to each address in column B if there is a Y in column C. For Each cell In Sheets("Sheet1").Columns("B").Cells.SpecialCells(x lCellTypeConstants) If cell.Offset(0, 1).Value < "" Then If cell.Value Like "*@*" And cell.Offset(0, 1).Value = "y" Then Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = cell.Value .Subject = Cells(1, 4) .Body = "Dear " & cell.Offset(0, -1).Value & "," & vbNewLine & vbNewLine & strbody 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Display '.Send 'Or use Display End With Set OutMail = Nothing End If End If Next cell If column B contained an inventory list, could the above code be amended to add an inventory item to a word doc if there is a Y in column C? Thanks in advance for any assistance. DL |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use word to associate an item in validation drop down list | Excel Discussion (Misc queries) | |||
INVENTORY CONTROL BY SPECIFIC ITEM | Excel Discussion (Misc queries) | |||
I want to project when inventory will zero out on an item. | Excel Discussion (Misc queries) | |||
How do I build a excel sheet that counts item in an inventory | Excel Worksheet Functions | |||
How list inventory item codes so that they will be sorted correctl | Excel Discussion (Misc queries) |