GinaF
asked on
Split Word Doc into multiple html files
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!
<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!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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!
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!
Did you take a look at my post?
ASKER
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.
Regardless of closing this. .. did you try my post. .. curious if it worked for you?
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.