<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using Access and Outlook to Send To Mailing Lists</title>
	<atom:link href="http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/</link>
	<description>Keeping Computers Happy Since 1997</description>
	<lastBuildDate>Sun, 05 Sep 2010 16:24:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-2078</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Mon, 03 May 2010 11:59:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-2078</guid>
		<description>VBA&#039;s Recipients.add collection only allows you pass in the email address; however, there&#039;s a rich object model to the recipient object, we just need to make it available to us.  Happily, Access gives us that object when we assign it to the message... in our old code, we didn&#039;t need the object, so we ignored it -- we just ADDed the email address and got on with our lives... but we could, if we wanted, say &quot;Hey, Access -- if we assign an email address, can you point us to that address we just created?&quot;  And it can, so everyone wins.

So, first, we need to establish the variable that is going to hold the RECIPIENT object we added to the message.  Add this piece of code that DIMs the Recipient object where we DIM our other variables:

&lt;strong&gt;Dim MyRecip as Outlook.Recipient&lt;/strong&gt;

Then, inside the loop, instead of using 

           &lt;em&gt;MyMail.Recipients.Add MailList(&quot;email&quot;) &lt;/em&gt;

Use:

        &lt;em&gt; Set MyRecip = MyMail.Recipients.Add(maillist(&quot;email&quot;)) 
         MyRecip.Type = olBCC &#039; sets the latest recipient as BCC&lt;/em&gt;

At the end, for good measure, we should clean up after ourselves:

