Solved

Split Word Doc into multiple html files

Posted on 2013-06-18
6
599 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 24

Expert Comment

by:diverseit
Comment Utility
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
Comment Utility
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 24

Expert Comment

by:diverseit
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 24

Expert Comment

by:diverseit
Comment Utility
Did you take a look at my post?
0
 

Author Closing Comment

by:GinaF
Comment Utility
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 24

Expert Comment

by:diverseit
Comment Utility
Regardless of closing this. .. did you try my post. .. curious if it worked for you?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:

771 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

9 Experts available now in Live!

Get 1:1 Help Now