'*' is something of a blunt instrument - if the sequences are all lower case
letters, then change the macro to
Dim sFindText As String
Dim oRng As Range
sFindText = "#[a-z]{1,}#"
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = sFindText
Do While .Execute(Forward:=True, MatchWildcards:=True) = True
oRng.Delete
Loop
End With
See alsohttp://
www.gmayor.com/replace_using_wildcards.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Dim sFindText As String
Dim oRng As Range
sFindText = "#*#"
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = sFindText
Do While .Execute(Forward:=True, MatchWildcards:=True) = True
oRng.Delete
Loop
End With
My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
messagenews:6dcd10dc-0006-4cfa-8cce-adeac28c8a9a@z28g2000yqh.googlegroups.com...
- Prikazi citirani tekst -
Hello!
Thanks for the macro. Wel it deletes only # sign and it leaves
everything else.
The tekst wich I need to delete looks like this:
1.#koz# 1234568 - #skozm#
2.#kozm# 23564 - #skozm#
3.#kozm# 22542 - #skozm#
4.#kozm# 88165 - #skozm#
numbers after #kozm# are changing but I have to delete them too.- Sakrij citirani tekst -
- Prika¾i citirani tekst -