Hello,
Word Mac X (10.4.2)... I use paste special unformatted constantly
making my school study notes from websites / other documents
frequently. I came across this thread because I was looking to do what
Matt and Tony have done (record a macro to make this a keyboard
shortcut). I've tried using Matt's and Tony's macros and recording my
own, but it's not working for me - the macro for paste special
unformatted always pastes with the source format. However if I go to
the edit menu and select paste special and then select unformatted
text, that works. But recording exactly that does not work - it pastes
formatted as in the source.
I would really appreciate any help getting this to work - it's
frustrating that I thought I found the answer here, but I can't make it
work for me
Thank you!
Lydia
'John McGhie [MVP - Word and Word Macintosh Wrote:
']Hi Tony:
That's exactly what I use (I normally use the INSERT key to paste as
Formatted, and Command + V to paste as unformatted).
Copy Robert's macro, put it in your Normal template, and name it
EditPaste.
Most Word "commands" are actually macros. If you have a macro of the
same
name, its functionality replaces the command.
I actually use two macros:
Sub EditPaste()
On Error GoTo notAvailable
Selection.PasteSpecial Link:=False, DataType:=20
End
notAvailable:
Selection.Paste
End Sub
Sub EditPasteFormatted()
Selection.Paste
End Sub
The first macro uses a very crude "On Error" method of trapping the
condition where "plain text" is not one of the formats available on
the
clipboard. It's crude, but it works: and saves you having to
successively
try each option to find out what the hell *is* on the clipboard.
VBA does not have a way to examine the clipboard to see what actually
is
there. There is usually a selection of formats (can be five or six,
depending on the application you copied from). This can be a little
character building, because the "data" is not actually ON the clipboard
of
the source application is still open. There's just a pointer to it,
and the
source application then produces the data to the clipboard in the
format you
request when you ask for it.
Cheers
--
Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.
John McGhie <
[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410