How would I go about this please.

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
 
D

Doug Robbins

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
 
D

Doug Robbins

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
 
S

Steved

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



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top