Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

It seems the SSMS of Sql server 2012 cannot print the SQL statements with syntax color anymore. Is it a bug? Does it have any workaround?

share|improve this question
    
"Print" as in physically print to an ink printer? –  Thomas Stringer Jan 2 '13 at 18:22
    
Print to a color printer. Laser or inkjet. –  u23432534 Jan 2 '13 at 18:35
    
I've noticed this too, and while it's a minor annoyance it's not really a dealbreaker. @mrdenny has a good workaround. –  swasheck Jan 2 '13 at 19:31

2 Answers 2

up vote 2 down vote accepted

Honestly I've never tried printing from SSMS before. For a workaround I'd copy and paste the code into Microsoft Word (or some other editor which supports rich data, aka text with color) and print from there.

Are you really printing code that often that the color matters?

share|improve this answer
    
Yes, I used this trick on VS 2010 (well SSMS 2012 is actually VS 2010) until there is an extension available for C# color printing. I print code from time to time - when I need to analysis/read some complex code. Is there a way to create an "external tool" so there is no need to manually open Word every time? –  u23432534 Jan 2 '13 at 20:22
    
Yeah, click on Tools > External Tools and point to "C:\Program Files\Microsoft Office\Office15\WINWORD.EXE" (you might need to change the 15 to 14 or 13 depending on the version of Office that you have installed, I've got 2013). –  mrdenny Jan 5 '13 at 1:57

The color printing extension for Visual Studio 2010 works just fine for adding the color print ability to SSMS 2012. Download the VSIX package, and unzip into it's own directory in your to your SSMS extensions folder (C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Extensions most likely). You'll then want to modify the extension.vsixmanifest file -- in the <SupportedProducts> section add

      <IsolatedShell Version="1.0">ssms</IsolatedShell>

After that, restart SSMS, and you'll have the ability to print in color, even if it doesn't look like it.

share|improve this answer
    
This doesn't seem to work for me. It will successfully print in color files from a "normal" instance of VS 2010, but when used as SSMS, I still get regular B&W printing. Any suggestions? –  Conrad Jul 14 at 18:03
    
I'd suggest verifying the change to extension.vsixmanifest. In addition, make sure that you unzipped the extension into its own directory within Extensions, not into the Extensions directory directly. –  Chris Charabaruk Jul 15 at 18:52
    
I downloaded ColorPrinting.vsix and double-clicked it, and it seems to have installed correctly. The file extension.vsixmanifest exists in C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Extensions\Application\\ and the <IsolatedShell... code was already in the file after install. –  Conrad Jul 16 at 13:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.