vsto

Hide menu from wordml taskpane office 2003

Hi, I am trying to hide one of the menu options from taskpane word 2003. I can do this successfully by doing this: CommandBars["File"].Controls["Version History"].Visible = false; However, for some reason, it hides this option for any document you open from that point of time unless you specifically unhide it. Is there any other way h...

Problem installing VSTO4.0 addin on Outlook 2007

I have created an Outlook addin using VS2010 and VSTO 4.0. On Windows7+Outlook 2010, the installation and and application behaves as expected. On Vista+Outlook 2007 (fresh installed virtual machine), the installer complains that it does not recognize the .vsto file format. Has anyone experienced this? When I previously created VSTO...

How to detect the print preview window of Excel 2003, with vb.net ?

Hi, I need to be able to test if the current view is print preview in Excel 2003. Is there something in the excel object model to simply access this property? (Like the application.printpreview in the Word object model...). Any advice would be more than welcome, Thanks Julien PS: Long story short, I'm developing a vsto addin with k...

Can I turn a Microsoft.Office.Interop.Excel.Chart object into a Microsoft.Office.Tools.Excel.Chart object?

Basically I've coded an Excel 2007 project in VB.NET 2010 that allows you to create charts with a fair amount of interactivity. I want the user to be able to save and reopen this workbook and still have that interactivity in any already-created charts, so they don't have to re-create them. When I create the charts, I use Sheet1.Controls...

Error when calling VBA function from VSTO code

I have the following VBA code in a module of one of my .xlt files: Public Sub SetShapeTop(ByVal shapeName As String, ByVal topValue As Single) ThisWorkbook.ActiveSheet.Shapes(shapeName).Top = topValue End Sub In my VSTO add-in, I have the following C# code which tries to call that VBA function: m_worksheet.Application.Run("SetShape...

office 2007/2010 VSTO add column

Hi, How do I go about adding a column (Custom Property) to all the messages in outlook. I wish to add a custom property to each email message. I need to allow the user to switch the property on and off. I have created a new add-in but cannot find a sample or similar functionality anywhere. If I can understand how to add the property a...

Event on named range creation in Excel using VSTO

Is there any way to hook into the creation of a named range or list object in Excel 2007 using VSTO? I need to track the named ranges in a worksheet and, as such, need to be alerted when a new one is created. I have tried the SheetChange and SheetCalculate events and neither is triggered on the creation of a new named range. ...

Excel VSTO call results different between v2003 and v2007 - why?

I have this piece of c# code in my Excel 2003 add-in: var leafPoint = m_worksheet.Shapes.Item("aPoint").Duplicate(); leafPoint.Name = "Shape" + (m_shapesNameIndex++).ToString(); leafPoint.OnAction = m_worksheet.CodeName + ".PointClicked"; leafPoint.AlternativeText = string.Format("Correlation Value: {0}", item.PointData.Corr...

How to get a specific section from Microsoft Word using C#

Need help in figuring out a way to fetch a particular block of content from Microsoft Word document using the section number in C# .NET. For example if a word document which has sections as follows: Introduction Format Description 3.1 Details 3.2 Tables 3.3 Figures Analysis Now from section 3.2, I would like to get access to...

Clickonce Office add-in assembly reference problem upon deployment

I have developed an Office 2007 C# add-in. It uses clickonce for deployment. On systems with Office 2010 all is ok but on a machine with XP SP3, NET 3.5sp1 and Office 2007, I get a strange assembly loading error. My add-in does not directly reference Microsoft.Office.Interop.SmartTag.dll. This gets referenced by Microsoft.Office.Tools.C...

Rich text box in an Office 2007+ ribbon control

I want to have a rich edit control on an Office 2007+ ribbon control from within an Office add-in. There is no rich text box in a VS2010 designer Toolbox. Is there a way to put a custom control in a ribbon or is there any other less straightforward way to accomplish this? ...

VSTO Excel Com Add In Ribbon Not Loading

I'm using VS 2010 to develop an Excel 2007 COM Add-In. Because it's a VS 2010 Office Project, it targets the .NET 4.0 Client Framework. I've added a new Ribbon (XML) item called MyRibbon, so default filenames of ThisAddIn.cs, MyRibbon.cs, and MyRibbon.xml. Everything builds fine. It publishes with a .vsto extension. When I install the a...

VSTO: Get Text Cursor position (X/Y)

Is it possible to get the text cursor's position (the X and Y coordinates) within a Word Document (not the mouse cursor)? Basically I need to know where the text cursor is currently located on the screen. Is that even possible? ...

How to read the data from Non Adjacent Cells in Excel using C#

I have an excel sheet, in which i have multiple cells selected, which are not adjacent to each other. When the user click on the button, we need to read all the cells data, process it and write it to some other cell. If the cells are adjacent to each other, i was able to get the range and able to perform the operation. But if the cells ...

Where should VSTO-developed extensions be installed?

I am building an extension ribbon for Excel. Besides the ribbon DLL I will have a data access DLL and a .sdf (SQL CE database file). In which directories should they be installed? Is there a best practice for deploying this project? It will be used at several sites around the country. ...

Bundling only part of the prerequisites with ClickOnce

Is it possible to configure the ClickOnce installation so that it requires .Net Framework and VSTO but includes only the VSTO binaries and downloads .Net Framework if necessary? Including the VSTO in the package isn't too much of a problem but the 350MB .Net Framework is something I'd do away with if possible. (Dynamics CRM SDK depends ...

powerpoint rogrammatically add textbox animation triggered by bookmark in mediaobject

I am trying to programmatically add an fade effect on a textbox which is triggered by a bookmark in a mediaobject, eg movie. So when the movie plays and reaches the bookmark the textbox will appear with the fade effect. I have gotten as far as being able to add the textbox to the slide and adding the bookmarks to the mediaobject shape ...

Can I access the Standard Word Ribbon Tabs while within a VSTO Word Addin?

This seems to be something that should be very straight forward, but I'm unable to find the Word Ribbon after the addin starts. There is a collection of Ribbon objects on the ThisAddIn object, but of course those are the ribbon objects that I've created and use specific to my addin. What I want access to is the overall collection of Ri...

Excel VSTO Addin not handling commandbarbutton.click event.

I am developing an Excel VSTO C# add-in. The add-in has a single command-bar ribbon with 1 command-bar-button. the purpose of this button is to open a dialog window that allows search dates to be entered then calls off to a web-service to retrieve data, which gets populated in the spreadsheet. The problem is that after the instal...

From the browser UI, how to identify if VSTO 3.0 is installed in the system?

Objective: From the browser UI, how to identify if VSTO 3.0 is installed in the system? Use Case: From my ASP.NET web application, i am allowing the user to download a word file which has got "Document Level" vsto 3.0 Add-in. However, if VSTO 3.0 runtime is not installed in the system, the document throws an exception. I wish to do the ...