Link to home
Start Free TrialLog in
Avatar of Darren Collins
Darren CollinsFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Create Word 2007 button to paste Unformatted Text

Hi,

I often want to paste text from web pages and other sources into my Word 2007 documents.

When I do this, I have to click Paste / Paste Special / Unformatted Text.

I would like to be able to create a button on my Quick Access Toolbar that when I click, it just does a 'Paste Unformatted Text' in a single operation without me having to click anything else.  

I cannot see an easy way to do this because the 'Unformatted Text' or 'Paste Unformatted Text' option does not appear under 'All Commands' on the Customize menu of the Quick Access Toolbar: the closest I can get is 'Paste Special' which still needs an additional click to get 'Unformatted text'.

I know that I can copy and paste formats using Ctrl+Shift+C and V, but again that is a two stage process.

What do you think is the best way to achieve this?

Many thanks,
Daz.
Avatar of gonzaria
gonzaria

Probably the easiest way would be to create a macro, and then add a button for the macro onto your toolbar :-)
Avatar of Darren Collins

ASKER

Thanks.  What method should be used?
ASKER CERTIFIED SOLUTION
Avatar of gonzaria
gonzaria

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So the toolbar should be there just lurking either above the office button or below the ribbon (my bad, i thought it had to be turned on somewhere).

Right click your quick access toolbar, select customise. From the choose commands drop down box, select macros...you should see the name of yours there. Select it, add it, click ok. Your toolbar will now have a button for the macro. So, all things going well,  you'll be able to copy text from wherever, and click on your new button to paste it :-)
Hi gonzaria,

Have you tried this solution?

I tried your advice, and the macro came up with this method:

Selection.PasteAndFormat (wdPasteDefault)

... but when running the macro it does not work - it just acts like a normal paste.


So I used the VBA editor and spotted another possible parameter.  The following does actually seem to work:

Selection.PasteAndFormat (wdFormatPlainText)

Daz.
Hi gonzaria,

Is there any way I can award you some of the points?  Although the idea you suggested did not work, it did put me on the right path, so I think you deserve some points.  

When I accept my answer, the system won't let me give you some of the points - sort of all or nothing.

Daz.
Ah heck, have them all!
Well spotted - in my test copy and paste i din't grab anything with hyperlinks (its nearly midnight where I am - losing the plot - sorry!)

Selection.PasteAndFormat (wdFormatPlainText) actually does work nicely. And you can still turn the macro into a quick button.

Just a quick comment to anyone finding this question useful.

I now use "PureText" - this is a simple tool that enables you to past the text from the clipboard into any application as pure or unformatted text.  I swear by it now, especially for copying text from web pages into emails as unformatted text.  the default key combination is WinKey + V

Here is the tool:  http://www.stevemiller.net/puretext/