![]() |
#1 |
Member
![]() 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 |
![]() |
![]() |
![]() |
#2 |
Member
![]() 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! |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
WWHALD
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,879
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! |
![]() |
![]() |
![]() |
#4 |
Member
![]() 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. ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |