对多个联系人的多个查询电子邮件 - vba [英] multiple queries to multiple contacts email - vba

查看:105
本文介绍了对多个联系人的多个查询电子邮件 - vba的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,需要一些帮助才能搞清楚。


我有一个名为EmailReports的表,它有:

Unit,Unitcode,POC,电子邮件,QueryName和Notes


到目前为止,我一直在导出每个查询并手动发送,我想自动化它。


因此,当会员点击电子邮件按钮时,我想:

每个单元
,创建电子邮件,附上查询(即在该记录中)设置电子邮件,然后插入某些文字进入正文(html''d)并发送....我可以在发送之前进行def复查或者直接发送它。



现在我试过了,宏,但问题是身体角色是有限的,我必须为每个查询添加SendObject宏,现在探索其他选择。


我尝试过vba,但还不够好弄清楚如何运行循环并做我想要它做的事情......(而不是盒子,让它从记录集中拉出电子邮件......)


我可以附上如到目前为止我所拥有的数据库中的大量内容。


任何帮助都非常感谢,我有些痴迷于想出来的东西只需要看一个例子......谷歌没有帮助很多东西...

Hello everyone, need some help on figuring out.

I have a table called EmailReports table, it has:
Unit, Unitcode, POC, Emails, QueryName, and Notes

so far, i have been exporting each query and sending it out manually, i would like to automate it.

So, when a member clicks email button, i would like:

for each unit, create an email, attach the query (that is in that record) set email, and insert certain text into body (html''d) and send it....I can def review before sending or just straight up send it.


Now i have tried, macro, but issue with that is body characters are limited and i have to add SendObject macro for each query, and now exploring other alternatives.

I have tried vba, but not good enough to figure out how to run a loop and do what i want it to do...(like instead of to box, have it pull email from recordset..)

I can attach a sample of the database of what i have so far.

Any assistance is much appreciated, Im some what savy at figuring stuff out just need to see an example..and google isnt helping as much tooday...

推荐答案

附加文档...试图偷偷摸摸..似乎无法添加数据库..





attached docs..trying to be sneaky..cant seem to add the database..
附加文件
新的Microsoft Office Word Document.docx (115.8 KB,294 views)
Attached Files
New Microsoft Office Word Document.docx (115.8 KB, 294 views)


Djsaix:

第一:作为一种善意你应该压缩/合作在将文件上传到任何网站之前先压缩文件。

第二:这不是个人的;但是,作为预防措施,很少有专家/ Mods会下载您的文件。即使是最善意的个人也可能在他们的系统中潜伏着某些东西


有几种方法可以实现你的目标...... MS有一个单向解释的页面( docmdsendobject())这很适合相当直接转发报告和查询;然而,有一些限制。


然后有应用程序自动化,您可以查看一些想法。


请发布您的代码,记得使用< CODE />格式化它按钮,我们将看看。
Djsaix:
First: as a kindness you should zip/compress your files before uploading them to any website.
Second: This is not personal; however, very few of the Experts/Mods will download your file just as a precaution. Even the most well meaning inidividual can have something lurking in their system

There are a few ways of accomplishing what you are after... MS has a page that explains one way ( docmdsendobject()) This works well for fairly straight forward reports and queries; however, there are some limitations.

Then there is the Application Automation that you can look at for some ideas.

Please post your code, remember to format it using the <CODE/> button and we''ll take a look.


嘿zmbd,

我使用的这台电脑似乎没有拉链(darn gov pc''s )。


我试过做doCmdsendobject(),但是我迷失了如何正确地循环它发出我的所有查询。我会添加我能做的,一旦我希望生病了拉链并加上我所拥有的东西......(这不是很遗憾)。


EmailReportTable(table)


单位单位代码POC电子邮件QueryName注释

xx1 ak SomeGuy 34 @ re xx1 msg1

xx2 ac SomeO 48 @ 29 xx2 msg2


^这是它包含的内容(例)


主表(表)


查询(从主表中提取的不同查询)


按钮:Command65一旦点击,这里是代码
Hey zmbd,
This computer that i am using doesnt seem to have zip (darn gov pc''s).

I have tried doing doCmdsendobject(), but i am getting lost at how to properly loop it through that it sends out all my queries. I''ll add in what i can, and once im hope ill zip it and add on what i have..(which isnt much sadly).

EmailReportTable (table)

Unit Unit Codes POC Emails QueryName Notes
xx1 ak SomeGuy 34@re xx1 msg1
xx2 ac SomeO 48@29 xx2 msg2

^this is what it contains(example)


main table (table)

queries (different queries that pull from main table)

button: Command65 once it clicked, here is the code
展开 | 选择 | Wrap | 行号


这篇关于对多个联系人的多个查询电子邮件 - vba的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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