[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 601
  • Last Modified:

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.
0
Daz_1234
Asked:
Daz_1234
  • 5
  • 4
1 Solution
 
gonzariaCommented:
Probably the easiest way would be to create a macro, and then add a button for the macro onto your toolbar :-)
0
 
Daz_1234Author Commented:
Thanks.  What method should be used?
0
 
gonzariaCommented:
In the developer tab, there is a record macros option.

Create a new macro, name it something, and then it will start "recording"

Go back  to the main tab, perform the "paste special" procedure you described above, then go back to the developers tab and click stop.

There's a thing called the quick access toolbar, you can then customise it by adding a button for your macro (i'll just go back and check on how to get that toolbar up and follow with the rest of the instructions...)
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
gonzariaCommented:
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 :-)
0
 
Daz_1234Author Commented:
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.
0
 
Daz_1234Author Commented:
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.
0
 
Daz_1234Author Commented:
Ah heck, have them all!
0
 
gonzariaCommented:
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.

0
 
Daz_1234Author Commented:
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/
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now