MS Word custom style displays white separator lines

1

I am trying to setup a custom style within MS Word 2013 that would display code snippets. So far everything is alright, except there are white separator lines on every 2nd line. I have searched quite a bit, but I cannot find the option that would disable them.

Here is a screenshot of those white lines:

pic

and here is a screenshot of enabled formatting options (shift+f1) for the selection:

pic

Is there a better way of displaying code snippets within MS Word without using styles?

--edit--

The reason why I am using MS Word for snippets:

I am learning programming and for each topic I try to write a small summary that also includes code snippets. I would gladly switch to another tool, but this far I havent found one that has the same capabilites of formatting text as Word and also I really need the table of contents for quick navigation, so I can jump from one topic to another. Which tools would you recommend?

metabuddy

Posted 2014-02-25T15:53:09.527

Reputation: 111

You may wish to edit your question to indicate why you are trying to use Word to view code. Understanding your reasons for using Word to view code would make it easier to answer the question in a way that's useful to you. (Without offense, using Word to view code has the feeling of attempting to drive a screw with a hammer. You can do it, but there are better tools.) – Jonathan Garber – 2014-02-25T16:48:28.657

@JonathanGarber I am learning programming and for each topic I try to write a small summary that also includes code snippets. I would gladly switch to another tool, but this far I havent found one that has the same capabilites of formatting text as Word and also I really need the table of contents for quick navigation, so I can jump from one topic to another. Which tools would you recommend? I just installed notepad++, but I think it doesnt support table of contents feature – metabuddy – 2014-02-25T16:55:18.343

That's actually an excellent reason, one I hadn't considered. Please put that explanation into your question. (Click the little "edit" button right below the tags and write it in.) I don't know of any tools that would support what you're looking for, but with that new information I'm sure someone out there could tell you. – Jonathan Garber – 2014-02-25T17:00:45.520

Do the paragraphs look OK in editing view, but appear in print preview or perhaps when you print/pdf? That's what happens here. The problem goes away if I save the document in .doc or (2010) .docx compatibility mode. I could only do the latter here by saving as .doc first, then checking the appropriate box when saving as .docx. Word 2013's layout engine has changed, and most of the old per-document compatibility settings (bottom of File->Options->Advanced) are no longer available when saving in Word 2013 "native" mode. There could be formatting settings that fix it, but I haven't looked. – None – 2014-02-27T08:45:01.733

Answers

1

Judging from the screenshot, it looks like the text is contained in a table. If so, select the table, go to "Borders and Shading" (right-click or go to the "Design" tab) and select "None".

Karen927

Posted 2014-02-25T15:53:09.527

Reputation: 654