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

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 11-06-2007, 02:36 PM   #61
JohnP
Enthusiast
JohnP began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2007
Location: Mancehster, CT
Device: Sony Prs505
What a mess! Gotta work with this some!

So I got the macro copied fine and created the macro. Took a completed ebook that was formatted just right in BD, copied it to word and ran the macro. UGGGH! No more paragraphs, spaces, titles, etc. My first macro so I guess I will just have to learn a bit and selectively use it in Word 2007. Heh!
"What I don't know about Macros would fill a book."
JohnP is offline   Reply With Quote
Old 11-06-2007, 03:46 PM   #62
Strether
Addict
Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.Strether ought to be getting tired of karma fortunes by now.
 
Strether's Avatar
 
Posts: 395
Karma: 848413
Join Date: Feb 2007
Location: Fresno
Device: Kindle 1, 3, PW2, Kindle 7" HD Fire
Hopefully, some more knowledgeable person will weigh in on this. My first attempts at using Stingo's macro were on things published on the web and available only in text and it gave the same results: a solid block of words without paragraphs -- pages and pages of it. But I've since used the macro on books in Gutenburg that were only available in text and it worked beautifully. So some things don't work with that macro. No idea why not.

Jim
Strether is offline   Reply With Quote
 
Enthusiast
Old 11-06-2007, 03:50 PM   #63
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,124
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The problem is that some txt files use a empty line to indicate paragraph changes while some use indented texts. A particular cleanup method, like Stingo's macro will assume one technique and work well on files that follow that convention.
kovidgoyal is offline   Reply With Quote
Old 11-14-2007, 11:12 PM   #64
Stephanos
Connoisseur
Stephanos doesn't litterStephanos doesn't litter
 
Posts: 58
Karma: 133
Join Date: Oct 2007
Location: Minnesota, USA
Device: EB-1150, PRS-505, NST
Someone a while back asked about a Word macro to convert text marked with underscores to italics. This code works for me:

Code:
Sub UnderscoresToItalics()
'
' UnderscoreToItalics Macro
' Macro recorded 11/14/2007 by Stephen Lins
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "_<*_"
        .Replacement.Text = "^&"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .Replacement.Font.Italic = wdToggle
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "_"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

End Sub
Stephanos is offline   Reply With Quote
Old 11-15-2007, 04:37 AM   #65
astra
The Introvert
astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.astra ought to be getting tired of karma fortunes by now.
 
astra's Avatar
 
Posts: 8,308
Karma: 1000077497
Join Date: Jan 2007
Location: United Kingdom
Device: Sony Reader PRS-650 & 505 & 500
Could someone tell me how to use this code?
or point to a book/internet where I can read about it?

I think it is called macros? I have no idea how to use them...
astra is offline   Reply With Quote
Old 11-15-2007, 07:01 PM   #66
Stephanos
Connoisseur
Stephanos doesn't litterStephanos doesn't litter
 
Posts: 58
Karma: 133
Join Date: Oct 2007
Location: Minnesota, USA
Device: EB-1150, PRS-505, NST
astra_lestat, macros are programs that run within a particular application and automate a process that the user would otherwise have to do manually each time. The macros in this thread are for Microsoft Word. See this post: http://www.mobileread.com/forums/sho...5&postcount=18 earlier in this thread to learn how to use macros within Word.
Stephanos is offline   Reply With Quote
Old 01-13-2008, 03:14 AM   #67
JohnP
Enthusiast
JohnP began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2007
Location: Mancehster, CT
Device: Sony Prs505
I need to convert text that has unwanted Paragraph breaks in the middle of sentences, like this (I is indent and P is Paragraph break)
I 'Are you a doctor, sir?' His voice held polite disbelief, which it was P
I entitled to, no doubt. I shook my head impatiently. He glanced at P
I Donald, pursed his lips, and turned back to me. His gaze wandered P
I briefly over my jeans, faded denim jacket, polo-neck, and desert P
I boots, and returned to my face, unimpressed. P

to Regular paragraphs like this:

I 'Are you a doctor, sir?' His voice held polite disbelief, which it was entitled to, no doubt. I shook my head impatiently. He glanced at Donald, pursed his lips, and turned back to me. His gaze wandered briefly over my jeans, faded denim jacket, polo-neck, and desert boots, and returned to my face, unimpressed. P
Is there a way to do it in VB?
JohnP is offline   Reply With Quote
Old 01-22-2008, 05:41 PM   #68
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,682
Karma: 18475502
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
JohnP, do you have a line space to delineate the start of the next paragraph or some way to tell where the next paragraph starts? If not, you can't do it by a software method.
JSWolf is offline   Reply With Quote
Old 01-24-2008, 09:07 AM   #69
Icarusbop
Groupie
Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.
 
Posts: 156
Karma: 25846
Join Date: Apr 2007
Location: UK
Device: PRS505
New Macro for formatting books

