foreach my $oPara (%{$Word->ActiveDocument->Paragraphs}) { if ($oPara->Range->Information(wdWithInTable)) { if ($oPara->Next->Information(wdWithInTable) eq False) { if ($oPara->Next->Text eq "\r") #vbCr { logoutput("Deleting Line\n"); $oPara->Range->Next->Delete; } } } }