从Access发送多个自定义电子邮件 [英] Send multiple custom e-mails from Access

查看:79
本文介绍了从Access发送多个自定义电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用创建了一份建筑报告。


我的用户要求我提供电子邮件的功能

" building reports"每月一次建立经理人。


假设我有下表列出了建筑经理的名字,电子邮件地址和他们的建筑,有一种方法可以自动化这个来自Outlook的这些月度电子邮件。理想情况下,这将是一个

点击一键操作类型:


示例表:

名称电子邮件构建Nbr


John Doe jo******@www.com 443

Mary Smit ma*******@www.com 321
Abe Adam ab******@www.com 69

因此,我想将Building 443报告仅发送给John Doe。我想发送

建筑321报告给Mary Smit,依此类推。有什么方法可以自动执行此操作吗?此外,我无法安装任何可执行文件,所以我无法安装

兑换以解决Outlook的潜在问题。


任何想法都是非常感谢。


谢谢。


-

通过AccessMonster.com发布消息
< a rel =nofollowhref =http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200609/1target =_ blank> http://www.accessmonster.com /Uwe/For...ccess/200609/1

My app creates a building report.

My users have requested that I provide functionality to e-mail these
"building reports" to building managers once a month.

So assuming that I have the following table that lists a building manager''s
name, e-mail address and their building, is there a way that I can automate
this to send these monthly e-mails from Outlook. Ideally this would be a
click one button type of action:

Example table:
Name E-Mail Building Nbr

John Doe jo******@www.com 443
Mary Smit ma*******@www.com 321
Abe Adam ab******@www.com 69

So, I want to send the Building 443 report to only John Doe. I want to send
the Building 321 report to only Mary Smit and so on. Is there any way to
automate this? Also, I can''t install any executables, so I can''t install
Redemption to get around potential issues with Outlook.

Any ideas are greatly appreciated.

Thanks.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200609/1

推荐答案

请参阅电子邮件参议院本页:
http://www.granite。 ab.ca/access/email.htm

See "e-mail senate" on this page:
http://www.granite.ab.ca/access/email.htm


谢谢,我熟悉这个例子,但据我所知它没有b $ b允许进行这种定制(例如,如我在第一篇文章中提到的那样,将特定报告发送给某个特定的个人)。


我想将Building 443报告仅发送给John Doe。我想发送

建筑321报告给只有Mary

Smit等等。


所以毫无疑问需要某种循环。所以我想这个方法将是




1)从第一篇文章中提供的表中检索信息。


2)遍历该表中的每条记录。


3)在每个循环中,运行报告并创建一个名为

的电子邮件适当的设施管理员,包括标准信息和主题


4)然后发送电子邮件。


我听说可以有由于安全补丁,从

Outlook发送自动电子邮件的问题。如果有100个设施管理员,那么我想避免用户在Outlook中为每个

电子邮件(即100次)进行干预。


我不允许安装任何可执行文件,诸如Redemption之类的dll来帮助

。一切都必须在Access内。

pi********@hotmail.com 写道:
Thanks, I''m familiar with this example, but as far as I can tell it doesn''t
allow for the kind of customization (i.e. send a specific report to a
specific individual as I mentioned in my first post).

I want to send the Building 443 report to only John Doe. I want to send the
Building 321 report to only Mary
Smit and so on.

So it would no doubt require some kind of loop. So I guess the method would
be

1) Retrieve information from table provided in first post.

2) Loop through each record in that table.

3) Within each loop, run the report and create an e-mail with the name of the
appropriate Facility Manager and include a standard message and subject

4) Then Send the E-mail.

I had heard that there can be a problem with sending automated e-mails from
Outlook because of the security patches. If there are 100 facility managers,
I''d like to avoid the user having to intervene within Outlook for each of the
e-mails (i.e. 100 times).

I''m not allowed to install any executables, dlls such as Redemption to help
with this. Everything has to be within Access.

pi********@hotmail.com wrote:

