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 12-19-2012, 03:16 PM   #46
Start
Enthusiast
Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.
 
Start's Avatar
 
Posts: 36
Karma: 197564
Join Date: Dec 2012
Location: Solar System, planet Earth
Device: Kobo Aura HD
Quote:
Originally Posted by Toxaris View Post
Can you sent me an example file? It should not touch those characters at all.
That's right! Here attached you can see the Word file before (doc) and the file after (saved as html). You can see that the conversion changed those characters.
Attached Files
File Type: zip Example files.zip (36.2 KB, 100 views)
Start is offline   Reply With Quote
Old 12-19-2012, 05:35 PM   #47
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,182
Karma: 7180223
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
I did a quick test, but when I run the macro the characters remain. I am curious, something has happened to the export. The macro creates HTML, not MHT.
Toxaris is offline   Reply With Quote
Old 12-20-2012, 07:49 AM   #48
Start
Enthusiast
Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.
 
Start's Avatar
 
Posts: 36
Karma: 197564
Join Date: Dec 2012
Location: Solar System, planet Earth
Device: Kobo Aura HD
I "saved as" MHT for avoiding the html file and its folder, but the result is the same. In the html all is changed as you can see. If you have no problem it's logical to think of an automated option in my Office that I don't know where to deselect...
Unfortunately I don't know Word as I'm a simple user and not a professional as you.

I'll try to reinstall all Office by the original DVD. Only that I can do...

PS. Why my scan have text pages in a frame or table? But in conversion all is good as no table/frame appears. A very good Macro.

Last edited by Start; 12-20-2012 at 07:52 AM. Reason: for english
Start is offline   Reply With Quote
Old 12-20-2012, 09:30 AM   #49
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,182
Karma: 7180223
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
At the end a question is asked to save the file. Only use that option, since it is saved a special way. The frames are a result of ABBYY 11 and I convert them earlier, so I had no idea the macro would do that. It does make sense though.

So, use the save option of the macro and see if that works. It will not create a folder.
Toxaris is offline   Reply With Quote
Old 12-20-2012, 03:41 PM   #50
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,649
Karma: 15280959
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by Toxaris View Post
At the end a question is asked to save the file. Only use that option, since it is saved a special way. The frames are a result of ABBYY 11 and I convert them earlier, so I had no idea the macro would do that. It does make sense though.

So, use the save option of the macro and see if that works. It will not create a folder.
Tox:

If you use your export HTML macro on a badly-scanned Abbyy 11 scan, one that was done with the text frames, it removes them? Is that what I'm hearing? We get those funky text frames all the time, and although we have a macro that will nuke 'em, I'd much rather just use your (really divine, although there are still a few things I'd like added, myself) macro if that does it as well?

Hitch
Hitch is offline   Reply With Quote
Old 12-21-2012, 02:19 AM   #51
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,182
Karma: 7180223
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Apparently it does. I never tested it myself, I remove the frames in one of my other macro's.

What kind of things would you like to be added? If I think it is useful, there is a big chance I will incorporate it as you know.
Toxaris is offline   Reply With Quote
Old 12-21-2012, 11:19 AM   #52
Start
Enthusiast
Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.
 
Start's Avatar
 
Posts: 36
Karma: 197564
Join Date: Dec 2012
Location: Solar System, planet Earth
Device: Kobo Aura HD
Reinstalled Office entirely by DVD for avoiding any mistakes. I use Word 2010.

