6ftAndClean
Programmer
Assistance please.
I require assistance with some Visual Basic (V.6.0) macro programming for Word 2000 under Win 2000.
THE BIG PICTURE:
I have the output of a query of a database which is a 6.8MB text file. The contents of the text file is a list of possible duplications of data within the database. Each line of text is an individual entry from the d/base. So in the simplest situation a potential duplication is shown by 2 lines of nearly identical text, folowed by an empty line, followed by the next potential duplication, etc. etc. There are occurences of 30 lines (or more) of text for 30 (or more) possible individual records which are all potential duplicates of each other.
This data needs to be sorted by eye.
MY SOLUTION SO FAR:
To aid this process I have sought to cut the work load up into manageable bite-sized chunks of 500 potential duplications per file.
So, I have used 'Find and Replace' in Word 2000 (I have a limited range of software available due to network restrictions) to replace the empty lines between each group of potential duplicates with a manual page break. This gives me a page per group of possible duplicate records.
I have then created a macro to select the 1st 500 pages (i.e. 1st 500 potential duplicate records), copy the text, open a new document based on a selected template and paste the contents. I then use 'Find and Replace' again to return the text to its original formatting of one empty line each group of lines of text.
Finally I save the document to a folder "To Do" and number the records 01.txt, 02.txt, etc.
All of the above I have running via recorded macros BUT for the saving part.
HERE'S WHERE YOU COME IN - hopefully!
Can I get my macro to copy the contents of the 1st 500 pages, paste it into a new document, save the document (automaticallygiving it a numerical name - the 1st being 01, the next 02 etc), close the new document, return to the original document, delete the still highlit text and then start the loop over and run automatically until it runs out of document to copy and paste from?
Your help would be very much appreciated.
I require assistance with some Visual Basic (V.6.0) macro programming for Word 2000 under Win 2000.
THE BIG PICTURE:
I have the output of a query of a database which is a 6.8MB text file. The contents of the text file is a list of possible duplications of data within the database. Each line of text is an individual entry from the d/base. So in the simplest situation a potential duplication is shown by 2 lines of nearly identical text, folowed by an empty line, followed by the next potential duplication, etc. etc. There are occurences of 30 lines (or more) of text for 30 (or more) possible individual records which are all potential duplicates of each other.
This data needs to be sorted by eye.
MY SOLUTION SO FAR:
To aid this process I have sought to cut the work load up into manageable bite-sized chunks of 500 potential duplications per file.
So, I have used 'Find and Replace' in Word 2000 (I have a limited range of software available due to network restrictions) to replace the empty lines between each group of potential duplicates with a manual page break. This gives me a page per group of possible duplicate records.
I have then created a macro to select the 1st 500 pages (i.e. 1st 500 potential duplicate records), copy the text, open a new document based on a selected template and paste the contents. I then use 'Find and Replace' again to return the text to its original formatting of one empty line each group of lines of text.
Finally I save the document to a folder "To Do" and number the records 01.txt, 02.txt, etc.
All of the above I have running via recorded macros BUT for the saving part.
HERE'S WHERE YOU COME IN - hopefully!
Can I get my macro to copy the contents of the 1st 500 pages, paste it into a new document, save the document (automaticallygiving it a numerical name - the 1st being 01, the next 02 etc), close the new document, return to the original document, delete the still highlit text and then start the loop over and run automatically until it runs out of document to copy and paste from?
Your help would be very much appreciated.