<?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: How to Send E-Mail From MS Access using Outlook</title>
	<atom:link href="http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/</link>
	<description>Keeping Computers Happy Since 1997</description>
	<lastBuildDate>Thu, 04 Feb 2010 05:25:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/comment-page-1/#comment-1046</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Tue, 13 Oct 2009 22:19:24 +0000</pubDate>
		<guid isPermaLink="false">http://10.20.30.112/?p=19#comment-1046</guid>
		<description></description>
		<content:encoded><![CDATA[<p>A question was asked via email: &#8220;How do I store the body of the email in the code or in the database?&#8221;</p>
<p>In the code, just take out the lines:</p>
<p>BodyFile$ = InputBox$(&#8220;Please enter the filename of the body of the message.&#8221;, _<br />
&#8220;We Need A Body!&#8221;)</p>
<p>&#8216; If there’s nothing to say, call it a day.</p>
<p>If BodyFile$ = &#8220;&#8221; Then<br />
MsgBox &#8220;No body, no message.&#8221; &#038; vbNewLine &#038; vbNewLine &#038; _<br />
&#8220;Quitting&#8230;&#8221;, vbCritical, &#8220;I Ain’t Got No-Body!&#8221;<br />
Exit Function<br />
End If</p>
<p>&#8216; Check to make sure the file exists&#8230;<br />
If fso.FileExists(BodyFile$) = False Then<br />
MsgBox &#8220;The body file isn’t where you say it is. &#8221; &#038; vbNewLine &#038; vbNewLine &#038; _<br />
&#8220;Quitting&#8230;&#8221;, vbCritical, &#8220;I Ain’t Got No-Body!&#8221;<br />
Exit Function<br />
End If</p>
<p>&#8216; Since we got a file, we can open it up.<br />
Set MyBody = fso.OpenTextFile(BodyFile, ForReading, False, TristateUseDefault)</p>
<p>&#8216; and read it into a variable.<br />
MyBodyText = MyBody.ReadAll</p>
<p>&#8216; and close the file.<br />
MyBody.Close</p>
<p>and replace it with:</p>
<p>MyBodyText = &#8220;The text I want to be the body of my email.&#8221;</p>
<p>To pull that from the database, you would have a table with maybe two columns in it, an ID column and the text column &#8212; and run a query against the table to return the text column.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/comment-page-1/#comment-10</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Wed, 09 Jul 2008 14:59:08 +0000</pubDate>
		<guid isPermaLink="false">http://10.20.30.112/?p=19#comment-10</guid>
		<description>Paul,

The second paragraph points out this shortcoming and the third explains how might get around it.

I don&#039;t currently have code available for the Redemption DLL.  It&#039;s on the to-do list, but at the moment, I have too many projects, not enough time!

You might also want to look at some of the resources listed here:

http://www.granite.ab.ca/access/email/outlook.htm</description>
		<content:encoded><![CDATA[<p>Paul,</p>
<p>The second paragraph points out this shortcoming and the third explains how might get around it.</p>
<p>I don&#8217;t currently have code available for the Redemption DLL.  It&#8217;s on the to-do list, but at the moment, I have too many projects, not enough time!</p>
<p>You might also want to look at some of the resources listed here:</p>
<p><a href="http://www.granite.ab.ca/access/email/outlook.htm" rel="nofollow">http://www.granite.ab.ca/access/email/outlook.htm</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PaulD</title>
		<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/comment-page-1/#comment-9</link>
		<dc:creator>PaulD</dc:creator>
		<pubDate>Wed, 09 Jul 2008 14:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://10.20.30.112/?p=19#comment-9</guid>
		<description>Hi,

I got this working fine but whenever it opens outlook it comes up with a warning saying 

&quot;A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?&quot;

There is an option to click to allow this but I would like to bypass it of possible, any ideas?

I&#039;m using Access and Outlook 2003.

Thanks,

Paul.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I got this working fine but whenever it opens outlook it comes up with a warning saying </p>
<p>&#8220;A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?&#8221;</p>
<p>There is an option to click to allow this but I would like to bypass it of possible, any ideas?</p>
<p>I&#8217;m using Access and Outlook 2003.</p>
<p>Thanks,</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/comment-page-1/#comment-8</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Wed, 09 Jul 2008 14:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://10.20.30.112/?p=19#comment-8</guid>
		<description>If you change the code to do a MyMail.Display instead of MyMail.Send what happens?

Are you sure that the query is pulling records on the other machine?  Perhaps the number of addresses is 0 in the query, so the code works fine, there&#039;s just nothing to send?

Can you step thru the code?</description>
		<content:encoded><![CDATA[<p>If you change the code to do a MyMail.Display instead of MyMail.Send what happens?</p>
<p>Are you sure that the query is pulling records on the other machine?  Perhaps the number of addresses is 0 in the query, so the code works fine, there&#8217;s just nothing to send?</p>
<p>Can you step thru the code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared</title>
		<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/comment-page-1/#comment-7</link>
		<dc:creator>Jared</dc:creator>
		<pubDate>Wed, 09 Jul 2008 14:13:32 +0000</pubDate>
		<guid isPermaLink="false">http://10.20.30.112/?p=19#comment-7</guid>
		<description>I am using this code in a database that resides on my pc and it works perfectly.  When I moved this to another pc the code runs without producing an error, but the emails do not run through Outlook.  Basically, nothing happens.

Do you have any ideas of why that may be?

Thank you!</description>
		<content:encoded><![CDATA[<p>I am using this code in a database that resides on my pc and it works perfectly.  When I moved this to another pc the code runs without producing an error, but the emails do not run through Outlook.  Basically, nothing happens.</p>
<p>Do you have any ideas of why that may be?</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/comment-page-1/#comment-5</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Thu, 19 Jun 2008 18:12:58 +0000</pubDate>
		<guid isPermaLink="false">http://10.20.30.112/?p=19#comment-5</guid>
		<description>Off the top of my head, if you know what the attachments are going to be you can add them to the email table and then send them.

So you might change the code to be:

MyMail.Attachments.Add MailList(&quot;AttachmentFilePath&quot;), olByValue, 1, MailList(&quot;AttachmentDisplayName&quot;)

.... which would require you to create 2 new fields in your email table, one for AttachmentFilePath which would be where the attachment is located, and then AttachmentDisplayName if you want the attachment to show up in the email with a specific name.</description>
		<content:encoded><![CDATA[<p>Off the top of my head, if you know what the attachments are going to be you can add them to the email table and then send them.</p>
<p>So you might change the code to be:</p>
<p>MyMail.Attachments.Add MailList(&#8220;AttachmentFilePath&#8221;), olByValue, 1, MailList(&#8220;AttachmentDisplayName&#8221;)</p>
<p>&#8230;. which would require you to create 2 new fields in your email table, one for AttachmentFilePath which would be where the attachment is located, and then AttachmentDisplayName if you want the attachment to show up in the email with a specific name.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josefa</title>
		<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/comment-page-1/#comment-4</link>
		<dc:creator>josefa</dc:creator>
		<pubDate>Thu, 19 Jun 2008 16:08:05 +0000</pubDate>
		<guid isPermaLink="false">http://10.20.30.112/?p=19#comment-4</guid>
		<description>Hello
and if i want to send different attachments to different mails? is it possible?
Thanks</description>
		<content:encoded><![CDATA[<p>Hello<br />
and if i want to send different attachments to different mails? is it possible?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Knapp</title>
		<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/comment-page-1/#comment-3</link>
		<dc:creator>Jeff Knapp</dc:creator>
		<pubDate>Sat, 14 Jun 2008 15:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://10.20.30.112/?p=19#comment-3</guid>
		<description>DoCmd.SendObject has actually been around for quite awhile -- maybe as far back as Access 2.0 but almost certainly since Access95.

The limitation of SendObject is it doesn&#039;t allow you to have attachments that aren&#039;t Access objects.

If you don&#039;t have the need for attachments, the code can certainly be easier to manage since Access will handle creating and destroying the Outlook object.

In face, if Outlook isn&#039;t available on your machine, DoCmd.SendObject will do it&#039;s best to interface with your current default mailer.  

On my setup, it was able to address and send (or display) a message via my Thunderbird client without incident... but no attachments.</description>
		<content:encoded><![CDATA[<p>DoCmd.SendObject has actually been around for quite awhile &#8212; maybe as far back as Access 2.0 but almost certainly since Access95.</p>
<p>The limitation of SendObject is it doesn&#8217;t allow you to have attachments that aren&#8217;t Access objects.</p>
<p>If you don&#8217;t have the need for attachments, the code can certainly be easier to manage since Access will handle creating and destroying the Outlook object.</p>
<p>In face, if Outlook isn&#8217;t available on your machine, DoCmd.SendObject will do it&#8217;s best to interface with your current default mailer.  </p>
<p>On my setup, it was able to address and send (or display) a message via my Thunderbird client without incident&#8230; but no attachments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arshdeep</title>
		<link>http://www.jephens.com/2007/05/13/how-to-send-e-mail-from-ms-access-using-outlook/comment-page-1/#comment-2</link>
		<dc:creator>Arshdeep</dc:creator>
		<pubDate>Sat, 14 Jun 2008 13:05:44 +0000</pubDate>
		<guid isPermaLink="false">http://10.20.30.112/?p=19#comment-2</guid>
		<description>Hi,

I was checking the code in access 2007 and found out that there is a much simpler way to send out emails through 
&quot; DoCmd.SendObject &quot;. 

Which has an in-built functionality for sending forms, text, query reports in different formats.

Just a suggestion.

Regards
Arshdeep</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I was checking the code in access 2007 and found out that there is a much simpler way to send out emails through<br />
&#8221; DoCmd.SendObject &#8220;. </p>
<p>Which has an in-built functionality for sending forms, text, query reports in different formats.</p>
<p>Just a suggestion.</p>
<p>Regards<br />
Arshdeep</p>
]]></content:encoded>
	</item>
</channel>
</rss>
