How to easily insert code snippet into Word preserving format, syntax highlighting & line numbers

preview_player
Показать описание
This is the step by step method to insert code snippet in Microsoft Word preserving formatting, syntax highlighting and line numbers. Entire process is divided into two steps. First step is to copy code snippet with syntax highlighting and second step is to insert it into Ms Word preserving formatting, syntax highlighting and line numbers.

Step-1: Copying code snippet with formatting and syntax highlighting
a) Direct copy from Visual Studio or Eclipse
b) Copying from Notepad++

Step-2: Pasting code while preserving formatting and syntax highlighting
a) Direct pasting and removing spelling errors for code
b) Using Insert Object ► Document Text and pasting code (Preferred)
Рекомендации по теме
Комментарии
Автор

as always only an Indian guy can help you with the software :) tnx so much

farianderson
Автор

Thank you for sharing this feature. Very helpful while preparing coding standard documents.

avinaashgudidevini
Автор

I was struggling since two days. Thanks

IBPhysicsWithRao
Автор

oh, very cool trick. I use Notepad++ and it worked great !! in My MS Word "keep formatting" is disabled and was looking for a solution / work around. The option you mentioned using Notepad++ it works great !

ctsamrmr
Автор

Hey just wanted to say I really like the kind of videos you make. Keep up the good work.

rehanhossain
Автор

VS Code tip was on point, I went with the 'Quite light' theme for good looks

steveb
Автор

You are a game changer, thank u so much <3

adeemmmm
Автор

Useful video, thank you. Unfortunately if I insert code as OpenDocument text, if code is long, it doesn't wrap to second page in document, it behaves as picture.

begamot
Автор

I am using the preferred way, but the code which is too long to the second page inside the open document text will be cut.

kenchen
Автор

Simple and efective solutions! Congratulations on it!

roberto_csantos
Автор

i love you from the bottom of my heart

assido_hd
Автор

my word does not show opendocument text in object. i am using MacBook is there any way to find it.

_ifly
Автор

how do you copy from notepad++ without extra webpage to word and keep the code line number?>?

BurbenogExpert
Автор

Please advise how to include code snippets that are longer than one page.

dev-skills
Автор

thank you very much. pretty good video

anhhoangvan
Автор

Can u pls tell how to remove background black colour of code snippet in word

userid.
Автор

but it does support page breaks I have longer codes

lameckotieno
Автор

In my msoffice 2010 the countings are going somewhere and codes are going somewhere can anyone help me to paste code as it is

farzee-lkvw
Автор

how to get line number from vs code directly?

nurhazbiyshaffan
Автор

when i paste in the code, there are less colors in the code and also the alignment of the pasted code gets messed up.

lucutes