Copy Text From Error Message Dialog Box

January 17th, 2009

As the Windows Guru, I spend a lot of time in forums answering Windows and Windows Scripting related questions. Quite frequently I respond to users who are receiving some form of an error message–and in almost every case, the error message is incomplete or incorrectly worded. For obvious reasons this makes diagnosis difficult, but it’s also completely avoidable. Today I’m going to show you two quick tips for little known Windows keyboard shortcuts that will ensure that you never have to retype the contents of an error message again!

Copy the text from a message box:

Let’s get quick and dirty. When posting a question in a forum or email, all you are really concerned with is the text contents of a message box. This can easily be retrieved in most cases by using the Windows clipboard.

Copy the text from a Windows Error Message Dialog Box

Most system error messages (and many programs) are displayed using the message box function provided by the Windows API. This is even true of the Windows Script Host. With the release of Windows XP, Microsoft added a few enhancements with support in mind. One of which is the ability to copy the text from a message box into the Windows clipboard using the standard Ctrl + C hotkey combination.

While the message box is in focus, press the Ctrl + C hotkey combination to copy the message box text to the clipboard. Then use the Ctrl + V hotkey combination to paste the contents into Notepad, a text area on a web page, or into any other text. The result will include the message box title, contents, and buttons as you see below.

---------------------------
Windows Script Host
---------------------------
Script:	C:\Documents and Settings\Nilpo\Desktop\test.vbs
Line:	1
Char:	26
Error:	Unterminated string constant
Code:	800A0409
Source: 	Microsoft VBScript compilation error
 
---------------------------
OK   
---------------------------

Copy the message box as a screenshot:

In one of the rare events that you run into an error dialog that doesn’t use the message box function, you’ll need another method of copying its contents. Since most forums allow image posting, a screen shot becomes the next best option.

With Windows XP, Microsoft again gave us a quick method of capturing screen shots to the Windows clipboard. With any window in focus, simply press the Alt + Print Screen hotkey combination to capture a shot of the active window to the clipboard. Now enter mspaint in the Run… dialog box to open MS Paint and press Ctrl + V to paste the contents from the clipboard. Save the image as a .jpg and you’re all set.

You can see the result of this procedure in the sample image I posted above.

So there you have it. Two quick, easy ways to copy or capture the text of a Windows Error Message box without having to retype anything.

[donotprint] [/donotprint] Please use the trackback link when linking to this post.

Related Posts:

Add to Technorati Favorites

9 Responses to “Copy Text From Error Message Dialog Box”

  1. Jim Says:

    Thanks. Needed this info today. Excellent post.

  2. Nilpo Says:

    Glad I could help.

  3. Omaer Says:

    This doesn’t work in Windows 7 (I used it in XP). Any suggestions?

  4. Nate (omrsafetyo) Says:

    Hey Nilpo, this is a great tip! I wanted to try and create a message just to see it work with my own eyes. I can see this being very useful in the future.

  5. ManaaP Says:

    It does not work on Win 2008 server.
    Can you give me solution for it?

    Thanx,

    ManaaP

  6. Vlad Says:

    Thanks! You made my support day so much easier.

  7. Peter Krohn Says:

    Finally, but why don’t Microsoft make this information more public? Why not include or embed this tip in the dialogue (Australian spelling) boxes themselves?

    Re option two, I beg to differ with you, I know your comments are well intentioned but “…simply press the Alt + Print Screen hotkey combination to capture a shot of the active window to the clipboard. Now enter mspaint in the Run… dialog box to open MS Paint and press Ctrl + V to paste the contents from the clipboard. Save the image as a .jpg and you’re all set…” does NOT qualify as simple in my view. It’s not good enough in 2012 that we are still forced to go to such arcane steps to achieve such a simple outcome.

    Microsoft should get off their asses and make the first method of copying dialogue error messages consistent across the board.

  8. Bob Quinn Says:

    I copied a Quicken error box image into wordpad and ms word but am unable to paste the image back into the quicken error box that asks for comments. I am using Windows 7. Thanks for your help.

    Bob

  9. Jim Says:

    Microsoft Wordpad supports RTF (Rich Text Formatting). Quicken’s comment box may not accept this. Have you tried using Notepad and copying that to paste in Quicken? It may work to paste directly into Quicken’s comment section as well.

Leave a Reply

.htaccess Apache article articles by Nilpo ASP ASP Free automation clipboard copy desktop Dev Shed docx Internet Explorer message box Microsoft PHP registry remove script scripting text tutorial tweak tweets Twitter UAC updates User Account Control VBS VBScript vista volume Windows Windows 7 Windows Guru Windows Script Windows Script Host Windows Scripting Windows Vista Windows XP Word WScript wscript.exe WSH XP