Blog du Tristank

So terrific that 3 of 4 readers rated it "soporific"

Blogs

Fiddling: Outlook Calendar Adapter for Blogwave 0.3

  • Comments 6
  • Likes

Seeing as Addy was kind enough to include sample adapter code with BlogWave 0.3, my immediate thought was that a Calendar might be cool. Can o' worms, that. I fiddled with this for the last few nights, and I think I've hit the 80/20 point, so I've cleaned up the UI, plastered massive warnings on it, and now it's ready to be seen by anyone not seriously interested in using it.

It's not designed for unattended use; it uses the simplest possible Outlook automation - no profile selection, no mess, no fuss, as long as the logged on user is the calendar source. Um, and it mostly works at night. Mostly.

Disclaimer: I strongly recommend against using this adapter, for any purpose, ever.

Notes:

  • Private appointments might be published. If you're even remotely worried about information leakage, don't use this adapter!
    • I've tried to filter out any non-normal-priority items, but there are other considerations, like:
  • I couldn't easily work out how to access the Label colour (sorry, color) using C# (part of the information leakage issue), so labeling something as Personal doesn't stop it being published.
    • it does check the sensitivity field for any non-normal value 
  • I couldn't spot an easy way of persisting custom data from the XML document I passed back to Blogwave; I might work this out at some point. This means that the published information is, well, barren of extra metadata, and/or formatting. I briefly mucked around with CDATA, but couldn't reliably get it to stick to the feed on its way out.
  • Trying to access the Body property always seemed to trigger the Outlook Security Dialog. So, no body!
  • Either Outlook's date selection filtering logic is fairly loose, or I'm not doing it right (more likely) - don't be surprised if something later than the actual date range shows up.

Items I thought about but didn't/couldn't/might implement later:

  • Picking a non-default Calendar folder. (Easiest, lowest-hanging fruit, if there's another revision, this may well be in it). So you can put all the specific appointments you want published in a different folder, then syndicate it.
    • Alternatively, work out how to tell "Personal" from "Important" from "Business", etc...
  • Some type of support for formatting and/or additional data in the RSS <description/> entry. More metadata is needed to describe an appointment, I feel. (mental note: I didn't try attribution of the RSS items, cos I assumed that RSS.Net would either dislike it or destroy it - need to check that assumption).
  • Utterly And Totally Enforced Date Range constraints. Another probably-will-do.

Download: OLCalendar.zip . Unzip into the BlogWave Adapters folder, restart Blogwave if it's running, and it should be good to go.

Comments
  • Hey... I was eager to try it, but it won't run at all. As soon as I click the Select (calendar to publish) button, it throws this error:

    File or assembly name Microsoft.Office.Interop.Outlook or one of its dependencies was not found.

    I tried putting another Microsoft.Office.Interop.Outlook.DLL in the Adapters folder, but it doesn't work with your DLL.

    Can you provide your complete compiled assembly?

    Cheers,
    Michael Reinhart
    http://blogs.officezealot.com/reinhart

  • Hmm - the complete compiled assembly is included. The Interop file isn't present in the output (or in my BlogWave Adapters folder when I run it).

    What I *think* this means is that you need to install the PIA (Primary Interop Assembly) or possibly ".Net Programmability Support" if using Office 2003, through Add/Remove Programs, Advanced Customization, Outlook.

    (Or words to that effect)

    For Office XP, there's a standalone download available of the PIA's.

    http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en

    See also:
    http://weblogs.asp.net/bowerm/archive/2004/07/26/197069.aspx

    I don't do a ton of Office programming, so might easily be wrong about some or all of that!

    Let me know how you go...

  • Yikes. Sometimes, when you use a thousand machines, you get a little confused-- or in my case, most times (and I don't need the machines). This one didn't have the .NET programmability installed...

    Cheers,
    Michael

  • It's just good that it worked, and that I'm not too far off!