Instructions for inserting code in Word
To insert code in Word, you cannot use copy and paste as with normal text or documents, but need to use the Paste Special option or insert as an object. We will need to paste the code block inserted in Word as HTML or insert an Object to display the correct code format in Word. The article below will guide you to insert code in Word.
How to insert code blocks in Word using Paste Special
Step 1:
You open a Word document and want to insert a block of code into the interface. Next, copy the block of code you want to use as usual.
Step 2:
Return to the Word document, click on the Home tab and then look down below, in the Paste tool, select Paste Special .
Step 3:
Displaying the content paste option, click on HTML format and then click OK to paste the code into the Word document.
Immediately after that you will see the code inserted in Word as shown below.
How to insert code in Word via the Insert tab
Step 1:
On the Word interface, click the Insert tab to insert the object. Then, look down at the Text group and select Object and then click Object in the drop-down list.
Step 2:
Displays the interface for selecting the type of object you want to insert into Word. Click on the Create New tab then look down below and click on OpenDocument Text and OK.
Step 3:
Now a Word document is opened and you also click on the Home tab and then Paste and select Paste Special . Next we select the HTML format and click OK to paste the code . Then you close this newly opened Word document without saving it .
Go back to the Word document and insert the code and you will immediately see the code as shown below.
You should read it
- How to insert online and offline videos into Word
- How to create text wallpaper in Word
- How to insert sound into Word documents
- How to insert an Outlook contact in Word
- How to insert content annotations on Word
- How to insert emoji in Word, insert emoticons into Word
- How to insert code block in Google Docs
- How to insert a signature in Word
- Insert and edit Word Art in Word
- How to insert a Word document into an Excel file
- Insert images into text content
- Insert text into pictures with Word
Maybe you are interested
How to retrieve Facebook password, recover latest account
390,000 WordPress Accounts Stolen in Large-Scale Attack
How to Easily Move All Passwords from iPhone to Android
Latest Sword Master Story Code and How to Enter Code
Download standard and beautiful Word file experience initiative cover template
The simplest way to get back your Roblox account when you forget your password