[AccessD] A2003: Outlook not working using redemption -DESPERATE

Charlotte Foust cfoust at infostatsystems.com
Thu Mar 17 17:27:11 CST 2005


I'm not sure I understand the question.  It will create one email with
all the To addresses, but each addressee will get an email showing all
the To addresses, and I don't think you would want that.  We use this in
our applications when a report is being sent to a number of different
email addresses.  We certainly don't create an email for each, but we
also don't send a hundred of them at once!  An alternative would be to
added the recipients to the BCC, which only shows the individual
addressee their own address.

Charlotte Foust


-----Original Message-----
From: Darren DICK [mailto:d.dick at uws.edu.au] 
Sent: Thursday, March 17, 2005 2:05 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] A2003: Outlook not working using redemption
-DESPERATE


Hi All
Many thanks for the responses
Andy's suggestion was the answer 
I was only setting up the email once
I had to put it 'in the loop' so to speak

Thanks to Erwin and Charlotte too for the info on resolving

Charlotte I see in your response you have  the line
        omsg.Recipients.Add rs!EmailAddress
Does this mean I can build the string of addresses then push it out as
one Super email or will it still 'produce' 100 emails if there are 100
email addresses?

Many thanks

Andy - you da man
SYWYE

Darren


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
Foust
Sent: Friday, 18 March 2005 3:59 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] A2003: Outlook not working using redemption
-DESPERATE

It works the same way with Redemption.  You must resolve the recipients.

        omsg.Recipients.Add rs!EmailAddress
        omsg.Recipients.ResolveAll

Charlotte Foust


-----Original Message-----
From: Erwin Craps - IT Helps [mailto:Erwin.Craps at ithelps.be]
Sent: Thursday, March 17, 2005 1:16 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] A2003: Outlook not working using redemption
-DESPERATE


Don't know redemption but I had some problems with Outlook 11

The e-mailadresses need to be resolved BEFORE sending.
This can be done with 

mItem.Recipients.ResolveAll
(mItem is a Outlook mailitem)

Also I noticed there is a bug in Outlook with this resolve thing. When
the new message is hidden the recipients do not resolve. So you first
need to display the message and resolve again...

I noticed that the folowing code works fine for me.

mItem.Display 'Needed to resolve: bug??? mItem.Recipients.ResolveAll
Debug.Print mItem.Recipients.ResolveAll Do While
mItem.Recipients.ResolveAll = False
	DoEvents
      Debug.Print "Waiting for recipients resolve."
      mItem.Recipients.ResolveAll
Loop
mItem.Send


Please bare in mind this is with a outlook message Item!

Erwin
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren DICK
Sent: Thursday, March 17, 2005 6:23 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] A2003: Outlook not working using redemption
-DESPERATE

Hi all
2nd Posting
I have now wasted a total of 6 and a half hours on this It can't be that
difficult - surely

Can someone please help?

Code below modified from my previous post

I have references to Outlook 11
I have references to Redemption
All that side of things is OK
I can send up to 2 emails before the code chokes The email addresses are
real, they work

All I want this thing to do is
Create the message then send it - loop the recordset then Create the
message then send it - loop the recordset then...

Simple <sigh>

Many thanks 

Darren

<Code>
Dim db As DAO.Database
Dim selSQL As String
Dim rs As DAO.Recordset

Dim gappOutlook As New Outlook.Application Dim omsg Dim msg

Set db = CurrentDb()
selSQL = "Select tmp_tblEmailAddresses.* from tmp_tblEmailAddresses" Set
rs = db.OpenRecordset(selSQL, dbOpenSnapshot)

Set omsg = gappOutlook.CreateItem(olMailItem)
Set msg = New Redemption.SafeMailItem

msg.Item = omsg

        With rs
            Do While Not .EOF
                With msg
                    .To = rs!EmailAddress
                    .cc = Me.txtCC
                    .bcc = Me.txtBCC
                    .Subject = Me.txtSubject 
                    .Attachments.Add Me.txtATTACH 
                    .Body = Me.txtBody
                    '.Display ' shows it in the email client before
sending
                    .Send
               End With
                .MoveNext
            Loop
        End With
    
   </Code>
    




--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list