|
|
|
date: Sun, 16 Mar 2008 16:32:07 -0400,
group: microsoft.public.word.vba.addins
back
Re: Simple macro for 'paste unformatted text' won't work
Hi Rod,
Try:
Sub PasteUnformattedText()
' The next line is in case there's nothing in the Clipboard
On Error Resume Next
Selection.PasteSpecial DataType:=wdPasteText
End Sub
Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------
"rodmac" wrote in message news:uYiAQT6hIHA.4196@TK2MSFTNGP04.phx.gbl...
> Can anyone here help me with this weirdness? Just downloaded Word2007, and
> do a ton of pasting as unformatted text. I really want this as a keyboard
> shortcut, which I have relied on for years.
>
> I can't find Paste Special: Unformatted Text on the All Commands list - it
> was there in Word 2000, my last version - and it isn't in the default
> macros.
>
> When I try to record a simple macro using the mouse, the resulting macro
> consistently pastes the source formatting, not unformatted text. If I just
> use the interface, the paste unformatted text works fine.
>
> The macro recorder won't record the sequence, and I get this:
>
> Sub PasteAsText()
> '
> ' PasteAsText Macro
> '
> '
> Selection.PasteAndFormat (wdPasteDefault)
> End Sub
>
> If I knew what paste unformatted was I would just edit the macro, but I
> haven't a clue about VBA or whatever this language is.
>
> Any help appreciated.
>
> Rod
>
date: Mon, 17 Mar 2008 11:23:47 +1100
author: macropod lid
Re: Simple macro for 'paste unformatted text' won't work
Thanks a lot, macropod! Your macro did the trick and I'm back in fast
one-key text-pasting business.
R
"macropod" <invalid@invalid.invalid> wrote in message
news:OJqgkU8hIHA.4196@TK2MSFTNGP04.phx.gbl...
> Hi Rod,
>
> Try:
>
> Sub PasteUnformattedText()
> ' The next line is in case there's nothing in the Clipboard
> On Error Resume Next
> Selection.PasteSpecial DataType:=wdPasteText
> End Sub
>
> Cheers
> --
> macropod
> [MVP - Microsoft Word]
> -------------------------
>
> "rodmac" wrote in message
> news:uYiAQT6hIHA.4196@TK2MSFTNGP04.phx.gbl...
>> Can anyone here help me with this weirdness? Just downloaded Word2007,
>> and do a ton of pasting as unformatted text. I really want this as a
>> keyboard shortcut, which I have relied on for years.
>>
>> I can't find Paste Special: Unformatted Text on the All Commands list -
>> it was there in Word 2000, my last version - and it isn't in the default
>> macros.
>>
>> When I try to record a simple macro using the mouse, the resulting macro
>> consistently pastes the source formatting, not unformatted text. If I
>> just use the interface, the paste unformatted text works fine.
>>
>> The macro recorder won't record the sequence, and I get this:
>>
>> Sub PasteAsText()
>> '
>> ' PasteAsText Macro
>> '
>> '
>> Selection.PasteAndFormat (wdPasteDefault)
>> End Sub
>>
>> If I knew what paste unformatted was I would just edit the macro, but I
>> haven't a clue about VBA or whatever this language is.
>>
>> Any help appreciated.
>>
>> Rod
date: Mon, 17 Mar 2008 00:15:05 -0400
author: rodmac
|
|