Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default automating email (CC:)

hi,
my question is, i have a macro that automates an email
to be sent out of excel from a data dump. i've
used "email" to get the email address and automatically go
into the To: line does anyone know how i can get another
row of cells to go into the CC: line? cause nothing i've
tried has worked. i hope i'm asking this right. thanks in
advance.
-q
here's some of my code:

r = 2
Do Until (Cells(r, 1) = "")


email = Cells(r, 8) ' Get Email address
Subj = Cells(r, 9) ' Get Award Name as Subject
...
...
...
'Format URL to work with Mail program by replacing spaces
with %20 and returns with %0D%0A
Subj = Application.WorksheetFunction.Substitute
(Subj, " ", "%20")
Msg = Application.WorksheetFunction.Substitute
(Msg, " ", "%20")

Msg = Application.WorksheetFunction.Substitute(Msg,
vbCrLf, "%0D%0A")

'Create the URL
URL = "mailto:" & email & "?subject=" & Subj
& "&body=" & Msg
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default automating email (CC:)

See answer in Misc

Please post in one group

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Q" wrote in message ...
hi,
my question is, i have a macro that automates an email
to be sent out of excel from a data dump. i've
used "email" to get the email address and automatically go
into the To: line does anyone know how i can get another
row of cells to go into the CC: line? cause nothing i've
tried has worked. i hope i'm asking this right. thanks in
advance.
-q
here's some of my code:

r = 2
Do Until (Cells(r, 1) = "")


email = Cells(r, 8) ' Get Email address
Subj = Cells(r, 9) ' Get Award Name as Subject
...
...
...
'Format URL to work with Mail program by replacing spaces
with %20 and returns with %0D%0A
Subj = Application.WorksheetFunction.Substitute
(Subj, " ", "%20")
Msg = Application.WorksheetFunction.Substitute
(Msg, " ", "%20")

Msg = Application.WorksheetFunction.Substitute(Msg,
vbCrLf, "%0D%0A")

'Create the URL
URL = "mailto:" & email & "?subject=" & Subj
& "&body=" & Msg



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Macro how to create email link for the email addresses in aRange or Selection Satish[_2_] Excel Worksheet Functions 8 December 28th 09 03:30 PM
send wkbk as an email attachment with an email address copied from SueInAtl Excel Discussion (Misc queries) 0 May 21st 07 10:53 PM
Transfer Email addresses from spreadsheet to email address book Beana Excel Discussion (Misc queries) 2 May 30th 06 06:07 PM
Email editor closes when forwarding Excel-embedded email Bambina Setting up and Configuration of Excel 0 March 16th 06 10:45 PM
Automating email using Lotus Notes Will Francis Excel Programming 0 August 25th 03 10:56 AM


All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"