Eliminate Duplications in Long Word Lists

R

Rebecca

Greetings again.

If I may ask for help again, could someone please tell me
if it is possible to make a macro for MS Word XP that can
eliminate duplications in very long word lists (about 30
pages of alphabetized words)? For example, please look at
the short alphabetized list below:

bear
bear
cat
flower
flower
flower
tree
tree

After running the macro, we would see the following list:

bear
cat
flower
tree

Thus, all the duplications have been removed. Is this
possible? If it is, could you please explain how to do
this in very easy English? Thanks.
 
W

Word Heretic

G'day "Rebecca" <[email protected]>,

select the list, sort it, check if next para = current and delete



Rebecca said:
Greetings again.

If I may ask for help again, could someone please tell me
if it is possible to make a macro for MS Word XP that can
eliminate duplications in very long word lists (about 30
pages of alphabetized words)? For example, please look at
the short alphabetized list below:

bear
bear
cat
flower
flower
flower
tree
tree

After running the macro, we would see the following list:

bear
cat
flower
tree

Thus, all the duplications have been removed. Is this
possible? If it is, could you please explain how to do
this in very easy English? Thanks.

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email: (e-mail address removed)
Products: http://www.geocities.com/word_heretic/products.html
Spellbooks: 728 pages of dump left and dropping...

The VBA Beginner's Spellbook: For all VBA users.
 
W

Word Heretic

G'day "Rebecca" <[email protected]>,

You do something like

Dim k as long

with Selection.paragraphs
for k=.count to 2 step -1
if .item(k).range.text=.item(k-1).range.text then
.item(k-1).range.delete
end if
next
end with


Rebecca said:
Thanks, but where do I "check if next para = current"?

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email: (e-mail address removed)
Products: http://www.geocities.com/word_heretic/products.html
Spellbooks: 728 pages of dump left and dropping...

The VBA Beginner's Spellbook: For all VBA users.
 

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

Similar Threads


Top