Viewing Word Docs Directly in Your Browser (in Windows)
Someone on our QA team likes to post screenshots into our Bugzilla as MSWord docs. I find it rather obnoxious to have to open a new application just to view an image when the browser could easily handle a jpeg or png itself. Sure, it is convenient to Print-Screen-Paste into Word when you have no other option but it seems like if you are doing QA and taking screenshots on a regular basis, you’d save yourself some time in the long run to go ahead and install a decent screen capture utility.
Anyway, I did a little searching to see if I could find a way to extract the images from the doc file and view that in the browser. I found a suggestion on how to convert the file into a viewable format using wvWare and then open that in Firefox, on Ubuntu. Unfortunately, I’m kinda stuck on Windows at work so I’ve had to adapt the process. It turned out to be surprisingly easy.
First, you need to download and install wvWare for Windows.
Then you create a batch file similar to this:
echo off
set tmp="C:\Documents and Settings\user\Local Settings\Temp"
set dir="c:\program files\gnuwin32" %dir%\bin\wvWare -x %dir%\share\wv\wvHtml.xml %1 -d %tmp% > %1%.html
"C:\Program Files\Mozilla Firefox\firefox.exe" %1%.html
Make sure you adjust the second line to match the user name on your system. I set this up for Firefox but I imagine you could adjust it for other browsers as well.
Now, when Firefox attempts to open a Word doc, tell it to open it with your batch file instead of Word.
Leave a comment