Thread: Delete text
View Single Post
 
Old 01-01-2011, 08:57 PM
Michael007 Michael007 is offline Windows 7 64bit Office 2003
Novice
 
Join Date: Dec 2010
Posts: 18
Michael007 is on a distinguished road
Default Text_Delete

Sorry Paul,

Though, I was sure that I included the code, anyhow...

As suggested, the macro was called: Text_delete

On the second try, I got an Execution Error (Text search contains a special criteria not valid).

With ActiveDocument.Content.Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = True
.Text = "^13"
.Replacement.Text = "^l"
.Execute Replace:=wdReplaceOne
.Text = "([^13]{2}[!^13]{1,})^13"
.Replacement.Text = "\1^l"
.Execute Replace:=wdReplaceAll ==== 'VBA stopped here'====

I re-send the file with hopefully the code included.

Michael
Attached Files
File Type: doc Marine4.doc (47.0 KB, 16 views)
Reply With Quote