Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 09-10-2018, 01:15 PM
raywood raywood is offline Divide Text Doc into Multiple Parts at .pa Delimiter Windows 10 Divide Text Doc into Multiple Parts at .pa Delimiter Office 2010 64bit
Novice
Divide Text Doc into Multiple Parts at .pa Delimiter
 
Join Date: Sep 2018
Posts: 10
raywood is on a distinguished road
Default

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.
Reply With Quote
  #17  
Old 09-10-2018, 02:22 PM
macropod's Avatar
macropod macropod is offline Divide Text Doc into Multiple Parts at .pa Delimiter Windows 7 64bit Divide Text Doc into Multiple Parts at .pa Delimiter Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by raywood View Post
It produced one extra blank .docx file for each source .txt file
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]
Reply With Quote
Reply

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
Divide Text Doc into Multiple Parts at .pa Delimiter 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

Other Forums: Access Forums

All times are GMT -7. The time now is 06:20 PM.


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