vsto

Outlook Add-in VSTO: Ribbon Type property is not shown

☆樱花仙子☆ 提交于 2021-01-28 04:45:20
问题 I am a new VSTO 2015 user. I want to add a custom group to the Outlook 2010 built-in Ribbon message tab. I followed a Microsoft example. After creating the project I added a new Item and selected the Ribbon (Visual Designer). The ribbon shows up in the designer however I cannot see the RibbonType property in the Ribbon’s property window. Therefore I cannot select the Microsoft.Outlook.Mail.Compose that will allow me to add the custom group to the message tab. Your help is highly appreciated.

Outlook Add-in VSTO: Ribbon Type property is not shown

狂风中的少年 提交于 2021-01-28 04:24:41
问题 I am a new VSTO 2015 user. I want to add a custom group to the Outlook 2010 built-in Ribbon message tab. I followed a Microsoft example. After creating the project I added a new Item and selected the Ribbon (Visual Designer). The ribbon shows up in the designer however I cannot see the RibbonType property in the Ribbon’s property window. Therefore I cannot select the Microsoft.Outlook.Mail.Compose that will allow me to add the custom group to the message tab. Your help is highly appreciated.

“This command is not available.” error occurs when trying to execute PasteAndFormat function

孤街醉人 提交于 2021-01-28 04:10:47
问题 I published the VSTO app, where I copy a Range with a formatted text. On most users machines the application works properly while some users have the error "This command is not available." thrown whenever the following piece of code is being excetuded. var sourceDocument = Globals.ThisAddIn.Application.ActiveDocument; sourceDocument.Range().Copy(); Document documentOld = new Document(); documentOld.Range().PasteAndFormat(WdRecoveryType.wdFormatOriginalFormatting); //here the error occurs

Exception reading manifest from file. Microsoft Word Add-in VSTO

亡梦爱人 提交于 2021-01-28 03:31:09
问题 I am trying to create a Microsoft Word add-in that will add and commit to a git repo every time the Word document is saved, either auto save or manual save. I have been able to get the functionality I desire when I run the program from within Visual Studio (debug mode). When I publish and install the add-in so that it runs when Word starts, I get the following error. Now when I try to add the LibGit2Sharp NuGet packages, running in debug mode from within Visual Studio gives me this error: and

Get Formatted Cell Values efficiently

倖福魔咒の 提交于 2021-01-27 04:28:10
问题 I would like to be able to efficiently retrieve a multi-dimensional array of formatted cell values from Excel. When I say formatted values, I mean I would like to get them exactly as they appear in Excel with all the cell NumberFormat applied. The Range.Value and Range.Value2 properties work great for retrieving the cell values of a large number of cells into a multi-dimensional array. But those are the actual cell values (well at least with Range.Value2 is, I'm not quite sure what Range

GetExchangeUser() returns null when Outlook 2016 uses Cached Exchange Mode

被刻印的时光 ゝ 提交于 2020-12-08 01:57:20
问题 Developing for : Outlook 2016 Add-In : VSTO (C#) My company is running on O365 (Exchange) and I am developing an add-in which collects their exchange user information and does various things. However, it appears that when the Outlook Account Settings is configured with Cached Exchange Mode enabled the GetExchangeUser() returns null. If I disable the clients Cached Exchange Mode everything works fine. However my company wants to keep this feature enabled. My rough understanding is that

GetExchangeUser() returns null when Outlook 2016 uses Cached Exchange Mode

◇◆丶佛笑我妖孽 提交于 2020-12-08 01:56:53
问题 Developing for : Outlook 2016 Add-In : VSTO (C#) My company is running on O365 (Exchange) and I am developing an add-in which collects their exchange user information and does various things. However, it appears that when the Outlook Account Settings is configured with Cached Exchange Mode enabled the GetExchangeUser() returns null. If I disable the clients Cached Exchange Mode everything works fine. However my company wants to keep this feature enabled. My rough understanding is that

explorer preview causes System.Runtime.InteropServices.COMException: Automation rights are not granted. on ActivePresentation.name

爱⌒轻易说出口 提交于 2020-12-06 06:35:49
问题 public static PowerPoint.Presentation GetActivePPT(this PowerPoint.Application application) { try { if (App.Presentations.Count > 0) { return application.ActivePresentation; } else { return null; } } catch (Exception ex) { return null; } } I call this function like so: PowerPoint.Presentation ppPresentation = PowerPointApplication.GetActivePPT(); if(ppPresentation != null) { Console.WriteLine(ppPresentation.Name); } And I get a : COMException: Message:Presentation (unknown member) : Invalid

explorer preview causes System.Runtime.InteropServices.COMException: Automation rights are not granted. on ActivePresentation.name

a 夏天 提交于 2020-12-06 06:33:30
问题 public static PowerPoint.Presentation GetActivePPT(this PowerPoint.Application application) { try { if (App.Presentations.Count > 0) { return application.ActivePresentation; } else { return null; } } catch (Exception ex) { return null; } } I call this function like so: PowerPoint.Presentation ppPresentation = PowerPointApplication.GetActivePPT(); if(ppPresentation != null) { Console.WriteLine(ppPresentation.Name); } And I get a : COMException: Message:Presentation (unknown member) : Invalid

Convert Number Stored As Text To Number

喜你入骨 提交于 2020-12-03 03:38:24
问题 I have an Excel workbook that has column C as number stored as text. What is the C# syntax to convert it to number? I know that this VBA will do the job Range("C:C").Select With Selection Selection.NumberFormat = "0.00%" .Value = .Value End With And I tried this with C# - but it left the numbers stored as text. ExcelWorksheet ws3 = pck.Workbook.Worksheets.Add("New Sheet"); ws3.Cells["A1"].LoadFromDataTable(tableforme, true); ws3.View.FreezePanes(2, 4); ws3.Cells["C:C"].Style.Numberformat