Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
WSR WSR is offline
external usenet poster
 
Posts: 13
Default Macro for Paste Special Unformatted Text

XP SP3
Word 2007

Below is my macro of Paste Special / Picture Enhance Metafile.

Can someone help me modify it for Paste Special / Unformatted Text

Sub PasteSpecialPicture()
'
' PasteSpecialPicture Macro
'
'
Selection.PasteSpecial DataType:=9
End Sub


Thanks for reading and your assistance B^


  #2   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Macro for Paste Special Unformatted Text

On Wed, 10 Sep 2008 17:34:35 -0400, "WSR" wrote:

XP SP3
Word 2007

Below is my macro of Paste Special / Picture Enhance Metafile.

Can someone help me modify it for Paste Special / Unformatted Text

Sub PasteSpecialPicture()
'
' PasteSpecialPicture Macro
'
'
Selection.PasteSpecial DataType:=9
End Sub


Thanks for reading and your assistance B^


I think it's more important to point out how to find out these things for
yourself than to solve this particular issue, although we'll get there...

With the cursor in the word PasteSpecial in the VBA editor, press F1 to open the
Help topic for that keyword. In that topic, in the table of parameters, find
DataType. It tells you that this parameter takes a value that's a member of the
WdPasteDataType enumeration, and that word is a hyperlink.

Clicking the link takes you to the topic for WdPasteDataType. There you can find
not only the numeric values but also the names and meanings of the values. In
particular, the value 9 that you already have corresponds to the name
wdPasteEnhancedMetafile. Use the name instead of the number as a form of
internal documentation -- glancing at it tells you what kind of object the
command can paste, without having to look it up.

In the same table, you find that the value wdPasteText (= 2) pastes text.


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Macro for Paste Special Unformatted Text

Or you could call the data type by name

Sub PasteUnfText()
On Error GoTo oops
Selection.PasteSpecial _
DataType:=wdPasteText, _
Placement:=wdInLine
End
oops:
Beep
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org





Jay Freedman wrote:
On Wed, 10 Sep 2008 17:34:35 -0400, "WSR" wrote:

XP SP3
Word 2007

Below is my macro of Paste Special / Picture Enhance Metafile.

Can someone help me modify it for Paste Special / Unformatted Text

Sub PasteSpecialPicture()
'
' PasteSpecialPicture Macro
'
'
Selection.PasteSpecial DataType:=9
End Sub


Thanks for reading and your assistance B^


I think it's more important to point out how to find out these things
for yourself than to solve this particular issue, although we'll get
there...

With the cursor in the word PasteSpecial in the VBA editor, press F1
to open the Help topic for that keyword. In that topic, in the table
of parameters, find DataType. It tells you that this parameter takes
a value that's a member of the WdPasteDataType enumeration, and that
word is a hyperlink.

Clicking the link takes you to the topic for WdPasteDataType. There
you can find not only the numeric values but also the names and
meanings of the values. In particular, the value 9 that you already
have corresponds to the name wdPasteEnhancedMetafile. Use the name
instead of the number as a form of internal documentation -- glancing
at it tells you what kind of object the command can paste, without
having to look it up.

In the same table, you find that the value wdPasteText (= 2) pastes
text.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a shortcut for Paste Special Unformatted Text Lapine49 Microsoft Word Help 2 September 27th 07 06:23 AM
paste special unformatted text msiegert Microsoft Word Help 5 February 10th 07 01:22 AM
paste special - unformatted text Tom Microsoft Word Help 1 July 16th 05 07:17 PM
shortcut key for paste special > unformatted text Mike B Microsoft Word Help 1 February 3rd 05 11:08 PM
Is paste special the only way to insert unformatted text Lucian Sitwell Microsoft Word Help 3 December 15th 04 08:40 PM


All times are GMT +1. The time now is 10:20 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"