![]() |
#1
|
|||
|
|||
![]()
I have a document containing more than 100 pages.
Here is a sample of how the document looks like: 123 00:07:36,529 --> 00:07:43,550 systems in the system for the system 124 00:07:39,619 --> 00:07:44,959 most solid part of the body when you 125 00:07:43,550 --> 00:07:47,509 look at them there are three 126 00:07:44,959 --> 00:07:52,959 indicators that it is all about solidity As a first step, I would like to have a macro that will delete the hourly information from all the pages. For example, delete all the info in the following format: 00:07:44,959 --> 00:07:52,959 Also, in the document, I have a series of numbers going from 1 to 2999 with no commas or anything else. So after executing the first macro, I would like to see this information also deleted, possibly with a macro. The sample here goes from 123 to 126. Any help is welcome and appreciate it. Cheers! |
#2
|
||||
|
||||
![]()
Try this
Code:
Sub Macro3() With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting .Text = "^13[0-9]{1,4}^013*[0-9]{2},[0-9]{3}^013" .Replacement.Text = "^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True .Execute Replace:=wdReplaceAll End With
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A question about format of numbers | tesoke | Excel | 3 | 03-22-2016 12:36 AM |
Search a cell that contains words and numbers and convert the numbers to metric | Carchee | Excel Programming | 36 | 10-08-2014 03:16 PM |
![]() |
Gnobles | Word | 4 | 12-19-2013 07:25 AM |
![]() |
MartianTom | Word | 2 | 08-15-2013 11:50 AM |
How do I refer to page numbers, when the numbers change as I prepare the document? | StevenD | Word | 5 | 11-29-2012 12:52 AM |