How to pin documents directly to the Windows 7 taskbar
First, locate your file -- mine is C:\Users\Server\Desktop\foo.txt. Next, right click on your desktop and New > Shortcut. In the target, specify the program you want to execute and its path in quotes -- "C:\Windows\System32\notepad.exe". Add a space, and input the location of your file (again enclosed in quotes). The full target looks like this:
Now, give your shortcut a name -- this text will appear when you hover over your pinned taskbar icon. Before pinning, you can also right-click and choose properties if you'd like to choose a different icon for your shortcut. Once you're all done, left-click and drag the shortcut to the taskbar. That's it!"C:\Windows\System32\notepad.exe" "C:\Users\Server\Desktop\foo.txt"
I've used notepad for this example and tested with Paint and Paint.NET, but this will work for other files and programs as well. As long as you know the path to your file and the program you want it to open in, you should have no problem pinning items to your taskbar.