How to filter each name in column and create an email for each filtered names? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experience Should we burninate the [wrap] tag?How to create Excel (.XLS and .XLSX) file in C# without installing Ms Office?Sending formatted Lotus Notes rich text email from Excel VBAOutlook 2010 VBA Task with attachmentsCopy data from worksheet to html file to mailHow to preserve/retain hyperlinks in email body when using RangetoHTML from ExcelVBA Code to send worksheet in email bodyInsert text body and excel table body in email using VBATrying to create personalized emails with multiple attachmentsExcel VBA macro to send emails to unique users in range

Letter Boxed validator

Output the ŋarâþ crîþ alphabet song without using (m)any letters

Is there a way in Ruby to make just any one out of many keyword arguments required?

How do I stop a creek from eroding my steep embankment?

If Jon Snow became King of the Seven Kingdoms what would his regnal number be?

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

Can Pao de Queijo, and similar foods, be kosher for Passover?

I am not a queen, who am I?

Bonus calculation: Am I making a mountain out of a molehill?

Did Kevin spill real chili?

Do I really need recursive chmod to restrict access to a folder?

Stars Make Stars

What does the "x" in "x86" represent?

Does surprise arrest existing movement?

Antler Helmet: Can it work?

Should I use Javascript Classes or Apex Classes in Lightning Web Components?

Is there a concise way to say "all of the X, one of each"?

How can I make names more distinctive without making them longer?

WAN encapsulation

Why is "Consequences inflicted." not a sentence?

What is the longest distance a 13th-level monk can jump while attacking on the same turn?

Why did the IBM 650 use bi-quinary?

IndentationError when pasting code in Python 3 interpreter mode

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?



How to filter each name in column and create an email for each filtered names?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experience
Should we burninate the [wrap] tag?How to create Excel (.XLS and .XLSX) file in C# without installing Ms Office?Sending formatted Lotus Notes rich text email from Excel VBAOutlook 2010 VBA Task with attachmentsCopy data from worksheet to html file to mailHow to preserve/retain hyperlinks in email body when using RangetoHTML from ExcelVBA Code to send worksheet in email bodyInsert text body and excel table body in email using VBATrying to create personalized emails with multiple attachmentsExcel VBA macro to send emails to unique users in range



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















So I have this code which filter 1 name in the column and will send an email to the filtered user along with its data. How can I do a for next loop that will filter the other names in column A that will do the same on sending an email?



Sub Button1_Click()

Dim Outlook As Object
Dim Email As Object
Dim opmail As Object
Dim page As Object
Dim outApp As Object
Dim outRec As Object
Dim outAL As Object
Dim outTI As Object
Dim newSh As Worksheet
'Dim recName As String
Dim rng As Range

myFile = Application.GetOpenFilename(, , "Browse for Workbook")
If myFile = False Then Exit Sub
Set wb = Workbooks.Open(myFile)
'Set wb = ActiveSheet

wb.ActiveSheet.Range("callbackqueue[#ALL]").AutoFilter Field:=1,
Criteria1:=Array("CALMA"), Operator:=xlAnd

'Next

Set outApp = CreateObject("Outlook.Application")
Set outAL = outApp.Session.AddressLists.Item("Global Address List")
Set outTI = outApp.CreateItem(0)


bankSID = InputBox("Enter SID")
Set outRec = outTI.Recipients.Add(bankSID)
outRec.Resolve
recName = outRec.AddressEntry.Name

'With Email
With outTI
.To = bankSID
.Subject = "Subject Line"
.Body = "See assigned information below" & vbCrLf & "Regards"
.Display

'Set opmail = Email.GetInspector
Set outAL = outTI.GetInspector
Set page = outAL.WordEditor


ActiveSheet.Range("A6:E16").Copy

page.Application.Selection.Start = Len(.Body)
page.Application.Selection.End = page.Application.Selection.Start
page.Application.Selection.PasteandFormat (wdFormatPlainText)
.Display
.Send
Set page = Nothing
Set opmail = Nothing





End With

Set Email = Nothing
Set Outlook = Nothing
End Sub


Sorry for the question still beginning to understand VB.










share|improve this question
























  • Do you want to send an email for every row in your table?

    – Damian
    Mar 8 at 18:59

















0















So I have this code which filter 1 name in the column and will send an email to the filtered user along with its data. How can I do a for next loop that will filter the other names in column A that will do the same on sending an email?



Sub Button1_Click()

