Code/Tea/Etc...

Duncan Mackenzie has too much time on his hands

Removing Word's Formatting from text before pasting into .Text or other apps...

The age-old question of 'how do I avoid putting funky Office HTML into my blog postings' came up on an internal email list today, and one of the answers was a pointer to http://stevemiller.net/PureText/, which I had never heard of... but it looks cool!
"Have you ever copied some text from a web page, a word document, help, etc., and wanted to paste it as simple text into another application without getting all the formatting from the original source? PureText makes this simple. Just copy/cut whatever you want to the clipboard, click on the PureText tray icon, and then paste to any application. Better yet, you can configure a Hot-Key to convert and paste the text for you. The pasted text will be pure and free from all formatting."
(Listening To: Simple Lies [Endo / Daredevil])
Published Thursday, August 12, 2004 12:59 AM by Duncanma
Filed under:

Comments

 

dotnetjunky said:

What I usually do to remove formatting in these scenarios is to paste the text into Notepad first, and then copy and paste from Notepad into my target application. Although it takes a few seconds to open Notepad, but this is a rather simple and effective solution, isn't it ?
August 12, 2004 1:15 AM
 

Duncan Mackenzie said:

dotnetjunky, that is what I do (did) too... it is certainly simple, but it is just more steps... (copy text, click on Start Menu... find Notepad... paste the text, Select All, Copy the text... now go paste in your destination) and PureText replaces all of that with Copy then Windows Key + V to paste without formatting.
August 12, 2004 1:23 AM
 

Ron said:

I always keep a text editor (EditPadPro) open anyway. I just open up a new doc/tab (or use the default if I've not opened any up yet) and then Ctrl-V/A/C. Simple and my hands don't have to leave the keyboard. :)
August 12, 2004 9:10 AM
 

Nick Codignotto said:

Cool.

I wrote a Word macro that's useful when I'm writing Word documents or sending e-mail. The macro is simple:

Sub UnformattedPaste()
'
' UnformattedPaste Macro
' Macro recorded 4/7/2004 by Nick Codignotto
'
On Error GoTo RegularPaste

Selection.PasteAndFormat (wdFormatPlainText)
Exit Sub

RegularPaste:
Selection.Paste

End Sub

I map this to Shift+Ins, which is one of two ways to paste. Ctrl+V pastes as normal.

I'l have to check our PureText, though, as it will be useful in apps outside of Word.
August 12, 2004 10:38 AM
 

Dotnut said:

Office 2000 HTML Filter 2.0 : http://www.microsoft.com/downloads/details.aspx?FamilyID=209ADBEE-3FBD-482C-83B0-96FB79B74DED&displaylang=EN is a cool tool from MS to remove Office-specific markup tags embedded in Office 2000 documents saved as HTML.

One interesting feature is "You can copy any fragment of a Word document as HTML and paste it into an HTML or text editor as filtered HTML markup. For example, instead of typing complex HTML tags to create nested tables, create them by using the Draw Table tool in Word. Then select them and click Copy as HTML on the Edit menu to create a compact HTML copy of the tables."

On a unrelated note, I would like to have feedback on my article "Dynamically generate a MS Word document using HTML & CSS" - http://codeproject.com/vb/net/Wordyna.asp and ideas on how to embed images into a Word document (Word 2000 onwards) that is generated from HTML so that the pictures can be viewed even when user is disconnected from the internet.

Thanks
August 15, 2004 10:20 AM
 

rups said:

i usually copy the text/item and then Edit->Paste Special->Unformatted Text.
A very simple but effective solution.
August 18, 2004 4:51 AM
 

Duncan Mackenzie said:

rups... sure, if the app you are pasting into has a Paste Special command... .Text doesn't... and many other applications are missing this feature as well
August 18, 2004 9:42 AM
 

Michael Swanson's Blog said:

November 15, 2004 11:58 PM
 

Rob Caron's Blog said:

November 17, 2004 2:09 PM
 

Removing Word's Formatting from text before pasting into .Text or other apps... said:

November 27, 2007 12:56 PM
Anonymous comments are disabled

This Blog

Syndication

News

This blog has moved to my own VB site

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker