use Win32::OLE qw(in valof with OVERLOAD); Win32::OLE->Option(_NewEnum => 1); for my $oPara (in $Word->ActiveDocument->Paragraphs) { my $oRange = $oPara->Range; next unless $oRange->Information(wdWithInTable) ; $oRange = $oRange->Next; next if $oRange->Information(wdWithInTable) ; $oRange->Delete() if $oRange->Text eq vbCr; }