All:

Over some time during converting some paper books to electronic edition I have developed my own set of macros for repairing book files.
It does the following.....

removes forced CR's (the macro tries to find paragraphs by looking at the end of the proceding line for valid 'end of paragraph patterns' like the full stop for example. Although not infallible I found it works a treat for general documents.)
removes multiple spaces and loops until all gone
set entire doc font
removes multiple rejection characters
fixes lower case ' i ' to ' I '
looks for and highlights (for review) anomolous single lower case letters and numbers.
fixes common ocr punctuation errors
marks for review other common ocr mistakes.
when it finishes it sets the word 'find' field the to (common) ocr rejection characater '~'. so you can start hitting 'find next' to review anything highlighted

various other bits and bats.

This macro will probably break anything with formulas in it and poetry.
It's relatively easy to follow if you read it slowly, you should be able to customise it to your own needs.
If your completely clueless as to macro code and don't want to read through it, backup your file before using! ( in fact, backup your files anyway!)

It will make a little mess of chapter lines - so they will need to be reviewed after running.

I've attached it to this post, I have added comments to it to help clarify what each part does. The file contains a lot of little macros each doing a seperate part, to run them all in order there is a macro called 'main' assign this to a toolbar button and away you go!
Attached Files
File Type: rar FixBook.rar (2.7 KB, 700 views)
Icarusbop is offline   Reply With Quote
Old 01-25-2008, 12:50 PM   #70
JohnP
Enthusiast
JohnP began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2007
Location: Mancehster, CT
Device: Sony Prs505
Quote:
Originally Posted by JSWolf View Post
JohnP, do you have a line space to delineate the start of the next paragraph or some way to tell where the next paragraph starts? If not, you can't do it by a software method.
As a matter of fact, there are spaces between paragraphs. However, I could just highlight the offending paragraph (lot of work that would be too!)
JohnP is offline   Reply With Quote
Old 05-09-2008, 08:01 PM   #71
andylou17
Junior Member
andylou17 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2008
Device: sony
problem using in office 2007

i don't know how to apply to office 2007
it keep brings me this pop up screen, how do i disable?
andylou17 is offline   Reply With Quote
Old 05-09-2008, 08:12 PM   #72
RWood
Technogeezer
RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.
 
RWood's Avatar
 
Posts: 7,233
Karma: 1601464
Join Date: Nov 2006
Location: Virginia, USA
Device: Sony PRS-500
Quote:
Originally Posted by andylou17 View Post
i don't know how to apply to office 2007
it keep brings me this pop up screen, how do i disable?
Er, what pop-up screen? We might be able to help if we knew what the problem was.

BTW: Welcome to MobileRead.
RWood is offline   Reply With Quote
Old 05-22-2009, 05:53 PM   #73
Stratogirl
Member
Stratogirl began at the beginning.
 
Stratogirl's Avatar
 
Posts: 13
Karma: 10
Join Date: Apr 2009
Device: Amazon Kindle 3
I just tried this macro and I am getting this error on Word:

Compile error:
Syntax error

and it highlights the line:

title_author_form.Authorbox = ActiveDocument.BuiltInDocumentProperties("Author") .Value


Can someone help me solve this problem, please?
Stratogirl is offline   Reply With Quote
Old 05-23-2009, 06:49 PM   #74
tcomeau16
Junior Member
tcomeau16 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2009
Device: PRS-505
Remove space to fix macro

Hi Strato girl,

I installed the macro last night and got that error as well. There is a typo in the code. Just remove the un-needed space before ".Value" and save it. It should work after that.

title_author_form.Authorbox = ActiveDocument.BuiltInDocumentProperties("Author")_.Value

tcomeau16
tcomeau16 is offline   Reply With Quote
Old 05-27-2009, 05:38 AM   #75
Stratogirl
Member
Stratogirl began at the beginning.
 
Stratogirl's Avatar
 
Posts: 13
Karma: 10
Join Date: Apr 2009
Device: Amazon Kindle 3
Quote:
Originally Posted by tcomeau16 View Post
Hi Strato girl,

I installed the macro last night and got that error as well. There is a typo in the code. Just remove the un-needed space before ".Value" and save it. It should work after that.

title_author_form.Authorbox = ActiveDocument.BuiltInDocumentProperties("Author")_.Value

tcomeau16
Thank you!
I will correct it and try again.
Stratogirl is offline   Reply With Quote
Reply

Tags
content, conversion, formatting

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
Macro photos of Vizplex E Ink Magnesus General Discussions 4 04-23-2010 03:04 PM
Spelling Macro PieOPah Workshop 36 12-13-2008 02:27 AM
Emdash - punctuation macro ProDigit Sony Reader 8 11-28-2008 02:32 AM
Macro help - Itals from txt edbro Sony Reader 14 11-16-2007 07:47 PM


All times are GMT -4. The time now is 06:44 AM.


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