01-27-2013, 02:22 PM | #76 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I actually made some changes to make it more Mac proof. As I don't have a Mac, I cannot really test. As Turtle91 said, what is the error you get?
|
01-30-2013, 05:23 PM | #77 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2013
Device: Kindle Fire
|
The With in line 160 is not closed so I got an error.
I closed it and it worked. Also, I normally don't replace the curly quotes with the special character. Why are the quotes important to replace? I think I will comment out the code to replace the quotes as I like the look with the quotes better and my ebook seems to work fine. |
Advert | |
|
01-30-2013, 05:44 PM | #78 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2013
Device: Kindle Fire
|
Also, there is no license associated with your code?
So right now, they way it is posted, it it free, unlicensed, and public domain so anyone can take and do what they want with it. It that what you want? You might want to look at the BSD Licenses. http://opensource.org/licenses/BSD-2-Clause |
01-31-2013, 06:14 AM | #79 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Correct, the with is not closed correctly. Corrected it in the start post.
The quotes are important to replace for several reasons. One is that Word will convert them back to straight quotes upon saving and that is not what I want... There is no license to it, that is correct. I use this macro myself and if anyone finds it useful, they can use it. I can put in a BSD or other license reference in it, but that will not stop anyone from sharing if they want. |
01-31-2013, 11:49 AM | #80 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jan 2013
Device: Kindle Fire
|
OK. Changes the quotes is only for saving purposes.
I wondered if there was a reason epub needed the character sequence as opposed to the characters. Cool. And no need to license it. I plan to use it in a blog post, which is why I asked about license first. Of course, I'll make sure you have credit. |
Advert | |
|
03-19-2013, 12:00 AM | #81 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
|
Thank you again for this neat gadget.
Internal links seem to be deleted in the resulting HTML file (Word 2010 and Word 2013). The links were created using the "Insert" ribbon and "Bookmark" and "Hyperlink" buttons. In the resulting HTML file, the bookmark (anchor) is deleted and the link holds an empty reference like this: <a href="">Text here</a> Any chance this can be fixed? I am attaching the test files. To create the HTML file I click either "No" or "Cancel" for all questions except the last one: "Save HTML?" where I select "Yes." Aside from that, the macro seems to work fine in Word 2013 (it's available as a free 30-day trial of Microsoft Office 365 if you are curious). Last edited by steppe; 03-19-2013 at 12:17 AM. |
03-19-2013, 02:13 AM | #82 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I will look into it, but since I hardly use internal links in a Word document, I haven't programmed it.
|
03-19-2013, 07:13 AM | #83 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
|
Your time would be greatly appreciated. I have a last-minute wish : so that the internal links are Kindle-proof it would be best to code the anchors like this:
either: Code:
<h1 id="anchor1">Chapter One</h1> Code:
<a name="anchor1"></a><br /><h1>Chapter One</h1> Code:
<a name="anchor1"></a><h1>Chapter One</h1> |
03-19-2013, 08:22 AM | #84 |
A Hairy Wizard
Posts: 3,178
Karma: 18843349
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I thought the NAME element was going away in favor if the ID so the first example would be preferable.
|
03-19-2013, 11:11 AM | #85 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
If I include this in the macro (I am not sure yet), it will be with 'ID'. I will take a look later this week.
|
03-19-2013, 01:24 PM | #86 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
New version in the startpost. Bookmarks and internal links are supported...
|
03-19-2013, 04:55 PM | #87 |
A Hairy Wizard
Posts: 3,178
Karma: 18843349
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Wow!! You have REALLY short weeks in the Netherlands!!
Thanks! |
03-19-2013, 08:14 PM | #88 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
|
Thank you, Sir, for the prompt action!
Unfortunately, the macro seems to crash when processing 6 or more internal links. I am attaching the test file with screenshots. Again, |
03-19-2013, 08:30 PM | #89 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
|
Also, when I try to delete the Macro from Word 2010, I get an error message
your help would be much appreciated. |
03-20-2013, 03:46 AM | #90 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Fixed. The first error is a simple one and was easy to fix. It actually doesn't matter how many links are in the document. Again foiled by having to maintain two versions... The second screen showed me that there was something weird. The nestings were wrong. I am glad you sent the word document you used for testing here, because I could use that. You used soft enters and I didn't check those for formatting. I personally would be cautious with soft enters.
I also changed some things in the processing sequence, because links get underline tags. This is unwanted, since anchors already have an underline formatting in standard HTML. With regards to your last screenshot. You cannot delete the macro from there. The macro contains many routines and functions. If you need to delete the macro, you need to enter the VBA editor (the edit button or Alt-F11). There you can remove the file. Last edited by Toxaris; 03-20-2013 at 04:28 AM. |
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 |