vba - Copy and change format -
i want copy text and, using vba, change format (remove space between paragraphs , change alignment), , paste text have copied. code i'm using:
sub paste1() application.screenupdating = false selection.pastespecial datatype:=wdpastetext selection.paragraphformat.alignment = wdalignparagraphjustify selection.find .text = "^p" .replacement.text = " " .forward = true .wrap = wdfindcontinue .execute replace:=wdreplaceall end application.screenupdating = true end sub
the code works fine, affects entire document , not text have copied. how can fix it? thanks
Comments
Post a Comment