Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

For example,

when I copy a code snippet from someone's answer on StackOverflow and then paste it into Excel or Notepad there are all these extra spaces at the end of each line.

Is there anyway to stop this happening? Or a quick way to remove this annoying spaces - I need them gone otherwise the VBScript compiler complains.

share|improve this question

migrated from Sep 16 '11 at 10:20

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

Get rid of Notepad, download and install Notepad++. It has a bundled plug-in called TextFX that among dozens of other useful things can trim trailing blanks. See this tutorial for even more cool stuff Notepad++ can do.

share|improve this answer

If you use Firefox and really want to stick to notepad (I guess you'll use IE then) you can try a copy text plugin like this one or similar (I haven't tried it)

share|improve this answer

You must log in to answer this question.