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
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
>> 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
"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