Solved

Split Word Doc into multiple html files

Posted on 2013-06-18
6
610 Views
Last Modified: 2013-07-01
I've got a set of long Word documents that I need to split into multiple html pages.  The Word docs are formatted like this:

<h1>First Heading</h1>
<h2>Some Subheading</h2>
<p>bunch of paragraphs</p>
---page break---
<h1>Another Heading</h1>
<h2>Some Subheading</h2>
<p>bunch of paragraphs</p>
---page break---
<h1>Heading</h1>
<h2>Some Subheading</h2>
<p>bunch of paragraphs</p>
---page break---
and so on...

The files have to be split such that each heading and all the associated text is pasted into a new document named "heading.html"  -- in addition, it would be preferable that the html file names have no spaces.  For example, the Course Overview section would be converted into course_overview.html.  There is a page break between each section.  

I've tried multiple solutions that have been posted already, but have not been able to get them to work.  Thanks very much for helping!
0
Comment
Question by:GinaF
  • 4
  • 2
6 Comments
 
LVL 25

Expert Comment

by:Diverse IT
ID: 39272378
Hi GinaF,

Why don't you just take the content copy/paste into two text files. Then save the files as the HTML pages and your done.
0
 

Accepted Solution

by:
GinaF earned 0 total points
ID: 39279451
That is what I had been doing.  However, each Word document must split into 56 separate html docs.  I have 310 Word docs.  310 x 56 = 17360.  It would be a bit tedious and very time-consuming.  If that were the approach I would accept, I would not have asked the question.

I ended up patching together some code that does what I want to an extent, splitting the files into rtf files, which I then edit in Dreamweaver.
0
 
LVL 25

Expert Comment

by:Diverse IT
ID: 39279490
Hi Gina,

Sorry the level of expertise ranges the full spectrum on EE...there is no way for us to initially know your expertise.

If you are using page breaks as indicated above you could use this to automate the process of individualizing the pages: http://download.cnet.com/MS-Word-Split-Divide-Save-Pages-Into-Separate-Files-Software/3000-2079_4-75728446.html

You can also use this macro to cut page to new doc: http://gmayor.com/copying_selected_text.htm

Let me know how it goes. Thanks!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 25

Expert Comment

by:Diverse IT
ID: 39283229
Did you take a look at my post?
0
 

Author Closing Comment

by:GinaF
ID: 39289435
I waited for a few days without a response; the question was clear, IMHO.  I ended up finding some code and altering it.  Not perfect but I needed to get going.
0
 
LVL 25

Expert Comment

by:Diverse IT
ID: 39289501
Regardless of closing this. .. did you try my post. .. curious if it worked for you?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Always hangs on opening 8 66
PHP Word Writer 1 54
How to open a ZIP file. 6 40
Excel copy picture into Outlook email 7 46
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now