07-12-2011, 07:50 AM | #1 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Word macro for clean HTML code
If anybody is interested, I create a macro to transform a Word document to clean HTML. The following things are supported:
- simple formating (italic, bold, underline, superscript, etc) - 1 level lists - tables - images - foot- and endnotes - hyperlinks (internal and external) - header tags - custom named styles in Word - bookmarks It will use UTF-8. Just unpack the .bas file. Press Alt+F11 in word and import the .bas file into the Normal.dot. Comments have been removed or translated into English. *** I strongly recommend to take a look at the Word add-in instead. It has much more features and is actively maintained. *** Last edited by Toxaris; 02-28-2015 at 02:22 AM. |
07-12-2011, 07:58 AM | #2 |
Grand Sorcerer
Posts: 11,259
Karma: 35056282
Join Date: Jan 2008
Device: Pocketbook
|
What version of Word/what level of Word documents are needed?
|
Advert | |
|
07-12-2011, 08:30 AM | #3 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It should work for version 2007 and up. I would not be surprised if it would also work for 2003. It works for both doc and docx.
|
07-13-2011, 12:45 AM | #4 |
Connoisseur
Posts: 78
Karma: 1588
Join Date: Jan 2011
Location: New Zealand
Device: see signature
|
Thank you! Luckily, I can read a little bit of Dutch - just enough to get by
|
07-13-2011, 03:18 PM | #5 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
New version... Better way to change the headers (Word language independant) and prevent of some possible loops.
|
Advert | |
|
03-07-2012, 12:51 PM | #6 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
A new version again. Installation procedure is the same.
Please be aware. The macro will not create a stylesheet, but will create a reference to a stylesheet (if you choose to). Last edited by Toxaris; 03-28-2012 at 01:08 PM. |
03-07-2012, 04:00 PM | #7 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
It's great !!!!!! |
|
03-17-2012, 02:51 PM | #8 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Small bugfixes. It should also work on a Mac now. I also converted the comments and texts into English.
Updated the start post with the latest version. |
03-17-2012, 06:02 PM | #9 |
Zealot
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
|
Many thanks (now I don't have to finish translating it myself ).
|
03-28-2012, 03:24 AM | #10 |
Bookmaker & Cat Slave
Posts: 11,463
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Toxaris:
I downloaded the 2.5 version from your post on 3-7-12, but nothing is in English--did I get the wrong zip? Tx, Hitch |
03-28-2012, 01:07 PM | #11 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Hitch, use the attachment from the top post.
|
03-28-2012, 03:19 PM | #12 |
Bookmaker & Cat Slave
Posts: 11,463
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Thanks, Tox:
Thought I'd take it out for a spin; we're always adding new people and new tools, so anything that makes our process faster or can be used by some of our new folks is good. (ETA: D'oh! "Eng." :facepalm} Hitch Last edited by Hitch; 03-28-2012 at 03:41 PM. Reason: ETA: D'oh! |
04-06-2012, 05:02 PM | #13 |
Bookmaker & Cat Slave
Posts: 11,463
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Hi, Toxaris:
I'll try this again, but every time I attempt to run it, it crashes Win7, Word2010, on a PC Quad. ETA: Crashes it EVERY TIME. Hitch Last edited by Hitch; 04-06-2012 at 05:29 PM. Reason: Update |
04-07-2012, 01:29 PM | #14 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
A crash? I never had a crash by the macro before nor have heard of others. I also use Win7, but Word 2007. Does the crash occur at a certain step? Perhaps there are some differences between 2007 and 2010, but a crash should not happen anyway of course.
Does it contain a table? |
04-07-2012, 02:48 PM | #15 |
Bookmaker & Cat Slave
Posts: 11,463
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Hi, Tox:
No, no tables. The first one I tried contained some Word x-refs (I think to a now non-existent character list, perhaps), which I didn't realize, and I think that just tanked it completely. It simply stopped responding, across all open instances of Word, and I had to restart it. The second one I tried (and, as far as it goes, it worked a treat, btw) completed, but then it seemed to hang Word. I had to close Word from the task bar; the (now-empty) Word program just sat there like a dead dodo, I couldn't close it by the usual methods, either by File->exit, File->close, or x'ing out, I was only able to close it from the taskbar. The resulting html file, though, was findable and usable, so whatever happened, it produced the file, placed the finished html file in the dir, but then Word just wanked. (I realize that these are highly descriptive technical terms: wanked). My only other question, other than the Word program weirdness, is the inquiry into the other paragraph styles. I infer that what the macro is asking is for the Word-given style name, is that right? Does this iterate if there are, for example, 5 styles that you wish to retain? (This is simply a curiosity question; I'm comparing this macro's capabilities against the BookCreator macro for our newer bookmakers who haven't developed their own macros/clips/PERL programs to do it.) Thanks--hope this is remotely useful, Hitch |
Tags |
ebook tools |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word Macro: Footnotes to inline text ? | Hadrien | Workshop | 17 | 10-08-2011 01:28 PM |
Word 2007 macro | scoplar | Workshop | 1 | 05-21-2011 05:00 AM |
Doc to REB Macro for Word | kbirdz | Fictionwise eBookwise | 0 | 10-27-2010 10:30 PM |
Word Formatting Macro (Stingo's Macro) | Stingo | Sony Reader | 75 | 08-24-2010 05:18 AM |
Docvert 2.0 converts MS Word files to clean HTML | Alexander Turcic | Lounge | 0 | 03-16-2006 04:50 AM |