来自Excel的电子邮件-支持多种平台(Outlook,Mac Mail和Mac Outlook) [英] Email from excel - supporting multiple platforms (Outlook, mac mail & mac outlook)

查看:168
本文介绍了来自Excel的电子邮件-支持多种平台(Outlook,Mac Mail和Mac Outlook)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置一个excel表单,以便在用户完成任务后通过电子邮件发送一系列数据.不幸的是,我公司使用多种平台,包括PC Outlook,mac Mail和mac Outlook.我可以使用Ron de Bruin代码让每个人孤立地工作,但是想知道我是否可以在一个if else类型的场景中以某种方式将这三个人结合起来?

I would like to set up an excel form to essentially email a range of data, once a user has completed a task. Unfortunately my company uses multiple platforms,PC Outlook, mac Mail and mac Outlook. I can get each one to work in isolation using Ron de Bruin code, but wonder if I can somehow combine the three on an if else type scenario?

或者还有另一种方法,例如使用表单工作簿上的设置页面并设置一个触发器来通知代码要运行哪种方案? 我当前对一种情况的触发如下:

Or is there another way, like using a settings page on the form workbook and setting up a trigger which informs the code which scenario to run? My current trigger to one scenario is as follows;

 Unload Me
Application.Run ("masterDB.xlsm!Mail_Range_In_Excel2011")
Workbooks("MasterDB.xlsm").Close True

其中Mail_in_range为Ron代码.作为背景知识,该表单将数据发送到masterDB,然后在masterDB中按顺序选择下一个数字,这是通过电子邮件发送的范围的一部分.此序号很重要,因为它可以将收件人引导到正确的数据以生成报告.

With the Mail_in_range being the Ron code. As a bit of background, the form sends data to the masterDB, where is picks up the next number in sequence, which forms part of the range being emailed out. This sequence number is important as it directs recipients to the correct data to build a report.

推荐答案

在Windows平台上,您可以使Outlook自动发送电子邮件.有关更多信息,请参见如何从其他程序自动执行Outlook .另外,您可能会发现使用自动化发送Microsoft Outlook消息文章很有帮助.但是在MAC平台上您无法做到这一点-没有针对MAC的COM自动化技术.

On the Windows platform you can automate Outlook to send emails. See How to automate Outlook from another program for more information. Also you may find the Using Automation to Send a Microsoft Outlook Message article helpful. But on the MAC platform you can't do that - there is no COM Automation technology exists for MACs.

这篇关于来自Excel的电子邮件-支持多种平台(Outlook,Mac Mail和Mac Outlook)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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