&lt;em&gt;Set MyRecip = Nothing&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>VBA&#8217;s Recipients.add collection only allows you pass in the email address; however, there&#8217;s a rich object model to the recipient object, we just need to make it available to us.  Happily, Access gives us that object when we assign it to the message&#8230; in our old code, we didn&#8217;t need the object, so we ignored it &#8212; we just ADDed the email address and got on with our lives&#8230; but we could, if we wanted, say &#8220;Hey, Access &#8212; if we assign an email address, can you point us to that address we just created?&#8221;  And it can, so everyone wins.</p>
<p>So, first, we need to establish the variable that is going to hold the RECIPIENT object we added to the message.  Add this piece of code that DIMs the Recipient object where we DIM our other variables:</p>
<p><strong>Dim MyRecip as Outlook.Recipient</strong></p>
<p>Then, inside the loop, instead of using </p>
<p>           <em>MyMail.Recipients.Add MailList(&#8220;email&#8221;) </em></p>
<p>Use:</p>
<p>        <em> Set MyRecip = MyMail.Recipients.Add(maillist(&#8220;email&#8221;))<br />
         MyRecip.Type = olBCC &#8216; sets the latest recipient as BCC</em></p>
<p>At the end, for good measure, we should clean up after ourselves:</p>
<p><em>Set MyRecip = Nothing</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-2075</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 03 May 2010 05:41:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-2075</guid>
		<description>Jeff, I was using your earlier code to send an email from access: 

   Do Until MailList.EOF 
 
            &#039; This adds the address to the list of recipients 
            MyMail.Recipients.Add MailList(&quot;email&quot;) 
 
            &#039;And on to the next one... 
 
    MailList.MoveNext 
 
Loop 

This defaults to putting the addresses in the To line, how can I put them in the BCC line?

Thanks,
Mike</description>
		<content:encoded><![CDATA[<p>Jeff, I was using your earlier code to send an email from access: </p>
<p>   Do Until MailList.EOF </p>
<p>            &#8216; This adds the address to the list of recipients<br />
            MyMail.Recipients.Add MailList(&#8220;email&#8221;) </p>
<p>            &#8216;And on to the next one&#8230; </p>
<p>    MailList.MoveNext </p>
<p>Loop </p>
<p>This defaults to putting the addresses in the To line, how can I put them in the BCC line?</p>
<p>Thanks,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-2010</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Mon, 26 Apr 2010 11:22:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-2010</guid>
		<description>Dan,

Outlook only puts the signature into a blank message.

However, the signature is just a text (or HTML) file, but you have to find it.  It&#039;s fairly well hidden in the registry, in binary fields to boot, but here&#039;s a decent solution that seems to work.

http://www.rondebruin.nl/mail/folder3/signature.htm</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>Outlook only puts the signature into a blank message.</p>
<p>However, the signature is just a text (or HTML) file, but you have to find it.  It&#8217;s fairly well hidden in the registry, in binary fields to boot, but here&#8217;s a decent solution that seems to work.</p>
<p><a href="http://www.rondebruin.nl/mail/folder3/signature.htm" rel="nofollow">http://www.rondebruin.nl/mail/folder3/signature.htm</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-1943</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sun, 18 Apr 2010 22:16:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-1943</guid>
		<description>Hi Jeff,

Great site - exactly what I needed.  

One quick request - I changed the code some to either pre-populate text into the email body or leave it blank for the user to edit themselves when the email is displayed depending on different conditions.  

When I don&#039;t pre-populate the text, the email is displayed and the email body only contains the user&#039;s default Outlook email signature.  I would like to include their default Outlook email signature at the end of the pre-populated text as well.  

How can this be accomplished?

Thanks,
Dan</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>Great site &#8211; exactly what I needed.  </p>
<p>One quick request &#8211; I changed the code some to either pre-populate text into the email body or leave it blank for the user to edit themselves when the email is displayed depending on different conditions.  </p>
<p>When I don&#8217;t pre-populate the text, the email is displayed and the email body only contains the user&#8217;s default Outlook email signature.  I would like to include their default Outlook email signature at the end of the pre-populated text as well.  </p>
<p>How can this be accomplished?</p>
<p>Thanks,<br />
Dan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-1618</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Tue, 16 Mar 2010 17:53:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-1618</guid>
		<description>You might also want to have a look at this:

http://www.mapilab.com/outlook/security/</description>
		<content:encoded><![CDATA[<p>You might also want to have a look at this:</p>
<p><a href="http://www.mapilab.com/outlook/security/" rel="nofollow">http://www.mapilab.com/outlook/security/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-1617</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Tue, 16 Mar 2010 17:48:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-1617</guid>
		<description>Simple, change the one line of code from &quot;MyMail.Send&quot; to &quot;MyMail.Display&quot;

The code is in there, it is just commented out.  Move the apostrophe from the .Display line to the .Send line and you&#039;ll get your 240 open messages - assuming Windows&#039; GDI layer doesn&#039;t crap out first. :-)</description>
		<content:encoded><![CDATA[<p>Simple, change the one line of code from &#8220;MyMail.Send&#8221; to &#8220;MyMail.Display&#8221;</p>
<p>The code is in there, it is just commented out.  Move the apostrophe from the .Display line to the .Send line and you&#8217;ll get your 240 open messages &#8211; assuming Windows&#8217; GDI layer doesn&#8217;t crap out first. <img src='http://www.jephens.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Culkar</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-1616</link>
		<dc:creator>Joseph Culkar</dc:creator>
		<pubDate>Tue, 16 Mar 2010 17:34:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-1616</guid>
		<description>Hi Jeff,

I just finished pasting 240 separate emails into 240 Outlook email messages (I created these 240 blank email messages by creating one master message, saving it as a DRAFT, and then copying it to get 240 messages).  Then I googled &amp; found your site ;-(

I would like to know if there is a way to use code to create the 240 copies and populate the TO: email address, leaving me with the task of only pushing the SEND button for each of the messages that is open.  I think that this would be faster than using code to press the SEND button as there is no built-in 305 second security delay to wait upon.

TIA!

Joe
Northville, MI</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>I just finished pasting 240 separate emails into 240 Outlook email messages (I created these 240 blank email messages by creating one master message, saving it as a DRAFT, and then copying it to get 240 messages).  Then I googled &amp; found your site ;-(</p>
<p>I would like to know if there is a way to use code to create the 240 copies and populate the TO: email address, leaving me with the task of only pushing the SEND button for each of the messages that is open.  I think that this would be faster than using code to press the SEND button as there is no built-in 305 second security delay to wait upon.</p>
<p>TIA!</p>
<p>Joe<br />
Northville, MI</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-1045</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Tue, 13 Oct 2009 22:12:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-1045</guid>
		<description>Phil,

Outlook 2007 adds a MailItem.SendUsingAccount property, and in 2003 you can use some semi-ugly hack/kludge to do the job providing you meet some criteria (not using Word as your editor, etc.)

You can find that code here -- I&#039;ve not tried or tested it, nor do I have any idea how to integrate into my routines:

http://www.outlookcode.com/codedetail.aspx?id=889

Jeff</description>
		<content:encoded><![CDATA[<p>Phil,</p>
<p>Outlook 2007 adds a MailItem.SendUsingAccount property, and in 2003 you can use some semi-ugly hack/kludge to do the job providing you meet some criteria (not using Word as your editor, etc.)</p>
<p>You can find that code here &#8212; I&#8217;ve not tried or tested it, nor do I have any idea how to integrate into my routines:</p>
<p><a href="http://www.outlookcode.com/codedetail.aspx?id=889" rel="nofollow">http://www.outlookcode.com/codedetail.aspx?id=889</a></p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-1044</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Tue, 13 Oct 2009 16:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-1044</guid>
		<description>Hi Jeff,

Great site and I have been looking at your email code. I thought this was a perennial problem, but nobody has asked you yet so here goes:
Can I use this code (or any) to change the &#039;From&#039; address. 

I send an email to the buyer of my products, and a similar email to the despatcher telling them what to send.

I want one to have my professional shop address, and one to have my &#039;phil&#039; address.

Thanks,
Phil</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>Great site and I have been looking at your email code. I thought this was a perennial problem, but nobody has asked you yet so here goes:<br />
Can I use this code (or any) to change the &#8216;From&#8217; address. </p>
<p>I send an email to the buyer of my products, and a similar email to the despatcher telling them what to send.</p>
<p>I want one to have my professional shop address, and one to have my &#8216;phil&#8217; address.</p>
<p>Thanks,<br />
Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2009/03/15/using-access-and-outlook-to-send-to-mailing-lists/comment-page-1/#comment-915</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Sun, 23 Aug 2009 22:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.jephens.com/?p=131#comment-915</guid>
		<description>Don,

Depending on how you have your query set up, you can use a second query master loop to test populate the delinquent timesheet info. 

For instance, say your query returns SupervisorID, EmployeeID, TimecardID (and whatever related info to that) I would say make sure you&#039;re sorting on SupervisorID and EmployeeID, so all your EmployeeIDs are grouped together.  The result might be something like this:

1, 2, 3
1, 2, 4
2, 3, 5
2, 4, 6

etc.

How things are now, Supervisor 1 is getting two emails about Employee 2 -- one for Timesheet 3 and one for Timesheet 4.

Instead of running multiplie loops (which is a fine way of doing it, but introduces pitfalls pertaining to do what to do when the recordset ends, how to keep track of where you are in the recordset, etc.), I would run a 2nd query.

So, add this code (the query obviously needs to be changed to suit your particular needs):

&#039; - - - Begin Code - - - 

MyBodyText = &quot;Here are the delinquent timesheets for Employee &quot; &amp; MyMail(&quot;EmployeeID&quot;)

Dim MyQuery2 as Recordset
Dim MyBodyText2 as String

Set MyQuery2 = Currentdb.openrecordset(&quot;Select TimesheetID, TimesheetInfo from DelinquentTimesheetTable where SupervisorID = &quot; &amp; MyMail.SupervisorID &amp; &quot; and EmployeeID = &quot; &amp; MyMail.EmployeeID)

Do until MyQuery2.EOF

      MyBodyText2 = MyQuery2(&quot;TimesheetInfo&quot;) &amp; vbnewline

      MyQuery2.movenext

Loop

MyBodyText = MyBodyText &amp; vbnewline &amp; MyBodyText2

&#039; - - - End Code - - - 

So that runs a second query to get the timesheet info, cycles thru it, and appends the info to mybodytext2.  When that&#039;s done, it appends MyBodyText2 to your initial MyBodyText and then you can continue running the code as usual.

Hope this helps.</description>
		<content:encoded><![CDATA[<p>Don,</p>
<p>Depending on how you have your query set up, you can use a second query master loop to test populate the delinquent timesheet info. </p>
<p>For instance, say your query returns SupervisorID, EmployeeID, TimecardID (and whatever related info to that) I would say make sure you&#8217;re sorting on SupervisorID and EmployeeID, so all your EmployeeIDs are grouped together.  The result might be something like this:</p>
<p>1, 2, 3<br />
1, 2, 4<br />
2, 3, 5<br />
2, 4, 6</p>
<p>etc.</p>
<p>How things are now, Supervisor 1 is getting two emails about Employee 2 &#8212; one for Timesheet 3 and one for Timesheet 4.</p>
<p>Instead of running multiplie loops (which is a fine way of doing it, but introduces pitfalls pertaining to do what to do when the recordset ends, how to keep track of where you are in the recordset, etc.), I would run a 2nd query.</p>
<p>So, add this code (the query obviously needs to be changed to suit your particular needs):</p>
<p>&#8216; &#8211; - &#8211; Begin Code &#8211; - &#8211; </p>
<p>MyBodyText = &#8220;Here are the delinquent timesheets for Employee &#8221; &#038; MyMail(&#8220;EmployeeID&#8221;)</p>
<p>Dim MyQuery2 as Recordset<br />
Dim MyBodyText2 as String</p>
<p>Set MyQuery2 = Currentdb.openrecordset(&#8220;Select TimesheetID, TimesheetInfo from DelinquentTimesheetTable where SupervisorID = &#8221; &#038; MyMail.SupervisorID &#038; &#8221; and EmployeeID = &#8221; &#038; MyMail.EmployeeID)</p>
<p>Do until MyQuery2.EOF</p>
<p>      MyBodyText2 = MyQuery2(&#8220;TimesheetInfo&#8221;) &#038; vbnewline</p>
<p>      MyQuery2.movenext</p>
<p>Loop</p>
<p>MyBodyText = MyBodyText &#038; vbnewline &#038; MyBodyText2</p>
<p>&#8216; &#8211; - &#8211; End Code &#8211; - &#8211; </p>
<p>So that runs a second query to get the timesheet info, cycles thru it, and appends the info to mybodytext2.  When that&#8217;s done, it appends MyBodyText2 to your initial MyBodyText and then you can continue running the code as usual.</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
