Windows: Internet Explorer fails to print with preview.js errors.
Symptoms: Attempting to print from Internet Explorer returns the error:
An error has occurred in the script on this page.
Line: 1507 (or whatever)
…
URL: res://ieframe.dll/preview.js
See attached screen shot:
Other symptoms include, missing menu items, or menu items that don’t do anything when selected.
Cause: Some other application wrote to the wrong location or un-registered .dll’s that it wasn’t supposed to during install or uninstall. Which application? Who knows.
Fix: As described in the references below, you’ll have to re-register the IE libraries and components. But first:
- Ensure that your printer actually works. Print a test page from Notepad, or Word or whatever. Printer not working? The rest of these steps won’t help you. Fix your printer.
- Reset IE to ensure that other add-ons aren’t causing you grief.
- Start Internet Explorer
- Press the ALT key to bring up the menu.
- From the menu select: Tools -> Internet Options (this is reachable from the Windows control panel as well)
- Tab: Advanced
- Press the button: Reset…
- Press the button: Reset
- Restart IE
- Attempt to print from IE. Does printing work now? If yes, you’re done. If not, continue.
- Re-register your IE libraries. In the references below, you can do it the Microsoft way and make your own script or use the ready made script from iefaq. I used the ready made script after reviewing it.
- From iefaq listed in the references section, download the script that matches your machine type. I’m running Windows 7 32-bit so I downloaded ie8-rereg.zip.
- Start the Windows File Explorer. Start -> All Programs -> Accessories -> Windows Explorer
- Find the file that you downloaded. Computer -> Your disk (C:) -> Temp (or wherever you downloaded the files to.)
- Right click on the .zip file you downloaded and select Extract…
- Extract the files somewhere reasonable. Example: c:\temp\ie_fix\
- Find the extracted files. Navigate down the directories until you find the .cmd file. In my case the file I wanted was ie-rereg.cmd
- (Optional) Open the .cmd file in Notepad to see what it’s going to do. We’re all curious right?
- Right click on the .cmd file and select: Run as administrator. (No, Run as administrator? Select Open instead… and consider updating your OS one day.)
- The command file will run for a moment and then report an error at the end. Something about failing to update the registry. Doesn’t matter, that’s a Windows XP fix that is only necessary if you’re running XP.
- Reboot your computer.
- Start IE and attempt to print. Fixed? Worked for me.
References:
- http://support.microsoft.com/gp/pc_ie_advtroubleshooting1000
- http://iefaq.info/index.php?action=artikel&cat=42&id=133&artlang=en
Categories: System Admin, Windows

Thank you sir!