Andrew Whitechapel

Shiny things that caught my eye

Browse by Tags

Tagged Content List
  • Blog Post: HLSL in Office

    HLSL is the High Level Shading Language for DirectX, documented here . I was wondering the other day how you might use shaders in Office, and this led me to build a little proof-of-concept that allows you to experiment with HLSL within the context of an Office application. I built a PowerPoint add-in...
  • Blog Post: Carter-Lippert VSTO Book Updated

    The eagerly-awaited update to Eric Carter and Eric Lippert’s VSTO book has been released this week. This is the definitive guide to Visual Studio Tools for Office, and this edition targets development for Excel, Word and Outlook 2007 using Visual Studio 2008. Eric and Eric have done another excellent...
  • Blog Post: Silverlight Deep Zoom and Office Add-ins

    I had some ‘free’ time today waiting to give a demo at an MVP conference session – the session over-ran, and I found myself sitting in the hallway for an hour. So I got to thinking about Silverlight and Office. If we assume that Silverlight is more or less a subset of WPF, then it makes little sense...
  • Blog Post: Message Hooks in Add-ins

    Just like my earlier post on message filters , this is an advanced scenario – so be warned: you almost certainly don’t want to do this . However, there are probably some extreme edge-case scenarios where this technique might be useful. For example, Office apps are notoriously parsimonious with their...
  • Blog Post: Launching Office Apps Programmatically

    There are at least 9 different ways to start or connect to an Office app programmatically in managed code, as summarized in this table: PIA Interop Using the Office PIAs is the most RAD approach, with the greatest level of design-time and compile-time support. This has to be the...
  • Blog Post: Passing Objects to Exposed Add-in Methods

    I’ve posted a few times on the best way to expose methods from an add-in to automation clients – for example, here , here and here . So far, in my examples, I’ve described very simple exposed methods that take no parameters – but what happens if you want to expose a method that does take one or more...
  • Blog Post: Using Managed Controls as ActiveX Controls

    Can you use a managed usercontrol in an Office document in the same way that you can use a native ActiveX control – all without using VSTO? Some time ago, I posted about how to use native ActiveX controls within a doc-level VSTO solution, by wrapping them in managed usercontrols. A reader (Casey) asked...
  • Blog Post: Implementing IMessageFilter in an Office add-in

    First a warning: this is an advanced scenario, and you should not attempt to use this technique unless you’re sure you know what you’re doing. The reason for this warning is that while the technique described here is pretty simple, it’s also easy to get wrong in ways that could interfere significantly...
  • Blog Post: Advances in .NET Type System

    Here at PDC, Misha Shneerson has just delivered a talk on a couple of very interesting new features provided by .NET 4.0. He did explain up front that these features have very broad applicability, but reading the session evals it's pretty obvious that a lot of people didn't get it. Probably this is because...
  • Blog Post: Exposing Events from Managed Add-in Objects

    Following on from my recent posts on exposing add-in objects, here and here , it occurred to me that its sometimes useful to be able to expose events from these objects. Recall that you can expose your add-in through the COMAddIn.Object property in the Office OM, either directly (in a non-VSTO add-in...
  • Blog Post: Exciting PDC Session

    Under the Hood: Advances in the .NET Type System This is one session you absolutely must not miss. It looks pretty innocuous, but it's actually a very big deal. This talk is an in-depth examination of some of the enhancements we're making in CLR v4.0 (and in the C# and VB language compilers) to support...
  • Blog Post: AddInSpy - Diagnosing/Troubleshooting Office Add-ins

    AddInSpy is a new diagnostic tool for reporting the maximum possible information about all Office add-ins registered on a machine. This is a free (unsupported) download, available on MSDN Code Gallery here . Covering article on MSDN here . In fact, there are 2 tools: AddInSpy, which is a WPF GUI application...
  • Blog Post: Version-Specific UI in Add-ins

    Continuing on from my earlier posts on building add-ins for multiple versions of Office , avoiding the PIA version conflict , and add-ins for multiple versions without PIAs , a reasonable way to design your solution would be to use the lowest-common-denominator PIAs (let’s say, the Office 2003 PIAs)...
  • Blog Post: Activating a Custom Tab on the Ribbon When a Document Is Opened

    Harry 'Play It Again Sam' Miller has posted a wonderfully funny video on this topic - with a serious message. You've got to check this one out: http://blogs.msdn.com/vsto/archive/2008/08/12/activating-a-custom-tab-on-the-ribbon-when-a-document-is-opened.aspx .
  • Blog Post: COMAddIns Race Condition

    You can expose an arbitrary object from your add-in as a kind of extension to the Office host application’s object model. To do this, you set your object as the value of the Object property on the COMAddIn object that represents your add-in in the host’s COMAddIns collection object. You can do this directly...
  • Blog Post: Why your COMAddIn.Object should derive from StandardOleMarshalObject

    In general, it is important that any code in a managed Office add-in should execute on the main UI thread. The reason for this is that there are several components that simply will not work when executed from any other but the main UI thread – examples include calls on WinForms controls, and calls into...
  • Blog Post: Creating a PivotTable Programmatically

    I received an email from a customer the other day asking how to set up an Excel pivot table programmatically. The Excel OM exposes a number of objects and methods that you can use to create pivot tables, some more sophisticated than others. I wanted the simplest possible way to set up a pivot table from...
  • Blog Post: Demand-Loading VSTO Add-ins

    In an earlier post , I talked about how you could delay (or prevent) the loading of managed code using a native add-in. In that post I also listed the standard LoadBehavior settings, and I was assuming that everyone knows how these apply, but I got a couple of follow-up questions that prompted me to...
  • Blog Post: Add-ins for Multiple Office Versions without PIAs (Pt2), or _VtblGap

    In my last post , I discussed how you could avoid any dependency on the Office PIAs by using ComImport to redefine the host application’s OM interfaces. Someone (A Developer) pointed out that I had actually omitted the trailing 2 members of the IRibbonControl interface – and I mentioned that this wouldn...
  • Blog Post: Add-ins for Multiple Office Versions without PIAs

    In a previous post , I discussed how you could build an add-in for multiple versions of Office, and explained the problems in this approach (and why it is not officially supported). One of the reasons this is not supported is because you end up building an add-in which has dependencies on a later version...
  • Blog Post: PDC 2008 Open for Registration

    It’s been 3 years since the last Professional Developers Conference, so I’m pleased that we’re doing one this year – it’s about time. This year’s PDC is on Mon-Fri Oct 27-30, with a one-day pre-con on Sun Oct-26, at the Los Angeles Convention Center (same as last time). The main site is here ....
  • Blog Post: Ribbon and Task Pane in Access Add-ins

    In an earlier post , I looked at how you could morph a VSTO project for one application into a project for another application – specifically, how you could build a VSTO add-in for Access. Note that this is explicitly not supported. However, although this was only intended as an investigative exercise...
  • Blog Post: The Case For Shared Add-ins

    People have been building native shared add-ins for Office (and related apps) since their introduction in Office 2000. People have been building managed shared add-ins since the introduction of .NET in 2002. VSTO support for managed add-ins was introduced in 2005. It is clear that the strategic technology...
  • Blog Post: Delay-loading the CLR in Office Add-ins

    Suppose you control your enterprise desktops to the extent that you control which add-ins are installed. Suppose, further, that you want to avoid the hit of loading the CLR at application startup. One way is to delay-load your managed add-ins. The registered LoadBehavior for an Office add-in governs...
  • Blog Post: VSTO Loader and Runtime Components

    Perusing the forums over the last few months, it’s clear that there’s some confusion about the various VSTO loader and runtime components. At the time of writing, there are 4 versions of VSTO in existence, including 4 sets of design-time tooling and 3.5 versions of the VSTO runtime. I say 3.5 versions...
Page 1 of 2 (48 items) 12