Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Split Word Doc into multiple html files

Posted on 2013-06-18
6
Medium Priority
?
694 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 26

Expert Comment

by:Blue Street Tech
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 26

Expert Comment

by:Blue Street Tech
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
Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

 
LVL 26

Expert Comment

by:Blue Street Tech
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 26

Expert Comment

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

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
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.
Suggested Courses

618 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