Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default emailing recipients from a list in Excel

I have the code to e-mail a spreadsheet and/or a reference
of cells to multiple recipients if I list the recipients
in the code. (recipients = array:("user1", "user2"))

Is there a way to have the code reference the spreadsheet
for the list of names instead of having them hard coded?

Also, Is there a way to turn off the security prompt that
either Outlook or Excel displays when sending an email?
(You are about to send an e-mail, are you sure you want to
do this?)

Thanks in advance!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default emailing recipients from a list in Excel

Hi Jeff,

The following macro will put all the contents of Column A in an Array
called Recipients:

Sub StoreRecipients()

Dim i As Integer
Dim Recipients() As Variant
i = 1

Do Until Cells(i, 1) = ""
ReDim Recipients(i)
Recipients(i) = Cells(i, 1)
i = i + 1
Loop

End Sub



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default emailing recipients from a list in Excel

Jeff

I have the code to e-mail a spreadsheet and/or a reference
of cells to multiple recipients if I list the recipients
in the code. (recipients = array:("user1", "user2"))

Is there a way to have the code reference the spreadsheet
for the list of names instead of having them hard coded?


Dim olMi as MailItem
Dim cell as Range

For Each cell in Range("A1:A10")
olMi.Recipients.Add cell.Value
Next cell

Also, Is there a way to turn off the security prompt that
either Outlook or Excel displays when sending an email?
(You are about to send an e-mail, are you sure you want to
do this?)


See here

http://www.rondebruin.nl/sendmail.htm#Prevent

There is no good way, in my opinion, but at least you'll know.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.


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
Creating emailing list from column of addresses Howard Excel Discussion (Misc queries) 2 April 9th 10 06:38 PM
Sending Excel sheet to 42 recipients doesn't work. Why? Excel Question Excel Discussion (Misc queries) 1 August 8th 07 01:02 PM
setting up a mailing list for bulk emailing with handimail OUTLOOK PROBLEMM Excel Discussion (Misc queries) 0 February 22nd 06 09:39 AM
when emailing xp excel documents recipients are unable to open teresamcallister Excel Discussion (Misc queries) 2 September 2nd 05 02:38 PM
How do I email selected excel cells to multiple recipients? AShaffer Excel Worksheet Functions 1 October 30th 04 01:37 PM


All times are GMT +1. The time now is 09:54 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"