go to every 95th entry in a large Word file

M

Mike A.

How do I locate each consecutive 95th entry in a very large MS Word file,
where there is a comma after each entry?
 
D

DmH

It might be worth importing the document into Excel, using the Import Data
function. This may allow you to use the comma as the delimeter.
 
G

Graham Mayor

Is this a table or otherwise how are the 'entries' separated?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Mike A.

The entries are an address book and look like the following, thousands of
them. I want to organize them into blocks of 95 by locating each 95th
consecutive entry.

(e-mail address removed), (e-mail address removed), (e-mail address removed),
(e-mail address removed), (e-mail address removed), (e-mail address removed),
(e-mail address removed), (e-mail address removed), (e-mail address removed),
(e-mail address removed), (e-mail address removed), (e-mail address removed),
 
G

Graham Mayor

The following macro counts the commas and inserts two empty paragraph marks
after every 95 found

Sub SplitList()
Dim lCount As Long
lCount = 0
With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
Do While .Execute(findText:=", ", _
MatchWildcards:=False, _
Wrap:=wdFindStop, Forward:=True) = True
lCount = lCount + 1
If lCount Mod 95 = 0 Then
Selection.InsertAfter vbCr & vbCr
End If
Loop
End With
End With
End Sub

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

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Sergey Vlasov

Mike said:
The entries are an address book and look like the following, thousands of
them. I want to organize them into blocks of 95 by locating each 95th
consecutive entry.

(e-mail address removed), (e-mail address removed), (e-mail address removed),
(e-mail address removed), (e-mail address removed), (e-mail address removed),
(e-mail address removed), (e-mail address removed), (e-mail address removed),
(e-mail address removed), (e-mail address removed), (e-mail address removed),

Theoretically it would work with 95 *, in Find what field and ^&^p^p
replace string in wildcards mode. In practice it hangs my Word 2007.
Seems to 95 repetitions are too high, as 80 *, works correctly.

For example,
Find what *,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,
Replace With ^&^p^p
Use wildcards

organizes your list into blocks of 19 separated by two paragraph marks.
 

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