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: MEF in Office?

    In my last post , I looked briefly at MEF, and I’m wondering how this model can be applied to Office add-ins. The Office add-in model itself already achieves a level of dynamic composition, by virtue of the fact that the set of add-ins to be loaded is only discovered at runtime. However, even though...
  • 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: 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: 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: 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: 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: 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...
  • Blog Post: Integrating Doc-level and Add-in Solutions

    Everyone knows you can build document-level Office solutions and you can build application-level Office add-ins. Suppose your requirements dictate that you build a solution that uses both techniques – can this be done? First, let’s pause and consider whether this is a good idea in the first place, and...
  • Blog Post: VSTO Add-ins for Access?

    In my previous post , I looked at how the VSTO add-in model is flexible enough to be used in prototyping scenarios for versions of Office not yet released. In principle, the same applies to Office host applications that are not currently supported. VSTO supports add-ins for most Office applications...
  • Blog Post: Add-ins for Office 14

    Following on from my previous post , it should be clear that we've designed the VSTO Office add-in support to be optimally useful across multiple different Office host applications and spanning multiple Office versions. To be very clear, let me reiterate: we cannot support something we have not tested...
  • Blog Post: Back To The Future

    Or, Prototyping VSTO Add-ins for Unsupported Office Versions/Applications It is in the nature of the VSTO 2005 SE and VSTO 2008 add-ins that they will run in multiple versions of Office. One of the main reasons for designing them this way is to mitigate the disconnect between the Office ship schedule...
  • Blog Post: VSTO + WPF + WCF + LINQ (MSDN Article)

    There's an article in this month's MSDN magazine on building Office-based solutions using VSTO with WPF, WCF and LINQ. The point of the article is to affirm that all these disparate technologies do indeed work well together, and that the design-time experience of building such a solution is suitably...
Page 1 of 2 (41 items) 12