#16
|
|||
|
|||
macropod -- I opened a blank x.docx, saved your latest revision as a macro named SplitDocuments, and ran that macro. It opened a dialog saying "Choose a folder." That proved to be a request for both the source and destination folder. The macro ran, and it worked. It produced one extra blank .docx file for each source .txt file, but no quibble -- those were easy enough to delete. I'm guessing it saw the ending .pa as the start of a new section and, as gmayor says, another and probably better solution would be to remove that ending .pa before processing the files. It probably shouldn't have been there anyway.
I can only thank you both, again, for the time and effort you've put into this project. I think my learning will really begin when I adapt what you've done to try to produce a macro that will process other old text files. Regarding which, I misspoke earlier. The .pa ending code was apparently from WordStar, which I probably stopped using in the late 1980s. One new set of .txt files will be XyWrite files, though, with codes like «MDUL» and «MDNM». But those aren't the delimiters; those are for (underline) and (return to normal). I think the delimiters are semicolons. It will surely be simple to adapt your macros to that. Let me just editorialize that it was a lot easier in WordPerfect. If memory serves, I could write end-user-intelligible macros that were largely created just by telling WP to watch what I was doing and remember it. Then search for .pa, cut and paste into a new doc, edit a bit, and go. I think Word has a parrot feature too, but I believe I tried and couldn't get it to work like that. Anyway, thanks again. |
#17
|
||||
|
||||
That could only happen if that 'blank' document was produced from a portion of the source that had a space, for example, in addition to a paragraph break.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
macro, page break, split |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to divide a landscape page into 2 parts | rtcary | Word | 1 | 01-17-2018 12:07 AM |
One long string of text with ; as the delimiter | Laurie B. | Excel | 1 | 02-28-2015 03:02 AM |
Split file using variable delimiter | kramer74 | Word VBA | 7 | 09-01-2014 12:12 AM |
How do I edit text in Quick Parts? | TommyVincent | Word | 4 | 07-30-2014 01:51 PM |
divide page into 4 parts | aclark17 | Word | 4 | 01-17-2012 09:04 AM |