outlook-addin

Save Email Upon Send in Outlook Add-In

别等时光非礼了梦想. 提交于 2019-12-04 04:53:23
问题 I'm making an Outlook Add-in (Visual Studio 2010, .NET 4.0, C#), and I would like to automatically archive a user's email after they send it. What I have so far is the following: private void ThisAddIn_Startup(object sender, System.EventArgs e) { //Create an event handler for when items are sent Application.ItemSend += new ApplicationEvents_11_ItemSendEventHandler(saveEmail); } private void saveEmail(object Item, ref bool Cancel) { } What I've found through debugging is that my saveEmail

Call Outlook VBA code from c#

两盒软妹~` 提交于 2019-12-04 04:03:40
问题 In visual studio I am creating an addin, in the addin_startup I am setting an Outlook application to app = (Microsoft.Office.Interop.Outlook.ApplicationClass)(Marshal.GetActiveObject("Outlook.Application")); then I am calling a runMacro function which I got from msdn private void RunMacro(object oApp, object[] oRunArgs) { try { oApp.GetType().InvokeMember("Run", System.Reflection.BindingFlags.InvokeMethod, null, oApp, oRunArgs); } catch (Exception e) { MessageBox.Show(e.GetType().ToString());

How to add a button to a pre-existing tab on ribbon (C#)?

 ̄綄美尐妖づ 提交于 2019-12-04 01:46:47
I've successfully created a new tab and put it next to the pre-existing ones. Then I realized that I'll only have one button on it, so it makes more sense (for now) to put it on the Home tab. Didn't really get that to work though. I've tried to follow the guides and walk-troughs. I've got me an XML and changed its XML to the following. <tabs> <!--<tab idMso="TabAddIns">--> <tab idMso="TabHome"> <group id="group1" label="Hazaa!"> <box id="box1" /> </group> </tab> </tabs> When I run the project I get no changes to the UI, so I guess that either: the XML is not read at all, the name TabHome is

EWS request not responding with error on Mac

本小妞迷上赌 提交于 2019-12-03 21:12:46
In our Outlook add-in, we are using makeEwsRequestAsync to get the current email's MimeContent . We understand there is a 1MB request/response limit when using EWS via the JavaScript API. When we reach this limit on Windows, we at least see this message: "Response exceeds 1 MB size limit. Please modify your EWS request". However, when making this request for a large email (>1MB) on Mac (Outlook 2016), we don't get any sort of response whatsoever. The add-in just seems to hang. Is there any way we can catch this error on Mac? We would like to show a dialog or something notifying the user that

VSTO 2003-2010 add-in compatibility

流过昼夜 提交于 2019-12-03 20:24:38
问题 I want to create an Office add-in compatible with Office 2003, 2007 and 2010. VS2008 allows for add-in 2003/2007 creation while VS2010 allows 2007/2010. I have both installed. I have developed 2007/2010 add-ins before as a 2007 add-in that worked automatically with Office 2010. The problem I am facing now is the lack of ribbon interface in Office 2003 and how to structure the project so that a single add-in is compatible with Office 2003-2010. Considering differences between various Office

Can't find the list of most (all?) tab names for the ribbon in Office

六月ゝ 毕业季﹏ 提交于 2019-12-03 16:40:25
After some heavy googling, I've concluded that I'm unable to locate information on the id names for the different components of the ribbon in Office. For instance, even though the following XML works, I need to hide the add-in error display due to TabMail being at fault when a new email is being created. It's my understand that it's because I currently target all windows in Outlook but should be only targeting the main one. When a new email is being created, my add-in tries to insert itself in there too failing and complaining. <ribbon> <tabs> <tab idMso="TabMail"> <group id="Animals" label=

getting started with Office Outlook add-in?

谁说胖子不能爱 提交于 2019-12-03 13:58:43
问题 I'm about to work on some Outlook add-ins. It's been years since I did this; and probably several object model revisions! Can anyone recommend some references to help get me started: blogs, sites, books?? Thanks 回答1: If your budget can afford it (ie. the product is making money), I would highly recommend Add-in Express. Lots of samples, documentation, and support -- but requires using their tooling. (It makes Outlook ever so slightly-less of a PITA to deal with.) However, if you prefer to

Difference between Outlook.Folder and Outlok.MAPIFolder

青春壹個敷衍的年華 提交于 2019-12-03 10:39:11
问题 I'm not clear on the difference between the classes Folder and MAPIFolder in the namespace Outlook . When I review the code in the net, some use the first, while others use the other syntax and I can't really determine if: it's just because of their ignorance (and even less I can tell which group is the right one) it's some kind of legacy (usage for different versions of Outlook) it's the very same thing (something I'm fairly sure isn't true but one never knows) it's an inheritance structure

getting started with Office Outlook add-in?

核能气质少年 提交于 2019-12-03 05:01:57
I'm about to work on some Outlook add-ins. It's been years since I did this; and probably several object model revisions! Can anyone recommend some references to help get me started: blogs, sites, books?? Thanks If your budget can afford it (ie. the product is making money), I would highly recommend Add-in Express . Lots of samples, documentation, and support -- but requires using their tooling. (It makes Outlook ever so slightly-less of a PITA to deal with.) However, if you prefer to stick with a (free with VS) Microsoft solution -- it works fairly well, but is missing some "niceties" -- then

How to open Outlook's new mail window with prepopulated attachment

耗尽温柔 提交于 2019-12-03 02:14:21
I need to open a new email window with a prepopulated attachment when a user clicks some button or link in my application. Pieterjan Spoelders Old question, but I also ran in to this so here's a copy and paste solution: Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application(); Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem); oMsg.Subject = "subject something"; oMsg.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat