Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-14-2013, 06:39 AM
rcVBA rcVBA is offline find and delete duplicates Windows 7 64bit find and delete duplicates Office 2003
Novice
find and delete duplicates
 
Join Date: May 2013
Posts: 6
rcVBA is on a distinguished road
Default find and delete duplicates


I have a Word file with image names on each line. For example,
abc_bw.jpg
def_zq.jpg
img45cdgf.jpg
abc_logo.jpg
def_zq.jpg
img45cdgf.jpg
abc_bw.jpg

I have VBA code that selects the first line, compares the selected line with the following line, if the lines match the duplicate line is deleted, then the cursor moves down to the next line and compares that line to the selected line. When it reaches end, the "selected" line moves down one line and the process repeats until each line is compared with all the following lines and all duplicate lines have been deleted. This works ok for 5 or 6 lines, but with each additional line the time it take to process increases exponentially. Does anyone have any better ideas for how to find and delete the duplicate lines? Maybe with some sort of array? Thanks for any help you can provide.
Reply With Quote
 

Tags
array, vba word



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find out the duplicates and highlight them? Learner7 Excel 6 06-08-2017 06:04 AM
find and delete duplicates Word Macro to find and delete rows that contain adjacent cells containing "." AlexanderJohnWilley Word VBA 7 11-08-2012 10:15 AM
Find/Delete inline Page #'s alderfall Word 6 11-06-2012 11:51 AM
Find duplicates formula hannu Excel 2 10-26-2010 02:48 AM
find and delete duplicates sum of duplicates zxmax Excel 1 09-29-2006 08:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft