#1
|
|||
|
|||
Delete Text from Insertion Point to Found Text
Hi. Rookie here...
I have a LARGE text document that is actually the result of executing a DOS "dir /s" command and outputting it to a text file. This file contains the following pattern repeated MANY times... Directory of <directory name>I want to create a Macro - or VBA code - that deletes the list of files, for EACH of the above blocks, and leaves me with the following... Directory of <directory name> <# of bytes> bytesThis way I have a list of just the directory names and their sizes. I imagine the following steps in my Macro: 1) Go to the next occurrence of "Directory of"I have tried recording a Macro to do this, but I get stuck at Step 3 above. Can I do this with a Macro? If not, can someone post a VBA snippet that will do the job, if it's not too complicated? If I should move this post to the VBA part of this forum, I'm happy to do so, but I was hoping I could get away with recording a Macro. Thx, feenyman99 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Random insertion of letters into typed text | BK42 | Office | 2 | 12-10-2015 07:40 AM |
Insertion point not working | pmahoney14 | Word | 1 | 05-24-2012 04:17 PM |
automating insertion of some text | obrienaj | Word | 3 | 10-17-2011 11:50 AM |
wildly flashing insertion point with spinning wheel | joannetk | Word | 4 | 03-10-2011 04:26 AM |
Automatic insertion of blank pages or alternate text | Diopippo | Word | 0 | 07-06-2010 12:13 AM |