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;
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
add a comment |
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
Do you want to send an email for every row in your table?
– Damian
Mar 8 at 18:59
add a comment |
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
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
excel vba
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Do you want to send an email for every row in your table?
– Damian
Mar 8 at 18:59