View Single Post
 
Old 08-05-2019, 12:01 AM
afif afif is offline Windows 7 64bit Office 2010
Novice
 
Join Date: Jul 2019
Posts: 16
afif is on a distinguished road
Default

Thanks. That works fine. But the problem is I insert the caption using macro. For testing purpose. I insert it multiple times.
When I try to delete them, the lines of removed captions are still there.
I try to use the following code to check whether the previous paragraph is empty. If it is empty, then remove the line. But it returns false.

Code:
If aRng.Paragraphs(1).Previous.Range.Text = "" Then
        aRng.Delete
End If
Attached Images
File Type: png line2.png (2.2 KB, 13 views)
Reply With Quote