Solved

Split Word Doc into multiple html files

Posted on 2013-06-18
6
645 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
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:
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

688 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