I thought I had found the promised land. Then I tried adding more than one item to a blank Word document using C# and I realised it had been a mirage all along. I simply wanted to create a blank document, add a line of text, followed by another, followed by my table. I was flummoxed by the Word.Range object – and I’ll go into detail in a bit – but here’s the solution: More
Category Archives: Development
Add a table using Word Interop and ConvertToTable
The .NET Framework allows us to do many things with relative ease but the main cost is often the time taken in finding a decent example to learn from. I experienced pain when I wanted to create a Word document programmatically and add a simple table to it. But I got there in the end, and this is how I did it. More
IE6 Compatibility VPC IETest Password Is P2ssw0rd
I just downloaded and installed the very useful IE6 Compatibility Virtual PC [IE6-on-XP-SP3.exe] from Microsoft. Within minutes of starting the machine and getting distracted, the screensaver kicked in, locking the machine until I entered the relevant password for the IETest user. The password is P2ssw0rd. More
URL Editor
On a few occasions recently I’ve had to deal with long URLs, or more accurately, URLs with long querystrings. Each time it was a chore: strings that are a few hundred characters in length are unwieldy, hard to read and tricky to edit. So I decided to make my life easier and build a tool. More
Path and Filename to Clipboard
Many moons ago I wrote a little helper application for Windows that would allow you to right-click a file in Explorer and get its full path, including filename, into the clipboard. Owing to underwhelming demand I have resurrected it. More
HTML images using long GET strings
The Problem
You’ve got a piece of code that creates an image in your web page by passing a bunch of parameters in a GET string to some server-side process:
$('tile').src = 'http://img.com/generate.php?a=1&b=2&c=3';
But what do you do when the URL goes beyond the limit? Practically, for cross-browser solutions, the limit is around 2000 characters (thanks to IE), and I recently had to find a workaround when generating images via a WMS. More
Bookmarklets
Not a day goes by without the need at some point to look up a location on Google Maps (UK). Despite the obvious benefits of the quick search bars in All Modern Browsers, I’ve not really taken to them. In theory they’re a great feature, but I find that they make me think too much. More