Then I have activated your last Macro (dowloaded from your post #1 with fixed center error).

Unfortunaly It doesn't work!

In Word after activating the Macro, and after 2 questions about "Remove bold layout" (yes) and and "Remove underlines" (yes) You can see immediately a screen of Visual Basic with a warning window in the center of the display.

It says "errors of programming - FOR WITHOUT NEXT" and so all is stopped by this problem. I can't continue and I have to abort the Macro process.
Start is offline   Reply With Quote
Old 12-21-2012, 03:47 PM   #53
sellew
Enthusiast
sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.
 
Posts: 30
Karma: 300
Join Date: Oct 2011
Location: Barcelona
Device: Sony PRS-650, PRS-T2
Quote:
Originally Posted by Start View Post
"errors of programming - FOR WITHOUT NEXT"
I found the same error: there is a Next missing in the Function replace_formating().

In the visual basic screen go at the end of the code of that function an insert the Next as shown here:

End If
Next
If Not (oRg Is Nothing) Then Set oRg = Nothing

End Function
sellew is offline   Reply With Quote
Old 12-21-2012, 04:20 PM   #54
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,182
Karma: 7180223
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
That is correct. I have updated the version to solve this small error. The mistake was made due to the fact that I maintain it originally in dutch and have a translated version. I forgot the next statement.
Like I said, the version in the startpost is correct again.
Toxaris is offline   Reply With Quote
Old 12-22-2012, 08:20 AM   #55
Start
Enthusiast
Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.
 
Start's Avatar
 
Posts: 36
Karma: 197564
Join Date: Dec 2012
Location: Solar System, planet Earth
Device: Kobo Aura HD
Quote:
Originally Posted by Toxaris View Post
Apparently it does. I never tested it myself, I remove the frames in one of my other macro's.

What kind of things would you like to be added? If I think it is useful, there is a big chance I will incorporate it as you know.
Would you like to integrate that Macro in this Macro?
Start is offline   Reply With Quote
Old 12-22-2012, 09:09 AM   #56
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,182
Karma: 7180223
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
No, it is part of my premacro which prepares output of ABBYY for further work. It actually has no place in the HTML export macro, since it has no real usage here.

I am willing to incorporate a lot, but it must have a place in the macro's usage (being HTML export). Somewhere in the new year I will see if I can publish some of the other macro's.
Toxaris is offline   Reply With Quote
Old 12-27-2012, 10:49 AM   #57
Start
Enthusiast
Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.
 
Start's Avatar
 
Posts: 36
Karma: 197564
Join Date: Dec 2012
Location: Solar System, planet Earth
Device: Kobo Aura HD
Hi everybody! Best Wishes to everybody!

I'm happy to tell you that my time spent in resolving the problem about Why Toxaris macro changes my pointing guillemets into simple Double Quotation Mark has been solved!

I'm NOT used to Macro or VBa but when I see that with a new fresh install of my original Office all is wrong, so I decided to solve this problem and if not, to avoid the macro... I have no Others chances, my books are 50years old and use a lot of pointing guillemets.

Moreover I tested Toxaris macro in a friends commercial office and in their corporate Office all is the same: all is wrong with the wrong carachters. I have no chance. To use or not to use the Toxaris macro?

As I don't know what written in a Macro, I simply deleted a paragraph of Macro in Modify window and tested what happening... then I see that without a piece of code all remained unchanged and so I discovered some stranges number codes in that lines. In internet I find out this marvellous page http://www.elizabethcastro.com/html/.../entities.html


After that I did a long research by Google and I discovered (thanks to Toxaris comments in english for having some words to use in internet) that some carachters have numbers for identifing them in HTML.

After a haedache I tried the "pointing guillemets" numbers instead of original numbers in the Macro and I found out all! All is good!!!!

I inserted these new lines in the Macro and all is ok! Now ALL is the same as the original scanned book.


The Macro code lines were before:

Code:
Function replace_quotes()
'Change smart quotes to HTML entity

Dim oRg As Range

Set oRg = ActiveDocument.Range
StatusBar = "Convert special characters to HTML code..."

With oRg.Find
    .ClearFormatting 
    .Text = "^0145" 
    .Replacement.Text = "‘" 
    .Execute replace:=wdReplaceAll, Wrap:=wdFindContinue 
End With

With oRg.Find
    .ClearFormatting 
    .Text = "^0146" 
    .Replacement.Text = "’" 
    .Execute replace:=wdReplaceAll, Wrap:=wdFindContinue 
End With

With oRg.Find
    .ClearFormatting 
    .Text = "^0147" 
    .Replacement.Text = "“" 
    .Execute replace:=wdReplaceAll, Wrap:=wdFindContinue 
End With

With oRg.Find
    .ClearFormatting 
    .Text = "^0148" 
    .Replacement.Text = "”" 
    .Execute replace:=wdReplaceAll, Wrap:=wdFindContinue 
End With

If Not (oRg Is Nothing) Then Set oRg = Nothing

End Function
and now I have inserted new lines and other comments as all is difficult for me and I hope you appreciate it (I write in my own Language and after that in english too, so no problem for mistakes in translating Macros).

Then I inserted new lines in the Toxaris Macro,
before:

Code:
Sub Transform_HTML()
' This macro converts the active document into a document with HTML tags for layout.
' Version 2.52 - Toxaris
' - fixed center
' - fixed handling empty headers
I've inserted also the right version of Toxaris, the 2.53 instead of 2.52. and now all is as follows:

Code:
Sub Transform_HMTL()
' This macro converts the active document into a document with HTML tags for layout.
' Version 2.54 - Toxaris
' - fixed 2 lost smart quotes to HTML entity causing bugs
' - more comments in smart quotes to HTML entity
' - translation in english of change center
' Version 2.53 - Toxaris
' - fixed center
' - fixed handling empty headers
I have translated from dutch into english this before:

Code:
   'centreer omzetten
    For Each para In ActiveDocument.Paragraphs
        If para.Alignment = wdAlignParagraphCenter Then
'            ParaText = Left(para.Range.Text, Len(para.Range.Text) - 1)
        para.Alignment = wdAlignParagraphLeft
        Set oRg = para.Range
         oRg.MoveEndWhile cset:=vbCr, count:=wdBackward    'enter niet meenemen
            oRg.InsertBefore "<center>"
            oRg.InsertAfter "</center>"
        End If
And using the Google translate I tried to understand what written by Toxaris but I don't understand the meaning, I'm not a skilled guy in coding. However I translated as follows:

Code:
   'change center
    For Each para In ActiveDocument.Paragraphs
        If para.Alignment = wdAlignParagraphCenter Then
'  WHY THIS LINE IS OFF ??? ParaText = Left(para.Range.Text, Len(para.Range.Text) - 1)
        para.Alignment = wdAlignParagraphLeft
        Set oRg = para.Range
         oRg.MoveEndWhile Cset:=vbCr, Count:=wdBackward    'enter not taken ???
            oRg.InsertBefore "<center>"
            oRg.InsertAfter "</center>"
        End If
I have even written "WHY THIS LINE IF OFF" because there is a character that colour all the line code in green and in a Microsoft site there is declared that all green lines are simple comments and not code lines. Maybe is a mistake? I say that because Toxaris usually comments everything and this line is not commented and so it'd be a code and not a comment... sorry but I hope to be useful.

Then I attach here this macro already ready in 2.54 version and I hope Toxaris can approve my work and also that all is ok. I thank you very much toxaris again for this clean work and Microsoft for its online dummies FAQ that permitted to me to debug my problem.

I hope to see this file in the first post by Toxaris and now... stop headache! And well, Best Wishes from me!

Last edited by Start; 12-28-2012 at 09:26 AM. Reason: For english
Start is offline   Reply With Quote
Old 12-27-2012, 04:42 PM   #58
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,182
Karma: 7180223
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
The changes seems ok, but should not necessary. The quote conversion is actually required for the normal quotes due to the fact that they have a certain usage in the normal code. The chevrons should have not. However, I have been surprised by Microsofts handling of regional settings before.
Don't worry about the correct translation of the comments. I can do them in an next version if you want. The commented line is an old line which has been replaced by some better code. Since it is commented, it is not being used.
Toxaris is offline   Reply With Quote
Old 12-27-2012, 06:33 PM   #59
Start
Enthusiast
Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.Start can program the VCR without an owner's manual.
 
Start's Avatar
 
Posts: 36
Karma: 197564
Join Date: Dec 2012
Location: Solar System, planet Earth
Device: Kobo Aura HD
Quote:
Originally Posted by Toxaris View Post
The changes seems ok, but should not necessary. The quote conversion is actually required for the normal quotes due to the fact that they have a certain usage in the normal code. The chevrons should have not. However, I have been surprised by Microsofts handling of regional settings before.
Don't worry about the correct translation of the comments. I can do them in an next version if you want. The commented line is an old line which has been replaced by some better code. Since it is commented, it is not being used.
Thank you for your reply, I hope my solved problem would be useful for who has the same troubles... when deciding to stop using your macro, I don't know how, the solution goes out...

I hope you can use that file for your next release.
Start is offline   Reply With Quote
Old 12-28-2012, 02:08 AM   #60
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Ah...Sweet! Thanks Toxaris!!
I had built up a bunch of macros over the years to do exactly what you have here. Did you know that when you upgrade windows on your computer (clean install) that your "normal" module does NOT get backed up with everything else??!!?? Needless to say I was rather upset that all that work was gone...but now I found this and that saved a bunch of work redoing it all.
I also liked how you accomplished some things - I've been working through the code for the last couple of hours. I added a couple things that you might like. Can I send this file to you? I'd rather not post it on here until you've had a chance to look it over - don't want to confuse anyone!! Cheers!
Turtle91 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 02:28 PM
Word 2007 macro scoplar Workshop 1 05-21-2011 06:00 AM
Doc to REB Macro for Word kbirdz Fictionwise eBookwise 0 10-27-2010 11:30 PM
Word Formatting Macro (Stingo's Macro) Stingo Sony Reader 75 08-24-2010 06:18 AM
Docvert 2.0 converts MS Word files to clean HTML Alexander Turcic Lounge 0 03-16-2006 05:50 AM


All times are GMT -4. The time now is 12:25 AM.


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