![]() ![]() Click on the “Layout” tab and select the wrapping style as “In line with text”. 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. Found a workaround: Copy/paste in smaller chunks. In my case, the style formatting broke away after about 10600 bytes of raw text (measured by saving the copied text to a text file without formatting). Your original document will look as below. Seems to depend on the number of characters in the text to copy/paste. 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. |