![]() |
#1
|
|||
|
|||
![]()
Hello, I am running the following macro:
Sub ScratchMacroI() Dim oRng As Word.Range Dim oRngDelete As Word.Range Set oRng = ActiveDocument.Range With oRng.Find .Text = "word" While .Execute oRng.Select Set oRngDelete = ActiveDocument.Bookmarks("\Line").Range oRngDelete.Delete Wend End With End Sub Sub ScratchMacroII() Dim oRng As Word.Range Set oRng = ActiveDocument.Range With oRng.Find .Text = "word" While .Execute oRng.Paragraphs(1).Range.Delete Wend End With End Sub It runs fine for awhile and then gets hung up on the run time error. I should mention the document I have is 200+ pages and is filled with tables. I have attached a sample of what these tables look like. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
1N82I | Excel | 3 | 02-08-2015 12:39 PM |
Display and Edit a Presentation at the same time. | Techabca | PowerPoint | 3 | 05-02-2014 11:00 AM |
![]() |
tinfanide | Word VBA | 3 | 04-27-2012 09:48 AM |
Word Visual Basic error - run time error 504 | crazymorton | Word | 11 | 01-13-2012 04:32 AM |
Can't delete range - error 5904 | expatriate | Word VBA | 1 | 06-03-2011 12:12 AM |