Jump to content

how to put code field in ms word?

Fredrikmikael
Go to solution Solved by Fredrikmikael,

Thank you, i used both of ur's advice and i'm pleased with the result.

i copyed the code with right clicking on the selected code in notepad++ and pressing plug-in commands - > Copy text with syntax highlighting.

 

in word i pressed insert -> object - > opendocument text -> pasted code there - > saved & closed

how do you put a code field in word like demonstrated below?

<!DOCTYPE html><html><head><title>Cake</title></head><body bgcolor="pink"><h1>I FUCKING LOVE CAKE</h1><p> shut up </p></body></html>

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

It seems the best method is to click the "Insert" tab and then click"Object". Select "OpenDocument Text" from the list. This will create a document within a document. Paste the code in to the the embedded document and save.

 

I'm not sure if this would work 100% in your case, but you should give it a try.

Link to comment
Share on other sites

Link to post
Share on other sites

The best way ive found to do it is to copy code using the notepad++ plugin. It will copy along with formatting and syntax highlighting. Another option is to use LateX.

Link to comment
Share on other sites

Link to post
Share on other sites

Thank you, i used both of ur's advice and i'm pleased with the result.

i copyed the code with right clicking on the selected code in notepad++ and pressing plug-in commands - > Copy text with syntax highlighting.

 

in word i pressed insert -> object - > opendocument text -> pasted code there - > saved & closed

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×