Dim Outlook As Object
Dim Email As Object
Dim opmail As Object
Dim page As Object
Dim outApp As Object
Dim outRec As Object
Dim outAL As Object
Dim outTI As Object
Dim newSh As Worksheet
'Dim recName As String
Dim rng As Range

myFile = Application.GetOpenFilename(, , "Browse for Workbook")
If myFile = False Then Exit Sub
Set wb = Workbooks.Open(myFile)
'Set wb = ActiveSheet

wb.ActiveSheet.Range("callbackqueue[#ALL]").AutoFilter Field:=1,
Criteria1:=Array("CALMA"), Operator:=xlAnd

'Next

Set outApp = CreateObject("Outlook.Application")
Set outAL = outApp.Session.AddressLists.Item("Global Address List")
Set outTI = outApp.CreateItem(0)


bankSID = InputBox("Enter SID")
Set outRec = outTI.Recipients.Add(bankSID)
outRec.Resolve
recName = outRec.AddressEntry.Name

'With Email
With outTI
.To = bankSID
.Subject = "Subject Line"
.Body = "See assigned information below" & vbCrLf & "Regards"
.Display

'Set opmail = Email.GetInspector
Set outAL = outTI.GetInspector
Set page = outAL.WordEditor


ActiveSheet.Range("A6:E16").Copy

page.Application.Selection.Start = Len(.Body)
page.Application.Selection.End = page.Application.Selection.Start
page.Application.Selection.PasteandFormat (wdFormatPlainText)
.Display
.Send
Set page = Nothing
Set opmail = Nothing





End With

Set Email = Nothing
Set Outlook = Nothing
End Sub


Sorry for the question still beginning to understand VB.










share|improve this question
























  • Do you want to send an email for every row in your table?

    – Damian
    Mar 8 at 18:59













0












0








0








So I have this code which filter 1 name in the column and will send an email to the filtered user along with its data. How can I do a for next loop that will filter the other names in column A that will do the same on sending an email?



Sub Button1_Click()

Dim Outlook As Object
Dim Email As Object
Dim opmail As Object
Dim page As Object
Dim outApp As Object
Dim outRec As Object
Dim outAL As Object
Dim outTI As Object
Dim newSh As Worksheet
'Dim recName As String
Dim rng As Range

myFile = Application.GetOpenFilename(, , "Browse for Workbook")
If myFile = False Then Exit Sub
Set wb = Workbooks.Open(myFile)
'Set wb = ActiveSheet

wb.ActiveSheet.Range("callbackqueue[#ALL]").AutoFilter Field:=1,
Criteria1:=Array("CALMA"), Operator:=xlAnd

'Next

Set outApp = CreateObject("Outlook.Application")
Set outAL = outApp.Session.AddressLists.Item("Global Address List")
Set outTI = outApp.CreateItem(0)


bankSID = InputBox("Enter SID")
Set outRec = outTI.Recipients.Add(bankSID)
outRec.Resolve
recName = outRec.AddressEntry.Name

'With Email
With outTI
.To = bankSID
.Subject = "Subject Line"
.Body = "See assigned information below" & vbCrLf & "Regards"
.Display

'Set opmail = Email.GetInspector
Set outAL = outTI.GetInspector
Set page = outAL.WordEditor


ActiveSheet.Range("A6:E16").Copy

page.Application.Selection.Start = Len(.Body)
page.Application.Selection.End = page.Application.Selection.Start
page.Application.Selection.PasteandFormat (wdFormatPlainText)
.Display
.Send
Set page = Nothing
Set opmail = Nothing





End With

Set Email = Nothing
Set Outlook = Nothing
End Sub


Sorry for the question still beginning to understand VB.










share|improve this question
















So I have this code which filter 1 name in the column and will send an email to the filtered user along with its data. How can I do a for next loop that will filter the other names in column A that will do the same on sending an email?



Sub Button1_Click()

Dim Outlook As Object
Dim Email As Object
Dim opmail As Object
Dim page As Object
Dim outApp As Object
Dim outRec As Object
Dim outAL As Object
Dim outTI As Object
Dim newSh As Worksheet
'Dim recName As String
Dim rng As Range

myFile = Application.GetOpenFilename(, , "Browse for Workbook")
If myFile = False Then Exit Sub
Set wb = Workbooks.Open(myFile)
'Set wb = ActiveSheet

wb.ActiveSheet.Range("callbackqueue[#ALL]").AutoFilter Field:=1,
Criteria1:=Array("CALMA"), Operator:=xlAnd

