vsto

VSTO Addin Outlook Appointment delete and write event fired only if opened first

﹥>﹥吖頭↗ 提交于 2019-12-11 17:25:00
问题 I am working on an Outlook Addin where I try to perform a specific action if deleted. It works fine with all the appointments that I have already opened once. When the appointment is created or deleted from the calendar without being open first no event (BeforeDelete, Write) is fired. private void ThisAddIn_Startup(object sender, System.EventArgs e) { inspectors = this.Application.Inspectors; inspectors.NewInspector += new Microsoft.Office.Interop.Outlook.InspectorsEvents

Focus on Excel VSTO WPF application

时光毁灭记忆、已成空白 提交于 2019-12-11 16:47:10
问题 I'm hosting WPF application within an Excel VSTO Add-in and it works fine onload, however after minimizing the WPF dialog, can't seem to get it to activate (focus) again using code. Have tried: this.Show(); this.Activate(); this.BringIntoView(); this.Focus(); But none of them work. 回答1: Ok, I found a solution of somesort: On Close, I used an event handler to set it the visiblity to Hidden: private void ClientOnClosing(object sender, CancelEventArgs cancelEventArgs) { cancelEventArgs.Cancel =

C# Visio Containers

做~自己de王妃 提交于 2019-12-11 16:22:01
问题 I am struggling getting to the contents (children) of a Container using C#. Works fine if just drawn on the page, but once converted to a master, it is no longer recognized as a 'container'. So, for example. Create a new container from the 'Insert' tab. From the 'Home' tab, draw 2 rectangles in the container, type some text in each, and then 'add to underlying container'. After this, the code below reports the 2 rectangle Names & Texts. However, I now drag the container into my stencil to

Change Inbox-icons in Outlook at runtime

泪湿孤枕 提交于 2019-12-11 16:18:35
问题 I have a problem in my Outlook Addin. My AddIn processes the incoming mails and validates different headers etc. I want to check if a specific headers is set and then change the Icon of this mail in my inbox folder. Is this possible? 回答1: You can either change the icon to a couple dozen or so predefined icons used by Outlook itself (e.g. when it shows that a message was replied to/forwarded) by modifying the PR_ICON_INDEX MAPI property (DASL name http://schemas.microsoft.com/mapi/proptag

How to insert a cover page in MS Word at the beginning of the document?

梦想的初衷 提交于 2019-12-11 15:57:52
问题 I need to insert a cover page into a Word 2016 document. The building block is a cover page and has InsertOptions = (int)WdDocPartInsertOptions.wdInsertPage; //= 2 So far so good. But VSTO can only insert so: buildingBlock.Insert(range); It does insert in place of range. The event Application.ActiveDocument.BuildingBlockInsert is not raised. Using native insert cover page (tab insert --> cover page) does insert properly (and creates only one undo entry insert building block). // -------------

Accessing COM add-in code from VBA

天大地大妈咪最大 提交于 2019-12-11 15:48:27
问题 I have created a COM add-in for Excel 2003 using Visual Studio 2005 Tools for Office. The add-in code looks like this: [Guid("EAC0992E-AC39-4126-B851-A57BA3FA80B8")] [ComVisible(true)] [ProgId("NLog4VBA.Logger")] [ClassInterface(ClassInterfaceType.AutoDual)] public class Logger { public double Debug(string context, string message) { Trace.WriteLine(message); return message.Length; } [ComRegisterFunctionAttribute] public static void RegisterFunction(Type type) { Registry.ClassesRoot

How do I set permissions on my VSTO outlook add-in?

别等时光非礼了梦想. 提交于 2019-12-11 15:13:33
问题 I am trying to distribute my Outlook Add-In to the rest of the company. I'm using Visual Studio 2008 Professional and Outlook 2003. In VS I used an installed template for Outlook 2003. It created a solution with BOTH a project and an installer. I use the project and created an Add-In. It works GREAT on my PC in development . Now, I want to distribute it. Here's where things go haywire. The nice little installer they provide DOESN'T ACTUALLY WORK. The installer runs and places the files where

VSTO Add-In: Exception- Value does not fall within the expected range Office 2010

巧了我就是萌 提交于 2019-12-11 14:05:35
问题 I have created Word Add-In. I have created Installer Setup of it. I have installed it. It is working fine in Office 2007, 2013, 2016. But it is not working in Office 2010. It throws following error. Can Anybody suggest me how to resolve it? From: file:///C:/Program Files (x86)/EasyGrammar/EasyGrammar/EasyGrammar.vsto ************** Exception Text ************** System.ArgumentException: Value does not fall within the expected range. at System.Runtime.InteropServices.Marshal

VSTO Outlook Add-In Ribbon not showing in Outlook 2007

只谈情不闲聊 提交于 2019-12-11 13:45:01
问题 I have an Outlook add-in developed using VSTO Outlook 2010 template which has a ribbon. The ribbon xml is <?xml version="1.0" encoding="UTF-8"?> <customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon> <tabs> <tab idMso="TabAddIns"> <group id="PluginGroup" label="the Collective"> <button id="FolderSelector" onAction="FolderSelector_Click" screentip="Click to select forwarding folder" label="Folder Selector" showImage="false" /> <labelControl id=

How, can get the exact sent Email from Sent Items folder?

折月煮酒 提交于 2019-12-11 13:38:26
问题 VSTO: Outlook 2007 Add-In Project. I have Sent an sampleEmail using a custom button in the Ribbon control. Now, How, can get the sampleEmail from Sent Items folder? I tried by using the Entry ID property. but that was not helpful after the Email is sent. The Conversation ID is null for a new Email. Any other property, by which I can exactly read an Email that I have sent. 回答1: You can set a named property on the item before sending it using MailItem.UserProperties or ailItem.PorpertyAccesor,