02-10-2017, 06:29 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2017
Device: iphone
|
vba code for accessible books
hello sirs
i'm new member here, wish you help me i'm visually impaired, so would like to modify some files to be more accessible for me and others, first thing, need to convert all footnotes and endnotes in a word file into normal text only start by FN for footnote and EN for endnote. also convert its reference number inside text to normal (#) thanks very much for your support |
02-11-2017, 12:09 AM | #2 |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Not sure exactly what you are looking for.
What do you mean by converting FN/EN to "normal" text or normal number? How is it formatted now and what is your definition of normal? What software are you using? What format are your books currently? Welcome to MR! |
02-11-2017, 01:04 AM | #3 | |||
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
E.g. Instead of: Quote:
Quote:
|
|||
02-11-2017, 03:17 AM | #4 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
This can be done with VBA, but I haven't worked with VBA for ages.
|
02-11-2017, 07:54 AM | #5 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2017
Device: iphone
|
vba macro for word
hello
yes i want to embed footnote and endnote definitions in the body text and put "fn" / "en" before the text to be known its footnote / endnote. am using microsoftword file.doc thanks |
02-11-2017, 08:25 AM | #6 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
@egyblind:
It might be possible to create a Calibre plugin that'll embed footnote/endnote definitions in the body text. Maybe you could ask about it in the Calibre Plugin Ideas thread? I've got a couple of additional questions: 1. Have you already created a couple of MS Word documents with footnote references in them that you want to convert or do you create these documents from scratch as needed? 2. What tool do you use to convert MS Word documents to epub books? 3. Did you investigate whether iBooks Author has any accessibility features that'll mark up footnote/endnote definitions so that they're automatically read by VoiceOver? |
02-11-2017, 11:42 AM | #7 | |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2017
Device: iphone
|
word macro
hello Doitsu
i need to do this in word files .doc and .docx and will read them on windows pc on ms-word the documents i've contains footnotes and endnotes + other objects but i not like to write long topic for this asked about footnotes and endnootes only. all i need vba macro for word. thanks Quote:
|
|
02-11-2017, 02:18 PM | #8 | |
Imperfect Perfectionist
Posts: 464
Karma: 724664
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
|
Quote:
Code:
'--------------------------------------------------------------------------------------- ' Method : Notes2Inline ' Author : Kim ' Date : 11-02-2017 ' Purpose: Convert footnotes/endnotes to inline text '--------------------------------------------------------------------------------------- Sub Notes2Inline() Dim oFNs As Footnotes Dim oFN As Footnote Dim oENs As Endnotes Dim oEN As Endnote Dim oRng As Range Dim strFNText As String Dim strENText As String Dim lngIndex As Long 'variable for note number. If not wanted, remove _ " & lngIndex & " (including qoutation marks) from the With oRng.Text lines below Set oFNs = Word.ActiveDocument.Footnotes For Each oFN In oFNs strFNText = oFN.Range.Text lngIndex = lngIndex + 1 Set oRng = ActiveDocument.Range With oRng.Find .Text = "^f" ' Looks for all footnotes .Forward = True .Wrap = wdFindStop If .Execute Then oFN.Delete With oRng .Text = " [Footnote " & lngIndex & ": " & strFNText & "]" .Font.Color = wdColorDarkBlue 'Color text taken from endnotes blue End With End If End With 'Uncomment to disable undo to save memory on very large documents. 'ActiveDocument.UndoClear Next Set oENs = Word.ActiveDocument.Endnotes For Each oEN In oENs strENText = oEN.Range.Text lngIndex = lngIndex + 1 Set oRng = ActiveDocument.Range With oRng.Find .Text = "^e" ' Looks for all endnotes .Forward = True .Wrap = wdFindStop If .Execute Then oEN.Delete With oRng .Text = " [Endnote " & lngIndex & ": " & strENText & "]" .Font.Color = wdColorDarkRed 'Color text taken from endnotes red End With End If End With 'Uncomment next line to disable undo to save memory on very large documents. 'ActiveDocument.UndoClear Next End Sub Regards, Kim |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Store Code etc for technical books | skorasaurus | Library Management | 5 | 12-29-2016 06:03 PM |
84 percent of top 1,000 titles available as accessible e-books, study finds | Alexander Turcic | News | 5 | 08-31-2013 11:27 PM |
Books on Board 40% off code | artifact | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 11-20-2012 02:38 AM |
Where do YOU store the code that goes with technical books? | technomom | Library Management | 10 | 03-25-2011 03:38 PM |
need vba/word scripting help to turn inline text into header | Bierkonig | Workshop | 3 | 01-09-2009 09:40 PM |