Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Sun, 31 Jul 2005 12:43:14 -0500,    group: microsoft.public.word.word6-7macros        back       


Paster Unformatted Macro   
I did a record macro following the path  Paste Special>Unformaated Text.
Here is the code it gave me:

Sub Paste_Unformatted()
'
' Paste_Unformatted Macro
'
     Selection.PasteAndFormat (wdPasteDefault)
End Sub

When I run it, it pastes the text in the format that was copied, not 
unformatted.
I know there is better code.  Does anybody have it?  I'm using Word 2003.

Thanks in advance,
Alan
date: Sun, 31 Jul 2005 12:43:14 -0500   author:   eht_remmir

Re: Paster Unformatted Macro   
Sub Paste_Unformatted()
'
' Paste_Unformatted Macro
'
     Selection.PasteSpecial DataType:=wdPasteText
End Sub


-- 
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"eht_remmir"  wrote in message 
news:OLJOSdflFHA.2904@tk2msftngp13.phx.gbl...
>I did a record macro following the path  Paste Special>Unformaated Text.
> Here is the code it gave me:
>
> Sub Paste_Unformatted()
> '
> ' Paste_Unformatted Macro
> '
>     Selection.PasteAndFormat (wdPasteDefault)
> End Sub
>
> When I run it, it pastes the text in the format that was copied, not 
> unformatted.
> I know there is better code.  Does anybody have it?  I'm using Word 2003.
>
> Thanks in advance,
> Alan
date: Sun, 31 Jul 2005 19:12:50 +0100   author:   Jonathan West

Re: Paster Unformatted Macro   
>>     Selection.PasteAndFormat (wdPasteDefault)

"Jonathan West"  wrote:
>     Selection.PasteSpecial DataType:=wdPasteText


Or starting from your code:
Selection.PasteAndFormat(wdFormatPlainText)

Doesn't seem to make any difference which one you use...

Regards,
Klaus
date: Mon, 1 Aug 2005 21:29:13 +0200   author:   Klaus Linke

Re: Paster Unformatted Macro   
"Klaus Linke"  wrote in message 
news:OKqP68slFHA.2904@tk2msftngp13.phx.gbl...
>>>     Selection.PasteAndFormat (wdPasteDefault)
>
> "Jonathan West"  wrote:
>>     Selection.PasteSpecial DataType:=wdPasteText
>
>
> Or starting from your code:
> Selection.PasteAndFormat(wdFormatPlainText)
>
> Doesn't seem to make any difference which one you use...


It does if the macro might have to run in older versions of Word. I think 
that PasteAndFormat only arrived in Office XP.


-- 
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
date: Mon, 1 Aug 2005 21:16:46 +0100   author:   Jonathan West

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us