Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Make Paste Special Default to "Text"

Status
Not open for further replies.

ixodid

Technical User
Dec 5, 2008
30
US
In Word and Excel, I rarely have a need to Paste Special anything but text. Is there a way I can make Paste Special default to "text" to save me a step every time I do it?
 
Hi,

If you want to PasteSpecial - VALUES, macro record and associate with a keyboard shortcut.

If you need help customizing and generalizing your recorded macro, post your code and question in forum707.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thank you for your reply, Skip. What do you mean by "VALUES?" I know what a macro is, but what do you mean by "code?
 
I appreciate the help, but it appears I'm in a forum that's over my head. Could someone recommend a resource that is at a beginner's level?
 
Hi,

Stick with it!

Here is a chance to expand your knowledge!

I understand your point - in fact if you select Paste Special and hit Enter you get a normal Paste, instead of a default option in the Paste Special command.

Values is what you select in the Paste Special window to get what you call Text.

Use the code referred to by mintjulep, but call it "EditPasteSpecValues", and you should be home.

Good Luck!

Peter Moran
 
Thank you, Peter, for your encouragement to stick with it - that's how I prefer to do it.

Where and how do I use that code? I didn't even know one could use code with any Office application.
 
Anyone? I'd like to be able to do this, please.
 
A macro is VBA code.


To get you started:
Tools, Macro, Record New Macro
choose: Store in Personal Macro Workbook

Select a cell and type some text into it or format it.

Click the stop button

When you have created your first macro like that:

Tools, Macro,Macros choose your macro and select "Step into"

With windows sized appropriately you can see your macro code, press F8 to step through it one line at a time and view what is happening in the workbook.

Look up "create a macro" in help.


Gavin
 
Thank you, Gavona - I learned something.

Is there a way to make right-click > Paste paste unformatted text only?
 
For Word:

click "Tools->Macros->Record".
In the upcoming dialog (macro name etc.), click the keyboard button to assign the macro to a key combination, and assign it for example to "CTRL+Shift+V".
Click OK, then do something (no matter what).

Stop the recording, hit Alt+F11 to display the VBA-Editor.
You will find something like this:
Code:
Sub Macro1()
[green]'
' Macro1 Macro
' Macro recorded on 02.09.2008 by MakeItSo
'[/green]
...
whatever
...
End Sub

Replace the "whatever" part with this line:
Code:
Selection.PasteAndFormat wdFormatPlainText
So it looks like this:
Code:
Sub Macro1()
[green]'
' Macro1 Macro
' Macro recorded on 02.09.2008 by MakeItSo
'[/green]

Selection.PasteAndFormat wdFormatPlainText

End Sub

You have now assigned "paste as plain text" to the key combination you chose (CTRL+Shift+V or other)
;-)

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top