Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-24-2008, 06:03 PM
Tyson
 
Posts: n/a
Macro that will add multiple emails based on a range of cell values

I need a macro that will basically look at one column and if it says
“Yes” put the email address in the email column in the .bcc. All the
email addresses need to be in one email by the way. Here is what my
data looks like starting in A4:

Yes Job Title email1@work.com
No Job Title email2@work.com
Yes Job Title email3@work.com
No Job Title email4@work.com

The list of emails is going to be variable too from month to month.

Thanks for the help,

Tyson
Reply With Quote
  #2 (permalink)  
Old 05-24-2008, 06:19 PM
Ron de Bruin
 
Posts: n/a
Re: Macro that will add multiple emails based on a range of cell values

See
http://www.rondebruin.nl/sendmail.htm

Choose a Outlook example and clik on the tip link
http://www.rondebruin.nl/mail/tips2.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Tyson" <tmunee@hotmail.com> wrote in message news:43564147-d7d7-4235-8d2a-749dc2d2a99b@w5g2000prd.googlegroups.com...
I need a macro that will basically look at one column and if it says
“Yes” put the email address in the email column in the .bcc. All the
email addresses need to be in one email by the way. Here is what my
data looks like starting in A4:

Yes Job Title email1@work.com
No Job Title email2@work.com
Yes Job Title email3@work.com
No Job Title email4@work.com

The list of emails is going to be variable too from month to month.

Thanks for the help,

Tyson

Reply With Quote
  #3 (permalink)  
Old 05-26-2008, 12:59 AM
Tyson
 
Posts: n/a
Re: Macro that will add multiple emails based on a range of cellvalues

This is somewhat helpful, but can someone give me a VBA answer based
on just my question?

Thanks,

Tsyon

On May 24, 10:19*am, "Ron de Bruin" <rondebr...@kabelfoon.nl> wrote:
> Seehttp://www.rondebruin.nl/sendmail.htm
>
> Choose a Outlook example and clik on the tip linkhttp://www.rondebruin.nl/mail/tips2.htm
>
> --
>
> Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm
>
> "Tyson" <tmu...@hotmail.com> wrote in messagenews:43564147-d7d7-4235-8d2a-749dc2d2a99b@w5g2000prd.googlegroups.com...
>
> I need a macro that will basically look at one column and if it says
> “Yes” put the email address in the email column in the .bcc. *All the
> email addresses need to be in one email by the way. *Here is what my
> data looks like starting in A4:
>
> Yes Job Title ema...@work.com
> No Job Title ema...@work.com
> Yes Job Title ema...@work.com
> No Job Title ema...@work.com
>
> The list of emails is going to be variable too from month to month.
>
> Thanks for the help,
>
> Tyson


Reply With Quote
  #4 (permalink)  
Old 05-26-2008, 04:18 AM
Ron de Bruin
 
Posts: n/a
Re: Macro that will add multiple emails based on a range of cell values

Is this not VBA <g>
http://www.rondebruin.nl/mail/tips2.htm

In the loop test also for Yes in column ?

Let us see what you have now




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Tyson" <tmunee@hotmail.com> wrote in message news:eddea897-2e53-4408-97f8-837d5d148ccf@t12g2000prg.googlegroups.com...
This is somewhat helpful, but can someone give me a VBA answer based
on just my question?

Thanks,

Tsyon

On May 24, 10:19 am, "Ron de Bruin" <rondebr...@kabelfoon.nl> wrote:
> Seehttp://www.rondebruin.nl/sendmail.htm
>
> Choose a Outlook example and clik on the tip linkhttp://www.rondebruin.nl/mail/tips2.htm
>
> --
>
> Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm
>
> "Tyson" <tmu...@hotmail.com> wrote in messagenews:43564147-d7d7-4235-8d2a-749dc2d2a99b@w5g2000prd.googlegroups.com...
>
> I need a macro that will basically look at one column and if it says
> “Yes” put the email address in the email column in the .bcc. All the
> email addresses need to be in one email by the way. Here is what my
> data looks like starting in A4:
>
> Yes Job Title ema...@work.com
> No Job Title ema...@work.com
> Yes Job Title ema...@work.com
> No Job Title ema...@work.com
>
> The list of emails is going to be variable too from month to month.
>
> Thanks for the help,
>
> Tyson


Reply With Quote
  #5 (permalink)  
Old 05-26-2008, 09:49 PM
Tyson
 
Posts: n/a
Re: Macro that will add multiple emails based on a range of cellvalues

Yes, what you put in the link is VBA, but it isn't custom to just my
question is the problem. You have too much stuff going on in your
link... I just want code that I can cut and copy from this post and
put it into my file.

My whole point was I wanted an "answer based on just my question."

If someone could do that I would VERY thankful,

Tyson