'Next

Set outApp = CreateObject("Outlook.Application")
Set outAL = outApp.Session.AddressLists.Item("Global Address List")
Set outTI = outApp.CreateItem(0)


bankSID = InputBox("Enter SID")
Set outRec = outTI.Recipients.Add(bankSID)
outRec.Resolve
recName = outRec.AddressEntry.Name

'With Email
With outTI
.To = bankSID
.Subject = "Subject Line"
.Body = "See assigned information below" & vbCrLf & "Regards"
.Display

'Set opmail = Email.GetInspector
Set outAL = outTI.GetInspector
Set page = outAL.WordEditor


ActiveSheet.Range("A6:E16").Copy

page.Application.Selection.Start = Len(.Body)
page.Application.Selection.End = page.Application.Selection.Start
page.Application.Selection.PasteandFormat (wdFormatPlainText)
.Display
.Send
Set page = Nothing
Set opmail = Nothing





End With

Set Email = Nothing
Set Outlook = Nothing
End Sub


Sorry for the question still beginning to understand VB.







excel vba






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 11 at 8:47









Pᴇʜ

25.3k63052




25.3k63052










asked Mar 8 at 16:12









aquinokjaquinokj

1




1












  • Do you want to send an email for every row in your table?

    – Damian
    Mar 8 at 18:59

















  • Do you want to send an email for every row in your table?

    – Damian
    Mar 8 at 18:59
















Do you want to send an email for every row in your table?

– Damian
Mar 8 at 18:59





Do you want to send an email for every row in your table?

– Damian
Mar 8 at 18:59












1 Answer
1






active

oldest

votes


















0














Aquinokj, if you want all the people in the named-ranged, callbackqueue, Then you can do a For Each loop. Or, you can use an InputBox to assign the value - lots of ways, just need more info... But...



Just an example:



Option Explicit

Sub CopyStuff()

Dim ws As Worksheet
Dim cell As Range

Set ws = ThisWorkbook.ActiveSheet

For Each cell In ws.UsedRange.Columns(1).Cells
wb.ActiveSheet.Range("callbackqueue[#ALL]").AutoFilter Field:=1, _
Criteria1:=Array(cell.Value), Operator:=xlAnd

'rest of code here

Next

End Sub





share|improve this answer























  • I was trying to the for each loop which it will pass names until new name comes up to send an email notice.Sample table this are all in 1 column. It will skip sending if the same name appears on the table. until all names different names will received a notice CALMA CALMA CALMA CALMA CALMA CALMA ESPENO ESPENO ESPENO ESPENO ESPENO ESPENO FARINAS FARINAS FARINAS FARINAS FARINAS FARINAS FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER GRISIUS GRISIUS GRISIUS GRISIUS GRISIUS MURPHY

    – aquinokj
    Mar 14 at 14:59












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066987%2fhow-to-filter-each-name-in-column-and-create-an-email-for-each-filtered-names%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Aquinokj, if you want all the people in the named-ranged, callbackqueue, Then you can do a For Each loop. Or, you can use an InputBox to assign the value - lots of ways, just need more info... But...



Just an example:



Option Explicit

Sub CopyStuff()

Dim ws As Worksheet
Dim cell As Range

Set ws = ThisWorkbook.ActiveSheet

For Each cell In ws.UsedRange.Columns(1).Cells
wb.ActiveSheet.Range("callbackqueue[#ALL]").AutoFilter Field:=1, _
Criteria1:=Array(cell.Value), Operator:=xlAnd

'rest of code here

Next

End Sub





share|improve this answer























  • I was trying to the for each loop which it will pass names until new name comes up to send an email notice.Sample table this are all in 1 column. It will skip sending if the same name appears on the table. until all names different names will received a notice CALMA CALMA CALMA CALMA CALMA CALMA ESPENO ESPENO ESPENO ESPENO ESPENO ESPENO FARINAS FARINAS FARINAS FARINAS FARINAS FARINAS FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER GRISIUS GRISIUS GRISIUS GRISIUS GRISIUS MURPHY

    – aquinokj
    Mar 14 at 14:59
















0














Aquinokj, if you want all the people in the named-ranged, callbackqueue, Then you can do a For Each loop. Or, you can use an InputBox to assign the value - lots of ways, just need more info... But...



Just an example:



Option Explicit

Sub CopyStuff()

Dim ws As Worksheet
Dim cell As Range

Set ws = ThisWorkbook.ActiveSheet

