Copying from Visual Studio 2015 code with line numbers and highlighting

I am composing a programming guide for users, so I need to copy some code fragments from MS Visual Studio 2015 to MS Office 2016. I tried different ways (even using Notepad ++). They did not give me a satisfactory result. I want the embedded text to be the same as in Visual Studio, including line numbering. I would like to export the code from VS to rtf, for example, and paste it into a Word file. I did the same using Copy as HTML extension for Visual Studio 2013. Do you have any solutions or ideas?

UPD: I do not want to use screenshots. I want some .docx text to be successfully converted to PDF.

+4
source share

Source: https://habr.com/ru/post/1629004/


All Articles