vsto

VSTO for Word and Autotext

I'm trying to migrate a VBA macro to VSTO (Word). In the macro I did the following to insert an Autotext at the currently selected Position: ActiveDocument.AttachedTemplate.AutoTextEntries("agenda#").Insert where:=Selection.Range, RichText:=True Now I've added a rich-text-contentconrtol (XYZ) to the document, but I'm not able to find ...

inserting c# generated image on excel sheet

hi, i have a bitmap generated from c# code (not a file!) which i want to insert on an excel worksheet... plz can you show me how is it possible ...

c# excel AddCanvas problem

hi can you help me to find the problem at this line of my code where i try to add canvas to excel sheet from c# Line 1 Excel.Worksheet ws = (Excel.Worksheet) Globals.ThisAddIn.GetActiveWorksheet(); Line 2 ws.Shapes.AddCanvas(100,100,100,100); at line 2 it gives me exception... am i doing smth wrong? thanks a lot...

c# excel AddChart

hi i am adding chart to excel from c# as follows Excel.Worksheet ws = (Excel.Worksheet) Globals.ThisAddIn.GetActiveWorksheet(); Excel.Shape chart = (Excel.Shape) ws.Shapes.AddChart(Type.Missing,100,100,100,100); is it possible now to add let's say Rectangle on the chart above for example like chart.Add(msoR...

VSTO - Shared addin for Word and Excel to modify the ribbon

I have successfully used the Excel and Word addin templates in Visual studio 2008 to create a project that adds to the ribbon, but I am having difficulty with shared addins. I have created an add in that uses a xml file to modify and add to the ribbon and I can catch the events from buttons added, but I can't for the life of me figure o...

c# excel image

hi i have inserted image on an excel worksheet... how is it possible to refer to this image from c#, thanks a lot! ...

how to delete an image on a sheet

hi let's say i have images on my excel worksheet, how is it possible to delete/remove them from the sheet using c#, following code gives me exception Excel.Worksheet ws = Globals.ThisAddIn.GetActiveWorksheet(); foreach (Excel.Shape sh in ws.Shapes) { sh.Delete(); } thanks! ...

c# excel add in as dll

hi i am using vs2008+vsto to create excel add in (ribbon)... is it possible to make it a dll, like myaddin.dll so that users will have to only add this dll... and use, or can you suggest any better approach, thanks a lot! ...

VSTO: SecurityException Request for OraclePermission failed

We wrote a MS Word Add-In using VSTO 2.0. In this Add-in we've connected to a sql server database. Anything went fine. Now, our client wants to switch to an Oracle DB. When we try to connect now via the Sytem.Data.OracleClient Provider, we get a SecurityException saying: "Request for the permission of type 'System.Data.OracleClient.Orac...

More outlook VSTO help...

I posted an article here (http://stackoverflow.com/questions/1095195/how-do-i-set-permissions-on-my-vsto-outlook-add-in) and I was able to build my installer. I thought that once the installer built itself, everything would work fine. I was wrong. It works on about half of the PC's I've run the installer on. My problem is that the othe...

How to immediately shutdown/close Excel VSTO Workbook when customize assembly not found.

Hi I create an Excel Workbook solution in Visual Studio 2008. When I build the solution I get a .XLS file and a .DLL (customize assembly). I can now start up the Excel sheet just by double clicking on the .XLS and there is my sheet functioning with all my C# code. But in cast of that customize dll unavailable. I start up Excel workboo...

c# excel zoom in and out button

hi i have a c# program which creates a ribbon on excel-2007, on that ribbon i have two buttons one for zoom in and other for zoom out. my question is how is it possible so that when i press one of the above buttons and then select the cell or range on a sheet that cell or range will be zoomed in or out? my problem is i do not know how ...

Sharepoint + VSTO deployment

I've developed a Word template in VSTO. When published it consits of several files including a Setup.exe, several msi files etc. Due to the fact that my company's security policy won't allow me to store dlls and exes on the server I need an alternative way to provide all the necessary stuff to the end user. I thoght it would be enough...

c# excel 2007 print preview ribbon

hi, is it possible from c# to add some groups, buttons,... to excel-2007's print preview ribbon... why? i wanted to put some images on that ribbon so that user by selecting the image will be able to put it on a sheet (where ever on that sheet by dragging it) and print it with that sheet... many thanks! ...

insert text after dynamicly created table in word using VSTO

How using VSTO and Word 2003 can I insert text after a table I've created? I have code like bookmarkDescriptions = (object)"bookmarkDescriptions"; Word.Range rangeDescriptions = aDoc.Bookmarks.get_Item(ref bookmarkDescriptions).Range; foreach (var item in items) { //Add a paragraph with some text Table descTable = aDoc.Tables.A...

c# excel 2007 print preview sheet

hi, how is it possible to (from c#) insert image on a sheet being displayed by print preview dialog? thanks a lot! assuming that i have my own button on a print preview ribbon which will insert the image. this is actually continuation of my question http://stackoverflow.com/questions/1160905/c-excel-2007-print-preview-ribbon link text ...

inserting own image on excel through c#

Hi i have the following code... where i generate my own image and paste in to excel worksheet, please can you tell me why its background color is always BLUE? is it possible somehow to change that for example to make it transparent or white? (i tried flag.MakeTransparent(); but it also does not work) Bitmap flag = new Bitmap(200,...

Is there an easy way to access Outlook contacts outside of VSTO?

At work we use a couple of custom columns in the Outlook contacts to serve as an "signout board" so we can see when developers are at another site since we're spread out across a couple of locations. The way this is currently implemented is via a custom view of the contacts that is displayed as a spreadsheet that folks can update their s...

Tips for VSTO Developers

I have a personal project that I'd like to build as an add-in for Microsoft Word 2007. I have prototyped it using VSTO with Visual Studio 2008 and found it surprisingly easy to work with the object model. I am however worried about deployment of my add-in. I assume users will need Office and .NET 3.5 (with SP1) installed, but will they...

VSTO C# expose ribbon events to other document level components

I have an a custom Excel Workbook using C# and VSTO. Is there anyway for a worksheet to reference the ribbon and subscribe to events, or manipulate controls in the ribbon? I haven't been able to find the syntax in Globals.Ribbons that will give me a handle to the ribbon. ...