add-in

Disable, but not uninstall Resharper 4.x onwards

痴心易碎 提交于 2019-11-28 03:52:29
Any ideas on how to disable, but not uninstall Resharper 4.x or above? Rytmis You can disable ReSharper 4 and lower using the Visual Studio Add-In Manager (remove the check from check box on the left). In ReSharper 5 and above (tested up to version 7.0.1), this is how you can suspend ReSharper from the Tools > Options > Resharper Cherian The accepted answer does not work from resharper 5 onwards. You should suspend ReSharper from the Tools > Options > Resharper Oscar Mederos If you want to do it without clicking too much, open the Command Window ( Ctrl + W , A ) and type: ReSharper_Suspend or

Find the last used row in Excel with C# [duplicate]

好久不见. 提交于 2019-11-28 03:42:52
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: How to get the range of occupied cells in excel sheet Im trying to find the last used row in an Excel worksheet. For doing this, I'm using this code: int lastUsedRow = currentWS.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLastCell,Type.Missing).Row; Most of the time it works fine, but sometimes Excel thinks that there's more rows in the sheet than theres suppose to be. Fx: If I copy data from sheet1,

Using 32bit COM addin under MS Office 64 bit

二次信任 提交于 2019-11-28 01:42:24
问题 I am struggling to apply an existing 32bit COM addin to 64bit Microsoft Word 2010. To make the addin visible to Word, I have used the dllsurrogate-method, as it described here. The problem is that now addin caused some strange exception when tries to add its toolbar and menu to office's. I cannot figure out, what it is, it seems, that the command bar reference became not valid in unpredicable moments. Can anyone explain this? Note, that everething is fine when I use the same addin under 32bit

How to place a control over the task bar in windows using c#

偶尔善良 提交于 2019-11-28 00:55:18
问题 i googled a lot and found out some info about the band object from which we can make the ad-in for the task bar, can i get some more tutorials from scratch & some sample programmes. is there any other alternative way is there to place a control over the windows task bar apart from band objects? Thanks in advance 回答1: If you want to place a textbox in the taskbar like the Google Desktop search bar, then you're not actually trying to place the control over the taskbar, you want to place it

How to expose a C# class to a VBA module in a document-level add-in?

*爱你&永不变心* 提交于 2019-11-27 23:53:09
问题 This is a hypothetical situation. I would like to find out if it's possible to expose a C# class to VBA in a document-level add-in. Here's an SSCCE: In VS PRO 2012 I have started a new project, Selected Office -> Excel 2010 Workbook. (make sure you select .Net framework ver 4) I have added a DateTimePicker control to Sheet1. I can set/get the .Value property off the DateTimePicker control within the C# solution without a problem. While debugging: In VBA, the .Value property is not exposed. (

Find an IVsTextView or IWpfTextView for a given ProjectItem, in VS 2010 RC extension

☆樱花仙子☆ 提交于 2019-11-27 21:26:26
I have the ProjectItem, and want to get the IWPFTextView that is associated with it, if any. I have tried to get an IVsTextManager, and then iterate through the views, but iVsTextManager.EnumViews always returns nothing. Here is what I've got so far: var txtMgr = (IVsTextManager)Package.GetGlobalService(typeof(SVsTextManager)); if (txtMgr != null) { IVsEnumTextViews iVsEnumTextViews; IVsTextView[] views = null; // Passing null will return all available views, at least according to the documentation // unfortunately, this returns a 0x80070057 error (invalid parameter) var errorValue = txtMgr

How do you call “Document Format” programmatically from C#?

巧了我就是萌 提交于 2019-11-27 19:25:33
问题 I'm writing a simple VS add-in and would like to programmatically invoke the "Document Format" option (under Edit) within code. Google isn't being very friendly to me today.... 回答1: Command cmd = _applicationObject.Commands.Item("Edit.FormatDocument", -1); object dummy = null; _applicationObject.Commands.Raise(cmd.Guid, cmd.ID, ref dummy, ref dummy); 回答2: If you have a reference to your document (of type Window), and you have a reference to the _DTE object, you can call it like this:

Optional Argument of COM Add-in vs Automation Add-in Written in C#

坚强是说给别人听的谎言 提交于 2019-11-27 18:30:17
问题 I am working on a library of COM Add-in and Excel Automation Add-in, whose core codes are written in C#. I'd like to set an optional argument for the function and I know that this is legal for both C# and VBA, and even Excel WorksheetFunction. But I find that finally the optional argument works exclusively for COM and Automation add-in, meaning that if one add-in is run first, then works well but the optional argument of the other one will not work. Below please see the example: In the VS

Build add-in for VBA IDE using VB.NET

孤街浪徒 提交于 2019-11-27 18:12:50
I have asked this elsewhere, but have never found anyone knows how to build an add-in for VBA IDE using VB.NET. Is it even possible? Could someone point me to an example? It is possible you need to write a com addin using IDTExtensibility2 interface, select the shared addin project template from new project. EDIT Otherwise to create this addin from scratch you will need to do the following: Create a new project class library Add references to "Extensibility", it should be in the list. You may need to download the PIAs for your version of office. (and perhaps VSTO but i am unsure on this point)

Visual Studio window manager

爷,独闯天下 提交于 2019-11-27 17:00:23
问题 Is there a window manager for Visual Studio 2008 like this one. I really liked it, and that's all I used in Visual Studio 2005 and saw somewhere it is supposed to work in Visual Studio 2008, but it doesn't. I have tried it on many installations of Visual Studio 2008, and it doesn't remember any settings. I really liked being able to easily change window layout quickly. Right now I just manually import and export settings, but it's not an instant process. What do I have to do to make it work?