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
add comment

2 Answers

up vote 1 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
add comment

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
add comment

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.