How would I go about this please.

  • Thread starter Thread starter Steved
  • Start date Start date
S

Steved

Hello from Steved

1. 7322x Prince Of Seville
7. 07x9x Symboli Rex
8. Lord Mellays Chief
and so on
The above to leave as set out below please.

Prince Of Seville
Symboli Rex
Lord Mellays Chief

How would I go about doing this
 
Are items like that the only thing in the document? Is each line a separate
paragraph?

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
A macro containing the following code should do what you want:

Dim i As Long, j As Long, pararange As Range
For i = 1 To ActiveDocument.Paragraphs.Count
Set pararange = ActiveDocument.Paragraphs(i).Range
For j = 1 To pararange.Characters.Count
If Asc(pararange.Characters(j)) > 64 And
Asc(pararange.Characters(j)) < 91 Then
pararange.End = pararange.Start + j - 1
pararange.Delete
Exit For
End If
Next j
Next i


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
Thankyou very much indeed.
-----Original Message-----
A macro containing the following code should do what you want:

Dim i As Long, j As Long, pararange As Range
For i = 1 To ActiveDocument.Paragraphs.Count
Set pararange = ActiveDocument.Paragraphs(i).Range
For j = 1 To pararange.Characters.Count
If Asc(pararange.Characters(j)) > 64 And
Asc(pararange.Characters(j)) < 91 Then
pararange.End = pararange.Start + j - 1
pararange.Delete
Exit For
End If
Next j
Next i


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP



.
 
Back
Top