如何从ADODB.Recordset /CDO.Message获取.TextBody行的所有记录 [英] How to get all records to .TextBody line from ADODB.Recordset /CDO.Message

查看:126
本文介绍了如何从ADODB.Recordset /CDO.Message获取.TextBody行的所有记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有必要使用CDO.Message发送来自Access 2007的电子邮件

并在TextBody中获取/添加记录集的所有结果/记录


部分代码如下:

It is necessary to send e-mail from Access 2007 using CDO.Message
and in the TextBody get/add all results/records of recordset

Part of the code as follows:

展开 | 选择 | Wrap | 行号

推荐答案

使用追加运算符当你遍历记录集时附加到textbody。
Use the append operator to append to the textbody as you loop through the recordset.
展开 | 选择 | Wrap | 行号


兔子,谢谢,我试过但不成功。我的记录集的来源是常见的Access查询,我有:

1)客户的电子邮件地址,以便发送消息

2)一些字段包含信息客户发送


现在我为每个RECORD编写了单独的电子邮件消息,但我需要为每个CUSTOMER单独发送所有记录的消息,其中他的电子邮件地址是相同的。

是这样的:
Rabbit, thanks, I tried but unsuccesfully. The source for my recordset is usual Access query, where I have:
1) e-mail address of Customer in order to send message
2) some fields with info for Customer to send

Now I reached composing of separate e-mail message for each RECORD, but I need separate message for each CUSTOMER with all records, where his e-mail address is the same.
like this:
展开 | 选择 | Wrap | 行号


在原始帖子的实现中,您正在发送每封记录一封电子邮件在你的记录集中。与循环记录集无关的任何内容都应该在记录集之外。

In your implementation in your original post, you are sending an email once for each record in your recordset. Anything not related to looping through the recordset should be outside the recordset.

展开 | 选择 | Wrap | 行号


这篇关于如何从ADODB.Recordset /CDO.Message获取.TextBody行的所有记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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