Email from excel - supporting multiple platforms (

2019-08-29 23:21发布

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

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.

1条回答
混吃等死
2楼-- · 2019-08-29 23:56

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.

查看更多
登录 后发表回答