Hi, I have a document that I got from a subtitle run on a video and I am trying to get the data out but the subtitles have repeated themselves, so every second line is a repeat. I ran this macro and it worked great but how would I change it if I needed to run it only on one section of the document please? Could I select a section for it to run and if so how would it work and what would I change in this macro? Thank you for your answer previously! It was helpful!
Quote:
Originally Posted by Greg Maxey
how do i delete every other line (all line 2's) in a page?
Interesting question. (all line 2's). lines *in* a page?
If you have a page with lines *on* it then wouldn't there only be one
line 2?
Your follow up explanation wasn't much better. However, here is one
way. Run this macro:
Sub Test()
Selection.WholeStory
Selection.Collapse
Selection.MoveDown wdLine, 1
On Error GoTo Handler
Do
Selection.Bookmarks("\Line").Select
Selection.Delete
Selection.MoveDown wdLine, 1
Loop
Handler:
End Sub
|