LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default bulk mailing problem

Hi,

I'm writing an utility for our club to keep track of adresses,
members, finance,...
One posibility is to send automaticaly an email to all members in the
month of December for their membership renewal.
I have now 24 email addresses where i have to send the message, and
this list will extend, but it won't work.

I do have an error when sending the mail, saying there's an email
address refused.
When i copy / paste the strMailto string into the 'To' field from
Outlook Express, it does work. Strange, isn't it?
I'm using Excel 2000 (NO service packs installed !) & Outlook Express
5.5

Question:
1) How many recipient addresses can i place in the 'To' textbox?
2) How can i create with VBA code a 'Group' with recipient addresses,
so hopefully preventing above problem.
Let say that i have in the future 500 recipient addresses where i do
have to send the same message.

I use following code in the frmBulkMail form to create the mail:
REMARK : The strMailTo variable is a Public variable

Public strMailTo as String

Private Sub cmdSendMembers_Click()
MemberMailAddresses 'create recipient list - strMailTo contains
ALL recipient addresses
Sheets("blad1").Activate
Send 'send the mail
With Me
.txtSubject.Enabled = True 'enable subject field for
input
End With
blContactMe = False
Unload Me
End Sub
-------------------------------
This routine creates the recipient string

Sub MemberMailAddresses()
Dim PreviousAddress As String
Dim ActualAddress As String
strMailTo = ""
Sheets("members").Activate
Range("J2").Select 'this column contains the email address
Do
Selection.Offset(1, 0).Select 'select next email address
PreviousAddress = Trim(Selection.Offset(-1, 0).Value)
ActualAddress = Trim(ActiveCell.Value)
If PreviousAddress = ActualAddress Or ActualAddress = "" Then 'if
PreviousAddress equals ActualAddress or ActualAddress = empty, select
next row
Selection.Offset(1, 0).Select
End If
If Trim(PreviousAddress) < "" Then
strMailTo = strMailTo & PreviousAddress & ";" 'create
recipient string, separate the address by ;
End If
Loop Until Selection.Offset(0, 1).Value = False 'True if member,
False if no member
'remove last pointcomma
strMailTo = Left$(strMailTo, Len(strMailTo) - 1) 'remove last ;
in recipient string 'strMailTo'
Debug.Print strMailTo
End Sub
--------------------------------
This routine is used to send the message using the 'strMailTo' string
as recipient

Sub Send()
frmBulkMail.MAPIMessages1.MsgIndex = -1
frmBulkMail.MAPISession1.SignOn
frmBulkMail.MAPIMessages1.SessionID =
frmBulkMail.MAPISession1.SessionID
If blContactMe = True Then
frmBulkMail.MAPIMessages1.RecipAddress =
"
Else
frmBulkMail.MAPIMessages1.RecipAddress = Trim(strMailTo)
End If
If Trim(frmBulkMail.txtSubject) = "" Then
frmBulkMail.MAPIMessages1.MsgSubject = "Dit is een
automatische mail verstuurd door BeLUG Admin."
Else
frmBulkMail.MAPIMessages1.MsgSubject = frmBulkMail.txtSubject
End If
frmBulkMail.MAPIMessages1.MsgNoteText = frmBulkMail.tbMessage
frmBulkMail.MAPIMessages1.Send
frmBulkMail.MAPISession1.DownLoadMail = True
frmBulkMail.MAPISession1.SignOff
End Sub

Thanks for any help,
Regards,
Ludo
 
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
bulk mailing from excel list Sourabh Excel Discussion (Misc queries) 2 January 11th 10 06:13 PM
I need to import my Excel Mailing list into mailing label format. Lyn Excel Discussion (Misc queries) 0 November 5th 09 08:11 PM
setting up a mailing list for bulk emailing with handimail OUTLOOK PROBLEMM Excel Discussion (Misc queries) 0 February 22nd 06 09:39 AM
Problem mailing as an attachment CJz New Users to Excel 3 April 14th 05 08:53 PM
Problem mailing as an attachment CJz Setting up and Configuration of Excel 2 April 14th 05 08:46 PM


All times are GMT +1. The time now is 03:32 AM.

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

About Us

"It's about Microsoft Excel"