Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-12-2011, 07:50 AM   #1
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
Attached Files
File Type: zip transform_html 2.8_eng.bas.zip (6.4 KB, 1567 views)

Last edited by Toxaris; 05-06-2013 at 12:32 PM.
Toxaris is offline   Reply With Quote
Old 07-12-2011, 07:58 AM   #2
Ralph Sir Edward
Gentleman & Cynic
Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.Ralph Sir Edward ought to be getting tired of karma fortunes by now.
 
Ralph Sir Edward's Avatar
 
Posts: 5,654
Karma: 13605586
Join Date: Jan 2008
Location: 5 generation native Texan
Device: BeBook/Openinkpot, CYbook 3rd gen awaiting RTF software upgrade
What version of Word/what level of Word documents are needed?
Ralph Sir Edward is offline   Reply With Quote
Old 07-12-2011, 08:30 AM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
Toxaris is offline   Reply With Quote
Old 07-13-2011, 12:45 AM   #4
mvo
Connoisseur
mvo is no ebook tyro.mvo is no ebook tyro.mvo is no ebook tyro.mvo is no ebook tyro.mvo is no ebook tyro.mvo is no ebook tyro.mvo is no ebook tyro.mvo is no ebook tyro.mvo is no ebook tyro.mvo is no ebook tyro.
 
Posts: 62
Karma: 1400
Join Date: Jan 2011
Location: New Zealand
Device: Kindle Paperwhite 3G, Galaxy Note 2 & Note Tablet, Onyx T68
Thank you! Luckily, I can read a little bit of Dutch - just enough to get by
mvo is offline   Reply With Quote
Old 07-13-2011, 03:18 PM   #5
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
New version... Better way to change the headers (Word language independant) and prevent of some possible loops.
Attached Files
File Type: zip transform_html.zip (4.0 KB, 1212 views)
Toxaris is offline   Reply With Quote
Old 03-07-2012, 12:51 PM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
Toxaris is offline   Reply With Quote
Old 03-07-2012, 04:00 PM   #7
mmat1
Det
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 980
Karma: 1300318
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by Toxaris View Post
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.
This is not an in-depht analysis, but a quick check shows, that it works well in W2003. So W97 shoudn't cause much problems.

It's great !!!!!!
mmat1 is offline   Reply With Quote
Old 03-17-2012, 02:51 PM   #8
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
Toxaris is offline   Reply With Quote
Old 03-17-2012, 06:02 PM   #9
Keroberos
Zealot
Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.
 
Keroberos's Avatar
 
Posts: 127
Karma: 194002
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 ).
Keroberos is offline   Reply With Quote
Old 03-28-2012, 03:24 AM   #10
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,480
Karma: 13517271
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
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
Hitch is offline   Reply With Quote
Old 03-28-2012, 01:07 PM   #11
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Hitch, use the attachment from the top post.
Toxaris is offline   Reply With Quote
Old 03-28-2012, 03:19 PM   #12
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,480
Karma: 13517271
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
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!
Hitch is offline   Reply With Quote
Old 04-06-2012, 05:02 PM   #13
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,480
Karma: 13517271
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
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
Hitch is offline   Reply With Quote
Old 04-07-2012, 01:29 PM   #14
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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?
Toxaris is offline   Reply With Quote
Old 04-07-2012, 02:48 PM   #15
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,480
Karma: 13517271
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
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
Hitch is offline   Reply With Quote
Reply

Tags
ebook tools

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 08:26 AM.


MobileRead.com is a privately owned, operated and funded community.