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

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 01-09-2009, 01:06 PM   #1
Bierkonig
Member
Bierkonig began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Dec 2008
Device: Sony PRS-700
need vba/word scripting help to turn inline text into header

I'm going about scanned (out of copyright!) text conversion to ebook in a very different way than most because i'm using reference texts and need to retain page numbers and section titles and a lot of formatting to make the texts useful.

I'm converting everything to RFT and then to PDF properly sized for my sony reader (prs-700). Here's my problem: in the RFT the first two lines after every section/page break (every second or third page) are text (a constantly changing text string) that I want to move into a header specific to the first page of that section. The two lines of text are separated by a hard return.

Can anyone help me figure out a vba script that would scan for section breaks, take those first two lines of text that immediately follow, and move those lines into a header that would default to a first-page-only header? The ideal would convert:

section break (next page)
A
B
text


into


section break (next page)
header: A B

text


thank you!

Last edited by Bierkonig; 01-09-2009 at 01:13 PM. Reason: clarification
Bierkonig is offline   Reply With Quote
Old 01-09-2009, 06:57 PM   #2
Bierkonig
Member
Bierkonig began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Dec 2008
Device: Sony PRS-700
followup, simplification

Hello,

In the absence of anyone ready to tackle my problem using VBA, I realize I don't really need to put the A B text into new headers, so perhaps this can be solved just using features of Word's find/replace that I don't yet understand. Thus, can anyone tell me how to turn

section break (next page)
A
B
text


into


section break (next page)
A B

text


Again, A and B change several hundred times throughout the document . Sometimes A is word or several words and B is a page number, sometimes it's the reverse, **the only this that is consistent is that A and B are separated by a single hard return and are the first two lines after each section break**.

thank you!
Bierkonig is offline   Reply With Quote
 
Enthusiast
Old 01-09-2009, 07:06 PM   #3
ShortNCuddlyAm
WWHALD
ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.ShortNCuddlyAm ought to be getting tired of karma fortunes by now.
 
ShortNCuddlyAm's Avatar
 
Posts: 7,881
Karma: 337114
Join Date: Sep 2008
Location: Mitcham, Surrey, UK
Device: iPad. Selling my silver 505 here
I suspect using a vba script would be the easiest/most flexible way of doing it, rather than trying to get find and replace to do it.

What version of Word are you using? I may be able to have a look at this in the next couple of days or so, but I am a lot more familiar with using vba for Excel than Word, so I'm not promising anything!
ShortNCuddlyAm is offline   Reply With Quote
Old 01-09-2009, 09:40 PM   #4
Bierkonig
Member
Bierkonig began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Dec 2008
Device: Sony PRS-700
word version

I have both Word 2008 (mac) and Word 2007 (xp). Any advise would be hugely appreciated.

thanks.

Bierkonig is offline   Reply With Quote
Reply

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
PDF Conversion - Removing Header / Footer Text heb Sony Reader 9 07-11-2010 11:02 PM
inline page markers overtop of text?? Stinger Kobo Reader 9 05-28-2010 05:42 PM
Calibre email inline text? squawker Calibre 2 05-26-2010 06:17 PM
missing lines of text on page turn anton980 Sony Reader 5 05-26-2009 12:49 PM


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


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