Warning: Declaration of ThemeSwitcherWidget::update($new_instance) should be compatible with WP_Widget::update($new_instance, $old_instance) in /home/kingston/hitormiss/wp-content/plugins/theme-switcher/theme-switcher.php on line 0
Make “Paste Unformatted Text” the default in Microsoft Word

Hit or Miss

Make “Paste Unformatted Text” the default in Microsoft Word

Make “Paste Unformatted Text” the default in Microsoft Word: This has been bugging the shit of me for years and I finally thought of Googling it today.

7 responses so far (Respond)

Gravatar

Thank you for this great tip!

David July | 15 Nov 2004
Gravatar

The only problem I’ve found with this is that it prevents you from being able to paste graphics with Ctrl-V (but still works when you hit the paste button or select paste from the menu).

Matt | 15 Nov 2004
Gravatar

Yeah, I discovered the same thing. But since I paste text more than I ever paste pictures, it works perfectly for me.

David July | 29 Nov 2004
Gravatar

This should solve the bitmap issue:

Const CF_TEXT = &H1
Private Declare Function IsClipboardFormatAvailable _
Lib “user32” (ByVal uFormat As Long) As Long
Sub PasteUnformattedText()
If IsClipboardFormatAvailable(CF_TEXT) Then
Selection.PasteSpecial Datatype:=wdPasteText
Else
Selection.Paste
End If
End Sub

Darko | 29 Nov 2004
Gravatar

The bitmap check of the clipboard does not work. There is probably other code that has not been included.

Can Darko please provide an update to allow the modified macro to work. The idea is good but I can’t make it run.

David | 14 Mar 2006
Gravatar

The bitmap check of the clipboard does work if in the General Declarations the following is inserted:

Const CF_TEXT = &H1
Private Declare Function IsClipboardFormatAvailable _
Lib “user32” (ByVal uFormat As Long) As Long

And then a macro is made titled PasteUnformattedText and containing:

Sub PasteUnformattedText()
If IsClipboardFormatAvailable(CF_TEXT) Then
Selection.PasteSpecial Datatype:=wdPasteText
Else
Selection.Paste
End If
End Sub

the trick is to split it into the relevant visual basic sections. Works just fine. I assigned mine to a keyboard command Alt-V and pasting text only is now a breeze.

David | 19 Jun 2006
Gravatar

Thanks. This has been bugging me for years too! I never thought of using a macro…

Another David | 28 Apr 2009