For Each cell In ws.UsedRange.Columns(1).Cells
wb.ActiveSheet.Range("callbackqueue[#ALL]").AutoFilter Field:=1, _
Criteria1:=Array(cell.Value), Operator:=xlAnd

'rest of code here

Next

End Sub





share|improve this answer























  • I was trying to the for each loop which it will pass names until new name comes up to send an email notice.Sample table this are all in 1 column. It will skip sending if the same name appears on the table. until all names different names will received a notice CALMA CALMA CALMA CALMA CALMA CALMA ESPENO ESPENO ESPENO ESPENO ESPENO ESPENO FARINAS FARINAS FARINAS FARINAS FARINAS FARINAS FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER GRISIUS GRISIUS GRISIUS GRISIUS GRISIUS MURPHY

    – aquinokj
    Mar 14 at 14:59














0












0








0







Aquinokj, if you want all the people in the named-ranged, callbackqueue, Then you can do a For Each loop. Or, you can use an InputBox to assign the value - lots of ways, just need more info... But...



Just an example:



Option Explicit

Sub CopyStuff()

Dim ws As Worksheet
Dim cell As Range

Set ws = ThisWorkbook.ActiveSheet

For Each cell In ws.UsedRange.Columns(1).Cells
wb.ActiveSheet.Range("callbackqueue[#ALL]").AutoFilter Field:=1, _
Criteria1:=Array(cell.Value), Operator:=xlAnd

'rest of code here

Next

End Sub





share|improve this answer













Aquinokj, if you want all the people in the named-ranged, callbackqueue, Then you can do a For Each loop. Or, you can use an InputBox to assign the value - lots of ways, just need more info... But...



Just an example:



Option Explicit

Sub CopyStuff()

Dim ws As Worksheet
Dim cell As Range

Set ws = ThisWorkbook.ActiveSheet

For Each cell In ws.UsedRange.Columns(1).Cells
wb.ActiveSheet.Range("callbackqueue[#ALL]").AutoFilter Field:=1, _
Criteria1:=Array(cell.Value), Operator:=xlAnd

'rest of code here

Next

End Sub






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 9 at 20:05









J VBAJ VBA

17715




17715












  • I was trying to the for each loop which it will pass names until new name comes up to send an email notice.Sample table this are all in 1 column. It will skip sending if the same name appears on the table. until all names different names will received a notice CALMA CALMA CALMA CALMA CALMA CALMA ESPENO ESPENO ESPENO ESPENO ESPENO ESPENO FARINAS FARINAS FARINAS FARINAS FARINAS FARINAS FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER GRISIUS GRISIUS GRISIUS GRISIUS GRISIUS MURPHY

    – aquinokj
    Mar 14 at 14:59


















  • I was trying to the for each loop which it will pass names until new name comes up to send an email notice.Sample table this are all in 1 column. It will skip sending if the same name appears on the table. until all names different names will received a notice CALMA CALMA CALMA CALMA CALMA CALMA ESPENO ESPENO ESPENO ESPENO ESPENO ESPENO FARINAS FARINAS FARINAS FARINAS FARINAS FARINAS FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER GRISIUS GRISIUS GRISIUS GRISIUS GRISIUS MURPHY

    – aquinokj
    Mar 14 at 14:59

















I was trying to the for each loop which it will pass names until new name comes up to send an email notice.Sample table this are all in 1 column. It will skip sending if the same name appears on the table. until all names different names will received a notice CALMA CALMA CALMA CALMA CALMA CALMA ESPENO ESPENO ESPENO ESPENO ESPENO ESPENO FARINAS FARINAS FARINAS FARINAS FARINAS FARINAS FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER GRISIUS GRISIUS GRISIUS GRISIUS GRISIUS MURPHY

– aquinokj
Mar 14 at 14:59






I was trying to the for each loop which it will pass names until new name comes up to send an email notice.Sample table this are all in 1 column. It will skip sending if the same name appears on the table. until all names different names will received a notice CALMA CALMA CALMA CALMA CALMA CALMA ESPENO ESPENO ESPENO ESPENO ESPENO ESPENO FARINAS FARINAS FARINAS FARINAS FARINAS FARINAS FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER FEASTER GRISIUS GRISIUS GRISIUS GRISIUS GRISIUS MURPHY

– aquinokj
Mar 14 at 14:59




















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066987%2fhow-to-filter-each-name-in-column-and-create-an-email-for-each-filtered-names%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

Алба-Юлія

Захаров Федір Захарович