On May 25, 8:18*pm, "Ron de Bruin" <rondebr...@kabelfoon.nl> wrote:
> Is this not VBA *<g>http://www.rondebruin.nl/mail/tips2.htm
>
> In the loop test also for Yes in column ?
>
> Let us see what you have now
>
> --
>
> Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm
>
> "Tyson" <tmu...@hotmail.com> wrote in messagenews:eddea897-2e53-4408-97f8-837d5d148ccf@t12g2000prg.googlegroups.com...
>
> This is somewhat helpful, but can someone give me a VBA answer based
> on just my question?
>
> Thanks,
>
> Tsyon
>
> On May 24, 10:19 am, "Ron de Bruin" <rondebr...@kabelfoon.nl> wrote:
>
>
>
> > Seehttp://www.rondebruin.nl/sendmail.htm

>
> > Choose a Outlook example and clik on the tip linkhttp://www.rondebruin.nl/mail/tips2.htm

>
> > --

>
> > Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

>
> > "Tyson" <tmu...@hotmail.com> wrote in messagenews:43564147-d7d7-4235-8d2a-749dc2d2a99b@w5g2000prd.googlegroups.com...

>
> > I need a macro that will basically look at one column and if it says
> > “Yes” put the email address in the email column in the .bcc. All the
> > email addresses need to be in one email by the way. Here is what my
> > data looks like starting in A4:

>
> > Yes Job Title ema...@work.com
> > No Job Title ema...@work.com
> > Yes Job Title ema...@work.com
> > No Job Title ema...@work.com

>
> > The list of emails is going to be variable too from month to month.

>
> > Thanks for the help,

>
> > Tyson- Hide quoted text -

>
> - Show quoted text -


Reply With Quote
  #6 (permalink)  
Old 05-26-2008, 10:11 PM
Ron de Bruin
 
Posts: n/a
Re: Macro that will add multiple emails based on a range of cell values

>I just want code that I can cut and copy from this post and put it into my file.

I see that you not want to learn something.
In my first reply you have your answer (almost)


Example for Outlook

You can do this for a sheet named "Sheet1"
In col A yes/no and in Col D the mail addresses


Use Display instead of Send to test the code


Sub Mail_small_Text_Outlook()
' Is working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim cell As Range
Dim strto As String

On Error Resume Next
For Each cell In ThisWorkbook.Sheets("Sheet1") _
.Range("D1:D100").Cells.SpecialCells(xlCellTypeCon stants)
If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0, -3).Value) = "yes" Then
strto = strto & cell.Value & ";"
End If
Next cell
On Error GoTo 0
If Len(strto) > 0 Then strto = Left(strto, Len(strto) - 1)


Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"

On Error Resume Next
With OutMail
.To = "ron@debruin.nl"
.CC = ""
.BCC = strto
.Subject = "This is the Subject line"
.Body = strbody
.Send 'or use .Display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Tyson" <tmunee@hotmail.com> wrote in message news:52865a09-5de9-49c3-bb3f-7114aae787aa@t12g2000prg.googlegroups.com...
Yes, what you put in the link is VBA, but it isn't custom to just my
question is the problem. You have too much stuff going on in your
link... I just want code that I can cut and copy from this post and
put it into my file.

My whole point was I wanted an "answer based on just my question."

If someone could do that I would VERY thankful,

Tyson


On May 25, 8:18 pm, "Ron de Bruin" <rondebr...@kabelfoon.nl> wrote:
> Is this not VBA <g>http://www.rondebruin.nl/mail/tips2.htm
>
> In the loop test also for Yes in column ?
>
> Let us see what you have now
>
> --
>
> Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm
>
> "Tyson" <tmu...@hotmail.com> wrote in messagenews:eddea897-2e53-4408-97f8-837d5d148ccf@t12g2000prg.googlegroups.com...
>
> This is somewhat helpful, but can someone give me a VBA answer based
> on just my question?
>
> Thanks,
>
> Tsyon
>
> On May 24, 10:19 am, "Ron de Bruin" <rondebr...@kabelfoon.nl> wrote:
>
>
>
> > Seehttp://www.rondebruin.nl/sendmail.htm

>
> > Choose a Outlook example and clik on the tip linkhttp://www.rondebruin.nl/mail/tips2.htm

>
> > --

>
> > Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

>
> > "Tyson" <tmu...@hotmail.com> wrote in messagenews:43564147-d7d7-4235-8d2a-749dc2d2a99b@w5g2000prd.googlegroups.com...

>
> > I need a macro that will basically look at one column and if it says
> > “Yes” put the email address in the email column in the .bcc. All the
> > email addresses need to be in one email by the way. Here is what my
> > data looks like starting in A4:

>
> > Yes Job Title ema...@work.com
> > No Job Title ema...@work.com
> > Yes Job Title ema...@work.com
> > No Job Title ema...@work.com

>
> > The list of emails is going to be variable too from month to month.

>
> > Thanks for the help,

>
> > Tyson- Hide quoted text -

>
> - Show quoted text -


Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:05 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Remortgages | Debt Consolidation | MPAA | Debt Consolidation | Free Advertising



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114