|
I am sorry to keep asking
similar questions but here is my new problem.
|
Q:
I tried to copy code written in notepad to Word but it
adds formating to it without asking to remove it. It
would be nice if I could choose to encode as plain text
in word. The best font option I can find so far is
Courier New. (Accepting
answers - asked 9 months ago)
|
|
A: Try
inserting the code as a file.
This solution is for Word 2003 (latest I
have available), but it should carry forward
to the version you are using. I'm not sure
what language you are writing in, but I'll
assume it's C++ for this example. First,
save your file to your computer with the
extension appropriate for your language.
Let's say you have something called
"hello.cpp"
Place the cursor in Word at the point where
you want to copy your code. From the menu
bar, open Insert. Select File, and select
the file "hello.cpp" from the location you
saved it to. It should come up looking like
this:

In my example, I used a single tab to
indent. Word preserved the formatting as
closely as it could. My default font in this
case is TNR 12, and Word does not change it
before or after the insertion.
|
|
|