Word – Code background from Visual Studio

microsoft wordmicrosoft-officemicrosoft-office-2016microsoft-word-2013microsoft-word-2016

I want to paste some code in my Word document from Visual Studio 2016, but the text has a white background. For readability I want to keep the formatting and the colors of the code.

When I try to remove the shading in the Borders and Shading dialog, it says there is no shading (!). How the remove the white background?

The Reveal Formatting says: SHADING Pattern: Clear (White)

Note: I inserted the code text as an object

enter image description here

Best Answer

  • Change the highlight colour (Ribbon: Home Tab / grouped under Font / Text Highlight Colour) from white to anything else or No Colour.

  • For more information, select part of the text and use Reveal Formatting (CTRL + ALT + SHIFT + S to show the styles pane \ click middle button Style Inspector \ click button Reveal Formatting).