Author Archives: Lessan Vaezi

How to clear the Clipboard when exiting Microsoft Word

This week a colleague approached me to consult about a problem he had encountered, where it was necessary to ensure that the Clipboard was empty when Microsoft Word exits. It was part of a legacy Word automation solution that he wasn’t in a position to change just yet, and it would crash if there was […]

Posted in Technology | Tagged , , , | 1 Response

Get email Headers from an Outlook MailItem

While working on a VSTO add-in for Microsoft Outlook, I came across the need to access the headers of an email, to parse out X-CustomProperty tags that were put in by an application that sent the emails. However, I couldn’t find a Headers property in the Outlook object model, so below is an attempt to […]

Posted in Technology | Tagged , , , , , , | 4 Responses

How to filter select list options

Here’s a jQuery extension method to filter the elements of a select list (option tags). It binds to a textbox, and as you type in the textbox the select list gets filtered to match what you are typing. Parameters: textbox This could be a jQuery selector, a jQuery object, or a DOM object. selectSingleMatch This […]

Posted in Technology | Tagged | 55 Responses

Using Open XML SDK to get Custom Properties from a Word document

I stumbled across a library that I didn’t realize was out there, for working with Microsoft Office documents. It only works with the newer Office 2007 and 2010 files (and 2003 with a compatibility pack), i.e. those using the Open XML standard. Download and install the Open XML SDK 2.0 for Microsoft Office: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124. I […]

Posted in Technology | Tagged , , | Leave a comment

How to hide the dotted border outline on focused elements in HTML, using CSS

While working on a web application for data entry, I had to scour the net for a way to hide the dotted border that appears when an element is focused on a web page. Here are my findings. First, the obligatory disclaimer – I do understand that the dotted border is for accessibility purposes and […]

Posted in Technology | Tagged , , , | 4 Responses

Context is Hindi when printing line numbers in Word 2007

[This post accompanies a question posted here: http://superuser.com/questions/90665/context-is-hindi-when-printing-line-numbers-in-word-2007] I’m trying to print a Word 2007 document with Line Numbering turned on, and in Word the document looks fine but when I print the document, the line numbers appear in Hindi script. On screen: Printed: I tried deleting my Normal template and allowing Word to create […]

Posted in Technology | Tagged , , | 2 Responses

Registry settings to add Uninstall as a shell option for VSTO manifest files

I have been working on some VSTO add-ins and on deploying them, and have something to share that I didn’t find anywhere else. First of all, let me just say that despite certain hurdles, deploying using ClickOnce has been a very pleasant experience. After following some tutorials on making an MSI, we eventually ended up […]

Posted in Technology | Tagged , , , , | 6 Responses

Recursive Active Directory group membership using System.DirectoryServices in .NET 3.5

When coding for an organization that uses Active Directory, you will eventually come across the business case for using groups within groups, i.e. a  user is part of say, the HR-Administration group, and that group is itself a member of the HR-Department group. You may then need to secure your application to only allow members […]

Posted in Technology | Comments closed

Now using Windows 7 Release Candidate

I recently installed Windows 7 – which is currently being developed and will be released in the next few months – on my home computer. I had heard good things about it, and was keen to test out this latest preview version. It replaced my 6-month old XP installation. Here are some screenshots of things […]

Posted in Technology | Tagged , | Leave a comment

Prezi for stunning presentations

Some days ago I was introduced to this website: prezi.com, for creating presentations online. The editor uses Flash and is entirely online, and you can upload pictures, videos and other flash animations to it. Anyway, I had signed up for their closed beta and earlier today I received a login. The timing was quite fortuitous […]

Posted in Technology | Tagged , , , , , | 2 Responses