Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-05-2011, 01:40 PM
macropod's Avatar
macropod macropod is offline Macro to paste unformatted text Windows 7 32bit Macro to paste unformatted text Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,526
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Andacar,

Without seeing your code, it's hard to say what you might be doing wrong. However, there is a simpler way: simply go to Word Options > Advanced > Cut, Copy & Paste and set the 'Pasting from other programs' parameter to 'Match destination formatting'.

For a macro solution, try:
Code:
Sub PasteUnformattedText()
' The next line is in case there's nothing in the Clipboard
On Error Resume Next
Selection.PasteSpecial DataType:=wdPasteText
End Sub
You might want to add this to a keyboard shortcut.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create macro to paste text after style? Srivas Word 0 03-16-2010 05:28 AM
Selected text and logo in one macro marijke Word VBA 0 08-24-2009 07:01 AM
Macro to paste unformatted text Textbox & Edit Paste text MikeWM Word VBA 1 08-20-2009 06:21 PM
Macro to paste unformatted text Strip lf/cr from text p3aul Word 9 08-18-2009 12:42 AM
Macro to paste unformatted text paste formated text from Word to only one Excel cell heron Word 1 12-06-2005 02:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft