Solved

Split Word Doc into multiple html files

Posted on 2013-06-18
6
616 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
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 …

785 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