When you add a VSTO (not Word native) content control, you specify the name:
controls.AddContentControl(wordRange, "foo", wdType);
Where controls is the VSTO (extended) Document.Controls collection.
You can later look up the control by name:
ContentControl myContentControl = controls["foo"];
So why in the world is there no Name property for…
It was easy to check if VSTO 2005 SE was installed by just calling MsiGetProductInfo() with the product code {388E4B09-3E71-4649-8921-F44A3A2954A7}, as listed in MSDN.
What is the product code for the VSTO 2010/4.0 runtime? Or is there a better way to determine if it's already installed? This is for our installation process.
Thanks!
Also, I…
I have an outlook 2007 addin in VSTO 2005 which is delegating off to MAPI32.dll's MAPIToMIMEStm to save e-mails as .eml temporarily before we do some other business logic.
Is there a built in replacement to this in VSTO to MAPI32.dll?
I'm trying to set the Calculation property on an OLAP PivotField with VSTO 3.0. For example:
pivotField.Calculation = XlPivotFieldCalculation.PercentOf;
If I do the above, the value I assign does not stay (Excel appears to revert the change). I suspect the reason is that the BaseField property of the PivotField also needs to be populated (as…
In order not to pollute my projects with unit tests, I like to create a separate project for my unit tests; I add a reference to the project under test in the unit tests project. However, this isn't working that well with my VSTO excel add-in projects: when I create a separate unit test project and go to Add Reference Projects, there is no…
This is a sample code for getting Email accounts which are configured in Outlook 2007. This is developed using native code of VSTO. We can also implement is using 3rd party libraries like Redemption.
Dim olAccounts As Outlook.Accounts = Globals.ThisAddIn.Application.ActiveExplorer().Session.Accounts
Dim acc As Outlook.Account…
Ok, let me explain it little bit better.
Here is one example how to create formula/functions
http://blogs.msdn.com/b/eric_carter/archive/2004/12/01/273127.aspx?PageIndex=1#comments
I implemented something like that, I even added values in registry, so that this Automation AddIn doesn't have to be added manually in Excel, but…
Note: Cross posted from Coding The Document.
Permalink
Sometimes in order to work with Open XML we need a little help from other tools. In this post I am going to describe a fairly simple solution for marking up PowerPoint presentations so that they can be used as templates and processed using the Open XML SDK. …
Hello everyone,
I'm using VSTO with Outlook 2007 and I need to show a form (or a user control) inside the main window in outlook when the user clicks a specific toolbar button, that is, I need it to appear in the same window that the reading pane appears and not to open in a window by itself. Is this possible?
Thank you…
So I want to capture some key-commands in our Docuement-level Excel VSTO addin. I can't seem to find a way to do it, other than to use VBA and have our addin talk to the VBA. Any help/examples would be greatly appreciated.
I am using Excel 2007.
Hi!
I'm using VSTO to create an Excel Add-on. This add-on retrieves and display alot of data from a sql-server. This works great, but later on I plan to access some of the data inside excel and modify it in some ways. My problem is that I need a way of classify cells that I want to modify. Is there any way to add…
I have an Outlook 2007 Add-in in VSTO 2005 SE that allows users to save e-mails into our document management system. From within our system users are able to open e-mails they have previously saved. However, when doing so I need to try and prevent them from saving them again.
I am trying to figure out how to…
I created a new project in VS2008. Project type
Visual C# > Office > 2007 > Word 2007 Document
Added some code.. got Word to do a few jumps through some custom hoops.. all fine. Now I need to reference another assembly (CopyLocal as false) which is not signed. So I add the project reference. Now…
I'm developing an application for Office. It originally targeted .net 3.5, but I decided to upgrade to .net 4 because of some WPF issues that I've run into.
When I switched all the projects in my solution and rebuilt, I got an error saying to include System.Xaml. I did that and rebuilt, and VS2010 told…
I have a YesNo column in a folder, and I added it to the folder view; it appears as a checked or unchecked checkbox. I've been asked to replace it with a green or red circle. Is this possible?
Thank you for your time.
I have added user property in a mail folder, let's call it UserProperty01. Some of the folder items have this property, some don't. I need to show in the folder's view if that property is set or not, so I added another property called UserProperty01Present, and I set it to true when I set the original…
I am trying to get cells from excel into csharp but not sure what's the best variable type to read it into.
If I make the variable a string and the cell value is a double I get a parse error. If I make the variable double then when the cell is a string it wont work.
Here's the code I am running:
…
Well I have browsed through Application events in Excel 2007 however I can't find any event generated on a cell click.
I can't use a double click event at the moment due to application constraints.
Is there a way I can create a custom click event and attach it to a sheet for generating a cell click…
What alternatives exist for VSTO?
What does managedxll do that VSTO does not - When would you use one vs the other
Google does not bring much up on this subject
I have been getting the error "The required version of the .NET Framework is not installed on this computer." (Event Id 4096 in Event log) when trying to install a VSTO application from both a ClickOnce deployment and a local copy. This is interesting as the .NET framework is installed (on my 32bit…
Name:
From: file:///D:/Samples/TestUpdatedVersion/bin/Debug/TestUpdatedVersion.vsto
The customization cannot be installed because another version is currently installed and cannot be upgraded from this location. To install this version of the customization, first use Add or Remove Programs to…
I want to modify the labels of the outlook conferencing add in... e.g. I want to change the "Schedule a live meeting" text to say "Schedule my meeting". is it possible using VSTO? or I can create only new add ins using VSTO and not customize the existing ones ??
(I am talking abt this…
This is the VBA code for an Excel template, which I'm trying to convert to C# in a VSTO project I'm working on. By the way, it's a VSTO add-in:
Dim addedShapes() As Variant
ReDim addedShapes(1)
addedShapes(1) = aBracket.Name
ReDim Preserve addedShapes(UBound(addedShapes) + 1)…
I have the following requirements
I have relational content stored in a SQL Server 2005 database.
I want to retrieve this data, transform it and display it in an Excel 2007 document.
I would like this to be pulled from within Excel at the click of a button.
As far as I…