Anyway to make a paste special unformatted text single key stroke?

D

Daiya Mitchell

Matt, we'd settle for PasteUnformattedText as a pre-defined action in Tools
| Customize, that one could then assign any shortcut to. It's having to make
the macro that is most annoying--one shouldn't have to know VBA exists to
access this "feature" easily.
 
C

Clive Huggan

Great idea, Daiya! That would make it so much more accessible, which would
make most people who need it happy, albeit not Tony.

Clive
=====
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Tony:

Why does not Microsoft sets a web page poll to check out what customers
really want? Could be revealing.

They do: http://register.microsoft.com/mswish/suggestion.asp

But it's faster and more accurate to use Help>Send feedback...

You're using the result :)

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
 
T

Tony

John,

Yeah, well... I have sent dozens of suggestions and bugs that way
(maybe one hundred or more over the past years) and so far no fix...

I mean a page with a real poll asking for the features that you want to
see in Word, for instance. Say, features in the menus and command key
combinations...

Would be great.

Regards,

---
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Tony:

OK... Then stick around :) Should you decide to make yourself at home in
here, it won't be long before they bury you in surveys about forthcoming
versions!

I have to admit that menus and keystrokes are a difficult "sell" to the
Development teams. They would always come back to you saying "The menus and
keystrokes are fully customisable. Each user can have exactly what they
want. So don't we have that box checked already?"

However, you seem to be putting in a few answers around here, as well as
asking questions. You keep doing that and pretty soon you too will be
handed the keys to the Coffee House :) We should warn you right off that
being a Microsoft MVP is a form of madness for which medication has so far
proved ineffective.

You too could find yourself wired on caffeine, hunched over a hot computer
at three in the morning, slaving away over the latest edition of "The
Microsoft Word Version nn Wish List", using language your Mother tried to
discourage...

Cheers

John,

Yeah, well... I have sent dozens of suggestions and bugs that way
(maybe one hundred or more over the past years) and so far no fix...

I mean a page with a real poll asking for the features that you want to
see in Word, for instance. Say, features in the menus and command key
combinations...

Would be great.

Regards,

--

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
 
T

Tony

John,

LOL...

:)

My suggestion was just to include some extra menu with keyboard
combination (copy and paste unformatted) that many people may be using,
yet Microsoft may not know about it...

Thanks for the hint!

---
 
L

lah532

Hello,

Word Mac X (10.4.2)... I use paste special unformatted constantl
making my school study notes from websites / other document
frequently. I came across this thread because I was looking to do wha
Matt and Tony have done (record a macro to make this a keyboar
shortcut). I've tried using Matt's and Tony's macros and recording m
own, but it's not working for me - the macro for paste specia
unformatted always pastes with the source format. However if I go t
the edit menu and select paste special and then select unformatte
text, that works. But recording exactly that does not work - it paste
formatted as in the source.

I would really appreciate any help getting this to work - it'
frustrating that I thought I found the answer here, but I can't make i
work for me :)

Thank you!
Lydia

'John McGhie [MVP - Word and Word Macintosh said:
']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 i
EditPaste.
Most Word "commands" are actually macros. If you have a macro of th
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 o
the
clipboard. It's crude, but it works: and saves you having t
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 actuall
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 clipboar
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 th
format you
request when you ask for it.

Cheers

 
J

John McGhie [MVP - Word and Word Macintosh]

The macro I posted, which you quoted in your question, will work :) Note:
This macro will paste as plain text if the content of the clipboard can be
rendered as plain text. Otherwise it traps the error and performs an
ordinary Paste of whatever is there.

Sub EditPaste()
On Error GoTo notAvailable

Selection.PasteSpecial Link:=False, DataType:= wdPasteText
End

notAvailable:
Selection.Paste

End Sub

I use the INSERT key to fire this macro. Use the following instructions to
install it:
http://word.mvps.org/MacWordNew/InstallMacroMac.htm

(If you use the very buggy Safari, you will need to hit Reload a few times
before it will completely load that page ...)

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 said:
']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
 
L

lah532

Hello John,

You are right, it does work! I just needed to follow your directions t
Tony, below, creating both macros exactly as you say, for it to work
Thank you so much for posting back so quickly and for putting the inf
here in the first place!!!!! Thank you also for the link to th
directions about using macros, and for writing those directions too
Now I have a new question about styles that I am going to post as a ne
thread since I haven't been able to find it from searching your link o
here...

Best regards,
Lydia

'John McGhie [MVP - Word and Word Macintosh said:
']The macro I posted, which you quoted in your question, will work :)
Note:
This macro will paste as plain text if the content of the clipboard ca
be
rendered as plain text. Otherwise it traps the error and performs an
ordinary Paste of whatever is there.

Sub EditPaste()
On Error GoTo notAvailable

Selection.PasteSpecial Link:=False, DataType:= wdPasteText
End

notAvailable:
Selection.Paste

End Sub

I use the INSERT key to fire this macro. Use the followin
instructions to
install it:
http://word.mvps.org/MacWordNew/InstallMacroMac.htm

(If you use the very buggy Safari, you will need to hit Reload a fe
times
before it will completely load that page ...)

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 d 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 recordin 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 - i 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 mak it
work for me :)

Thank you!
Lydia

'John McGhie [MVP - Word and Word Macintosh said:
']Hi Tony:

That's exactly what I use (I normally use the INSERT key to past 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 o 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 wha actually
is
there. There is usually a selection of formats (can be five o six,
depending on the application you copied from). This can be little
character building, because the "data" is not actually ON th clipboard
of
the source application is still open. There's just a pointer t it,
and the
source application then produces the data to the clipboard in the
format you
request when you ask for it.

Cheers


 
J

John McGhie [MVP - Word and Word Macintosh]

Lydia:

Please consider yourself a "Gold Customer" of this shop :)

Not ONLY did you write back to say Thanks, but you ALSO posted your next
question in a new thread -- please take a double gold star for each hand :)

The "Thank Yous" are why we do this, so it's really great when we get one
:)

Cheers


Hello John,

You are right, it does work! I just needed to follow your directions to
Tony, below, creating both macros exactly as you say, for it to work.
Thank you so much for posting back so quickly and for putting the info
here in the first place!!!!! Thank you also for the link to the
directions about using macros, and for writing those directions too!
Now I have a new question about styles that I am going to post as a new
thread since I haven't been able to find it from searching your link or
here...

Best regards,
Lydia

'John McGhie [MVP - Word and Word Macintosh said:
']The macro I posted, which you quoted in your question, will work :)
Note:
This macro will paste as plain text if the content of the clipboard can
be
rendered as plain text. Otherwise it traps the error and performs an
ordinary Paste of whatever is there.

Sub EditPaste()
On Error GoTo notAvailable

Selection.PasteSpecial Link:=False, DataType:= wdPasteText
End

notAvailable:
Selection.Paste

End Sub

I use the INSERT key to fire this macro. Use the following
instructions to
install it:
http://word.mvps.org/MacWordNew/InstallMacroMac.htm

(If you use the very buggy Safari, you will need to hit Reload a few
times
before it will completely load that page ...)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top