>参见电子邮件参议院本页:
http://www.granite。 ab.ca/access/email.htm



-

通过AccessMonster.com发布的消息
http://www.accessmonster.com/Uwe/For ... ccess / 200609/1

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200609/1


.. rdemyan通过AccessMonster.com写道:
..rdemyan via AccessMonster.com wrote:

谢谢,我对这个例子很熟悉,但据我所知,它并不是
允许进行这种定制(即发送一份特定的报告给一个

特定的个人,正如我在第一篇文章中提到的那样。


我想将建筑443报告仅发送给John Doe。我想发送

建筑321报告给只有Mary

Smit等等。


所以毫无疑问需要某种循环。所以我想这个方法将是




1)从第一篇文章中提供的表中检索信息。


2)循环遍历该表中的每条记录。
Thanks, I''m familiar with this example, but as far as I can tell it doesn''t
allow for the kind of customization (i.e. send a specific report to a
specific individual as I mentioned in my first post).

I want to send the Building 443 report to only John Doe. I want to send the
Building 321 report to only Mary
Smit and so on.

So it would no doubt require some kind of loop. So I guess the method would
be

1) Retrieve information from table provided in first post.

2) Loop through each record in that table.


3)在每个循环中,运行报告并创建一个名为

相应设施的电子邮件经理并包括标准消息和主题>
3) Within each loop, run the report and create an e-mail with the name of the
appropriate Facility Manager and include a standard message and subject>


4)然后发送电子邮件。
4) Then Send the E-mail.



逻辑看起来不错。


如果你可以创建一个返回buidling#和
的查询
收件人的姓名和电子邮件地址,你应该在营业。


< SNIP>

但你无法通过在将报告输出到

文件时,在VBA中的

标准OpenReport命令中使用过滤器或where子句。


Me.Filter =" ShipmentsID =" &安培;表格![选择加载列表]![加载ID]

Me.FilterOn = True


因此你必须自己更改过滤器或where子句/>
报告OnOpen事件。


Me.Filter =" ShipmentsID =" &安培;表格![选择加载清单]![加载ID]

Me.FilterOn = True

< / SNIP>

Dim rs as DAO。记录集''---收件人信息记录集和过滤器

信息一起

'' - 过滤此人感兴趣的记录集

in

''==语法是这样的...


set rs = DBEngine(0)(0).QueryDefs(" ; qryBuildingMailing")。 OpenRecordset

直到rs.eof


me.Filter =" BuildingID =" &安培; rs.Fields(" BuildingID")

me.FilterOn = True

....

然后你可以输出到快照和e - 发送报告的快照

(也在页面上列出)。


如果您阅读了该页面,您会看到有以下示例:所有的部分。

所以你要做的就是把它们放在一起。乐高的好工作,

Tony!


Pieter

The logic looks good.

If you can create a query that returns the buidling# and the
recipient''s name and e-mail address, you should be in business.

<SNIP>
However you can not pass a filter or where clause as you would in a
standard OpenReport command in VBA when outputting the report to a
file.

Me.Filter = "ShipmentsID=" & Forms![Select Load List]![LoadID]
Me.FilterOn = True

Therefore you must change the filter or where clause yourself in the
reports OnOpen event.

Me.Filter = "ShipmentsID=" & Forms![Select Load List]![LoadID]
Me.FilterOn = True
</SNIP>
Dim rs as DAO.Recordset ''---recordset of recipient info and filter
info together
''--filter the recordset for just the buldings this person is interested
in
''==syntax is something like this...

set rs=DBEngine(0)(0).QueryDefs("qryBuildingMailing"). OpenRecordset
do until rs.eof

me.Filter="BuildingID=" & rs.Fields("BuildingID")
me.FilterOn=True
....
then you can output to snapshot and e-mail the snapshot of the report
(also outlined on the page).

If you read the page, you''ll see there are examples of all the pieces.
So then all you have to do is put them together. Nice job of Legos,
Tony!

Pieter


这篇关于从Access发送多个自定义电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