View Single Post
  #4   Report Post  
Graham Mayor
 
Posts: n/a
Default

I seem to recall answering this previously, but the start of the thread has
lapsed, however a wildcard search for
\[*\] \ht\[ ]
replace with
nothing
will do the trick, or by macro:-

Sub StripDates()
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "\[*\] \ht\ "
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute replace:=wdReplaceAll
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Daiya Mitchell wrote:
Study how to use wildcards in Find & Replace, which will let you set
up a code to delete the text between brackets, or use some other
standard pattern. Start he

http://www.gmayor.com/replace_using_wildcards.htm

One of the wildcard search experts might come along with more
specific help.


On 4/10/05 2:03 PM, "Ralph" wrote:

that wont work because each entry to be removed is slightly
different, i.e. a different time on the time stamp, read my post
again and look at the example, thank you for responding



"jannwebb" wrote:

For simple things like the ht, I just go to Edit | Replace and
put only a space in the replace box....

"Ralph" wrote:

There are these certain entries, date/time stamp entries to be
axact, on some
documents that I use that I would LOVE to be able to automatically
remove them all with some cool macro or something but I'm not too
good with these things. Here is a sample of the text:

"[4/9/2005 2:30:33 PM] ht On 3/29 MG775 fell below sma200.. and
stayed there for the last week.. waiting for another shoe to drop.
[4/9/2005 2:31:55 PM] ht Thursday AH USFC lowered Guidance .. a
lot. They cited 3 reasons for the shortfall.
[4/9/2005 2:32:17 PM] ht Top was slower Auto Sector business."

What I would love to be able to remove automatically from these
entries are these parts "[4/9/2005 2:30:33 PM] ht", "[4/9/2005
2:31:55 PM] ht", "[4/9/2005 2:32:17 PM] ht"

A solution to this problem would be very gratefully appreciated,
would make my life all the easier.

THANKS!!