vsto

Custom Outlook add-in is not showing

余生长醉 提交于 2021-02-10 03:12:00
问题 I have the outlook add-in developed with VSTO and the add-in is installed using Visual Studio Installer. After installation I can see in the outlook that the custom add-in is installed (visible in File-Option-Add-Ins and of course its allowed) but its not showing in the ribbon. When I run the project in VS I can see that the outlook is being started and it stops at the debugger. http://pastebin.com/cWrfUSa8 - this is the part when the ribbon, tab and the button is being initialized. The code

deploy VSTO into one single Installer

删除回忆录丶 提交于 2021-02-09 06:58:09
问题 I have deployed a VSTO application by using ClickOnce and I got this: This installer works real fine. However, what I really want is one single installer, like a single .exe file or a single .msi file , so that it would be much convinenet to distribute. I guess I have to pack all the dll, xml, vsto and exe into one single installer. Does anyone know how to do this? Thanks in advance to anyone who has taken time to look at my problem! 回答1: Check this https://github.com/bovender

How can I programmatically insert RTF text into a PowerPoint text frame using C#?

烂漫一生 提交于 2021-02-08 11:21:11
问题 Is there any way to programmatically insert RTF-formatted text into a PowerPoint TextFrame? string myString = <some RTF formatted text>; MyPlaceholder.TextFrame.TextRange.Text = myString; This answer gets me close: Is it possible to insert pieces of RTF text into a Word document (.docx) using OpenXml? But I am having trouble figuring out how to do this in PowerPoint rather than Word. What I am trying to do is copy text from a RichEditBox in my application onto a PowerPoint slide and maintain

VSTO OpenXml C# - Edit PowerPoint on Runtime

拜拜、爱过 提交于 2021-02-08 07:51:53
问题 I've read a lot about editing pptx files with OpenXml like PresentationDocument presentationDocument = PresentationDocument.Open("C:\\Users\\beggers\\Desktop\\Test.pptx", true) But how can I modify the XML data of my slides/presentation on runtime? Specialy when I run a new presentation witch is not saved. I am working on a C# VSTO Add-in and I want to modify my slide/xml in a way, which is not supportet by Microsoft.Office.Interop. 回答1: Unfortunately, Microsoft Word is the only Office

C# VSTO Excel Addins: How can I access Ribbons Controls from the Addins ThisAddIn_Startup?

六月ゝ 毕业季﹏ 提交于 2021-02-08 05:22:10
问题 I'm designing an Excel Addins with Ribbons like this: The Ribbon Name is Ribbon1 The Tab Name is Tab1 The ToggleButton name is tglShowNavigation What I need is: From the ThisAddIn.cs , in the ThisAddIn_Startup void, I would like to be able to Affect/Change the ToggleButton tglShowNavigation's Label . I tried the following but cannot see any control from this: Where and how could I access the Controls on my Ribbon from the ThisAddIn_Startup please? NB: I don't want to call a global function

Copy first row in excel workbook to a new excel workbook

青春壹個敷衍的年華 提交于 2021-02-07 14:52:14
问题 How do I get the first row in an excel workbook & save it to a new excel workbook using .net c#? I dont know the amount of columns so need to get entire row. This what I have but the new workbook is blank (no row copied) Excel.Workbook xlWorkbook = xlApp.Workbooks.Open(file); Excel._Worksheet xlWorksheet = xlWorkbook.Sheets[1]; Excel.Range xlRangeHeader = xlWorksheet.get_Range("A1", "A1").EntireRow; Excel.Workbook xlWorkbookNew = xlApp.Workbooks.Add(); Excel._Worksheet xlWorksheetNew =

Copy first row in excel workbook to a new excel workbook

£可爱£侵袭症+ 提交于 2021-02-07 14:50:30
问题 How do I get the first row in an excel workbook & save it to a new excel workbook using .net c#? I dont know the amount of columns so need to get entire row. This what I have but the new workbook is blank (no row copied) Excel.Workbook xlWorkbook = xlApp.Workbooks.Open(file); Excel._Worksheet xlWorksheet = xlWorkbook.Sheets[1]; Excel.Range xlRangeHeader = xlWorksheet.get_Range("A1", "A1").EntireRow; Excel.Workbook xlWorkbookNew = xlApp.Workbooks.Add(); Excel._Worksheet xlWorksheetNew =

How to Add a Menu Item in Microsoft Office Word

╄→гoц情女王★ 提交于 2021-02-07 13:21:12
问题 I tried to create a right-click menu item in Microsoft Word based on this post. Here is my code: private void ThisAddIn_Startup(object sender, System.EventArgs e) { try { eventHandler = new _CommandBarButtonEvents_ClickEventHandler(MyButton_Click); Word.Application applicationObject = Globals.ThisAddIn.Application as Word.Application; applicationObject.WindowBeforeRightClick += new Microsoft.Office.Interop.Word.ApplicationEvents4_WindowBeforeRightClickEventHandler(App_WindowBeforeRightClick);

Outlook VSTO Explorer.Selection_Change doesn not get called

馋奶兔 提交于 2021-01-29 14:40:21
问题 In my VSTO plugin I use the following class members to store pointers to currentExplorer, currentAppointmentItem and currentExplorers. In Startup I try to setup all necessary event handlers like this: currentExplorers = this.Application.Explorers; foreach (Outlook.Explorer explorer in currentExplorers) { ((Outlook.ExplorerEvents_10_Event)explorer).Activate += new Outlook.ExplorerEvents_10_ActivateEventHandler( Explorer_Activate); explorer.Deactivate += new Outlook.ExplorerEvents_10

Works on WPF. But on VSTO project, throws error: Could not load file or assembly 'SQLitePCLRaw.core, Version=2.0.2.669, Culture=neutral

流过昼夜 提交于 2021-01-29 14:33:43
问题 I've created a .NET Standard 2.0 class library project that works fine when referenced by a WPF App (.NET Framework 4.8) project. But when the same library is referenced by a MS Office VSTO Project (also using .NET Framework 4.8), I get the following error on the code line shown below: Remarks : I'm using VS2019 , Windows20 Pro , Microsoft.Data.Sqlite and following example from same link. Exact same code works fine on WPF app. I also tried installing SQLitePCLRaw.core package (as mentioned in