vsto

Get Localized / Unlocalized style names in Word (VSTO)

有些话、适合烂在心里 提交于 2019-12-10 17:17:39
问题 I have a word Add-In and need help dealing with style names. I get a paragraphs style with get_Style().NameLocal. This returns the localized name, depending on the language Office runs with. As long as there are Built in styles, I found a way to get the local names by applying wdBuiltInStyle to a paragraph and read Namelocal, then. However, there are roughly 134 built in styles, whereas a common template has approx. 270 styles internally. Most of those not in the enum are table styles. So,

Excel AddIn Click Once deployment issue

此生再无相见时 提交于 2019-12-10 16:54:51
问题 When I create a Excel 2010 Add-in project in Visual Studio 2010, and configure my prerequisite publish options for click once deployment, the 'Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64) option item, has a warning indicator over the icon, which screen tip says "Prerequisite could not be found for bootstrapping". Once I try to publish, it publishes fine, however, I get the warning: "Item 'Microsoft.VSTORuntime.4.0' could not be located in 'C:\Program Files\Microsoft

EventHandler that fires when the connection status of an outook changes

本秂侑毒 提交于 2019-12-10 16:42:28
问题 I am working on an Outlook Add-in using VSTO & C#. I need an event handler that fires when the connection status of an outook changes ( i.e. from online mode to offline and vice versa ). Is that possible? And is there such an event handler? I've been searching alot on the net, but unfortunately I found nothing. I would really appreciate if anyone have insight on that or even a possible solution. N.B: The outlook that I am using is Outlook 2007. 回答1: There is no event that triggers when

Determine if the selected email is from inbox or sent items

人盡茶涼 提交于 2019-12-10 16:36:52
问题 I am programming an Outlook Add-in and need to determine whether a selected email is from Inbox or Sent Items so that I can tag the email with folder="Inbox" or "Sent" when I save it in my database. I understand that I can compare the folder name to Inbox or Sent Items and determine the folder, however, how do I determine when the email selected is sitting in one of the sub-folders in the inbox. Is there a FolderType property to check whether the selected email's folder is inbox or sent (

MS Word Custom Task Pane disappears when I programatically open a document

我只是一个虾纸丫 提交于 2019-12-10 15:07:14
问题 I am trying to create a simple MS Word addin (mostly to explore functionality). The addin adds a Custom Task Pane, and group in the Ribbon. The Ribbon controls include a checkbox to control the visibility of the Custom Task Pane, and a button to open a document. When I test the addin in MS Word the task pane shows up correctly, and the checkbox works correctly. The problem is, as soon as I click the button and open a new document, the task pane is hidden, and the checkbox no longer controls

How to re-add a deleted VSTO Add-In

五迷三道 提交于 2019-12-10 14:53:15
问题 I've got a strange issue with a Word VSTO add-in on one machine where running the visual studio project opens word but does not attempt to start the add in as far as I can tell. I got to this point because I accidentally clicked Remove for the Add-in on the Manage COM Add-ins page, instead of re-enabling it after a failure. I want to know how to re-enable a deleted add-in - I'm thinking that perhaps there is a registry key somewhere I need to get rid of. When I run the project from Visual

Column No to Column Letter in Excel/VSTO using C#

落爺英雄遲暮 提交于 2019-12-10 13:57:40
问题 How to find column's name or header? For example if i select column 5 in excel means i want the result as "E". How to get the alphabet or letter corresponding to column no. Please help me with the code 回答1: What about using Application.ActiveCell.get_Address(true, true, Excel.AlReferenceStyle.xlA1, missing, missing) and then parse the result string or use a RegEx to get the column heading? I simply used: string location = Application.ActiveCell.get_Address(true, true, Excel.AlReferenceStyle

Need to place a floating modeless form over excel main window (quasi-task pane)

大憨熊 提交于 2019-12-10 13:42:12
问题 Hi I need to emulate a task pane by floating a modeless form over the Excel main window. The reason for this requirement is that I need to have taskpane features for my Excel 2003 add-in, but cannot use the document-centric model. Can anyone suggest what would be the best way to do this? The modeless form would need to detect the main window resize event and resize itself accordingly, and also need to always position itself at the bottom of the window (kind of like a docking pane). 回答1: Maybe

How can I get the filename of a Word document from C#?

核能气质少年 提交于 2019-12-10 13:18:59
问题 I'm working on a MS Word AddIn (VSTO). The idea is that I work on a Word document and I send it somewhere. I have all the code I need except one thing: is there a way I can get the filename of the Word document I'm working on? (assuming that is already saved) 回答1: this.FullName property in the code-behind .cs file should give you the entire path of the current doc. Here's the exact query in my QuickWatch window. ((Microsoft.Office.Tools.Word.Document)(this)).FullName 来源: https://stackoverflow

Unable to run Excel VSTO Add-ins

允我心安 提交于 2019-12-10 12:09:44
问题 Trying to run an Excel 2013 VSTO Add-ins project, and I keep on getting an error that says that: "System.Security.SecurityException: The solution cannot be installed because it is signed by a publisher whom you have not yet chosen to trust. If you trust the publisher, add the certificate to the Trusted Publisher list." The project has a key file with signature algorithm sha256RSA and certificate issued to/by the Windows User. Any idea how to get around this ? 回答1: Try the solutions from the