vsto

Replacing part of Outlook client's window with a custom form

纵然是瞬间 提交于 2020-07-09 07:11:01
问题 I am developing a VSTO application for Outlook client. I am trying have my form open in the part of the Outlook client window which is highlighted in red in the following image: I think I can't use the form regions because they replace the view for a single item. So basically what I want to do is opening my custom form (windows or web) in the red area when I click my tool's button on the toolbar. Any ideas how this can be done? 回答1: There are three main ways for displaying your own form there

What is the best way to store some data in VSTO addin?

ⅰ亾dé卋堺 提交于 2020-07-05 12:41:48
问题 I have developed one outlook add-in, that has to be On or Off. to do that i have declared one static variable as shown below, ThisAddIn.cs public static bool isAddInOn = false; RibbonButton.cs private void btnRibbon_Click(object sender, RibbonControlEventArgs e) { if (ThisAddIn.isAddInOn ) { ThisAddIn.isAddInOn = false; btnRibbon.Label = "Disabled"; } else { ThisAddIn.isAddInOn = true; btnRibbon.Label = "Enabled"; } } It is working. But the static variable reset again when i close outlook and

ClickOnce does not unregister/re-register VSTO solutions when running from Windows 10

旧时模样 提交于 2020-06-26 12:54:25
问题 Release an HelloWorld add-in for Ms Word. Sign and publish via ClickOnce, with the installation folder being set to an online directory. Routine to follow Run the add-in setup.exe to install via ClickOnce. Assert the add-in has been registered in File / Options / Add-ins . Close Word. Go to the Programs and Features panel, and uninstall the ClickOnce application which corresponds to the Add-in. Launch Word and assert the add-in has been unregistered from File / Options / Add-ins . Run the add

Retrieve cell value issue with open xml sdk

故事扮演 提交于 2020-06-18 16:56:40
问题 Im having the following issue related with an excel 2007 file called "Libro1.xlsx". On this file i already set to "hello world" the cell A1 in the first sheet with id "rId1" and cell A2 to "500". In the following code you'll see that im accesing every row and cell of this sheet. Im getting as output the content of the cell A2 = 500 but not the content of the A1 cell (im getting "0" as value). Here the code that im using: ' Open the document for editing. Dim ficheroexcel As SpreadsheetDocument

Retrieve cell value issue with open xml sdk

≯℡__Kan透↙ 提交于 2020-06-18 16:53:45
问题 Im having the following issue related with an excel 2007 file called "Libro1.xlsx". On this file i already set to "hello world" the cell A1 in the first sheet with id "rId1" and cell A2 to "500". In the following code you'll see that im accesing every row and cell of this sheet. Im getting as output the content of the cell A2 = 500 but not the content of the A1 cell (im getting "0" as value). Here the code that im using: ' Open the document for editing. Dim ficheroexcel As SpreadsheetDocument

Disable copy(ctrl+c), paste(ctrl+v),cut(ctrl+x) in excel

痞子三分冷 提交于 2020-06-17 08:23:17
问题 I have developed the vsto template in C# in which,i have added data validation for many fields in the excel sheet.If the user copy paste the content, those validations rules are overwrites and does not work. how can i restrict user to copy,paste,cut.**Is there any **other way to overcome this problem? 回答1: Have you tried protecting the workbook ? Two ways to do the same 1.)manually 2.)programatically 回答2: Following code should intercept Ctrl+V and effectively disable it 1.To disable the Paste

Disable copy(ctrl+c), paste(ctrl+v),cut(ctrl+x) in excel

烈酒焚心 提交于 2020-06-17 08:23:07
问题 I have developed the vsto template in C# in which,i have added data validation for many fields in the excel sheet.If the user copy paste the content, those validations rules are overwrites and does not work. how can i restrict user to copy,paste,cut.**Is there any **other way to overcome this problem? 回答1: Have you tried protecting the workbook ? Two ways to do the same 1.)manually 2.)programatically 回答2: Following code should intercept Ctrl+V and effectively disable it 1.To disable the Paste

How to detect other outlook events such as “Forward as attachment”, “Reply with Meeting”

六月ゝ 毕业季﹏ 提交于 2020-06-02 04:01:19
问题 Out of the box outlook provides the following: ((Outlook.ItemEvents_10_Event)this._mailItem).Reply += new Outlook.ItemEvents_10_ReplyEventHandler(MailItem_Reply); ((Outlook.ItemEvents_10_Event)this._mailItem).ReplyAll += new Outlook.ItemEvents_10_ReplyAllEventHandler(MailItem_ReplyAll); ((Outlook.ItemEvents_10_Event)this._mailItem).CustomAction += new Outlook.ItemEvents_10_CustomActionEventHandler(MailItem_CustomAction); ((Outlook.ItemEvents_10_Event)this._mailItem).Forward += new Outlook

Call Excel Macro from Ribbon Button

心已入冬 提交于 2020-06-02 03:40:50
问题 I have a VBA Macro that works perfect in excel via a button, but i want to include a button in the excel ribbon(which i have done) but i do not know how to connect the ribbon button to the macro correctly, here is my C# and XML code: C# public class Ribbon1 : Office.IRibbonExtensibility { private Office.IRibbonUI ribbon; TimeSpan startTimeSpan = new TimeSpan(0, 0, 5, 0); TimeSpan timeDecrease = TimeSpan.FromSeconds(1); private Timer timer = new Timer(); public void Ribbon_Load(Office

MS WORD VSTO Add-in: Exception reading manifest from file

三世轮回 提交于 2020-06-01 06:53:11
问题 I'm getting the following error during a loading of a Microsoft WORD VSTO Add-in that I created using VS2019 on Windows 10 Pro . The adding was loading fine before. Question: What could have been the cause of the error and how can the issue be resolved? Found some similar issues online (like this one) but still no luck. Error : Name: From: file:///C:/DotNet2019/VSTO/MyWORDAddinProj/bin/Debug/MyWORDAddinProj.vsto ************** Exception Text ************** System.Deployment.Application