Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2010, 12:49 PM
MJMR999 MJMR999 is offline Macro to export document sections to individual txt files? Windows Vista Macro to export document sections to individual txt files? Office 2007
Novice
Macro to export document sections to individual txt files?
 
Join Date: Feb 2010
Posts: 2
MJMR999 is on a distinguished road
Default Macro to export document sections to individual txt files?

Hey guys, this is something that I believe should be possible but I have no idea how to go about it. I work on ebooks in Word constantly (for myself, not for work or distributing) and I set the various chapter titles as Heading 1. I need to output each chapter individually to a UTF-8 txt file with the chapter name as the filename. Since Word does allow you to copy/paste whole section by the Heading in Outline view it seems like it should be doable.

The way I do it right now is copy/paste from Word into Notepad++ one chapter at a time. Doing this repeatedly is a real pain, especially with 30-40 chapter ebooks.

For instance let's just say we have the following file, with bold being Heading 1.

Introduction
Hi
Chapter 1
Sam went to the store.
Chapter 2


Sam came home.

What I want is a macro that would output Introduction.txt containing "Hi", Chapter 1.txt containing "Sam went to the store." and Chapter2.txt containing "Sam came home."

Any ideas how this might be done would be greatly appreciated!

-MJ
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Sections of a Word Document Andy Jenkinson Word 4 02-12-2010 02:53 AM
Macro to export document sections to individual txt files? I need help using MS Office Document Imaging software to open .tiff files. jack_c Misc 1 01-15-2010 06:28 AM
Document with selective sections printing krismason Word 0 07-09-2009 03:30 AM
Macro to export document sections to individual txt files? Graphic files do not appear in my document plt Drawing and Graphics 2 04-22-2009 09:58 AM
Help-overwriting files-could it be macro virus? Timpotty Word 0 03-06-2009 04:28 PM


All times are GMT -7. The time now is 11:16 PM.


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