To do this, right click on the object and select “Format Object”. Once done, you just need to save the document and it will update the code within your document.Īs a last and optional step, you might want to fix the layout of the object to wrap with the text. If you want, you can double click on the object and edit the code again. Your original document will look as below. From the “Create New” tab of the dialog box, select the “OpenDocument Text” option and click “OK”.Ī new word document will open. Select the “INSERT” tab on the ribbon and click on the “Insert Object” icon. Place your cursor at the point where you want to place your code. Here’s the word document that I want to paste my formatted code. I want to paste this code block into a word document. Here’s some sample C# code written in Visual Studio 2012. However, there is a simple way to achieve this which works for me always. Well there are a lot of ways you could use to achieve the desired output. How often were you required to paste some sort of source code into a word document and realized that how difficult it is to keep the correct formatting and indentation?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |