#1
|
|||
|
|||
Manual Footnotes to Automatic Footnotes
Hello there,
I have a Word document (book) (Written in Arabic) that will be placed into InDesign, but there are two problems, I hope someone could help me (I can't share the book, but I will share examples I have created to illustrate the problem): Number 1: Footnotes are manually inserted. The person who wrote it didn't used Footnotes feature in Word, instead he used superscribts and put it between parenthesis, then at the end of the document typed all the references. Like this: (Numbers wrote in Arabic or as Word called it Hindi) And the references are at the end of page not in the footer: So I want to convert those manual footnotes to automatic footnotes, and should be between parenthesis as seen in images. Number2: Some of the numbers in the reference are written in English numeral system (see below image). So I want first to change all English numbers to Arabic numbers first before I make the footnotes automatic. I have attached two files, first one is the example with manual footnotes and the second after I manually made automatic footnotes (I didn't know how to make the footnotes between parenthesis). These files examples to illustrate the result I want to achieve. Some Info:
Thank you. |
#2
|
|||
|
|||
While searching, I did try this code here:
Code:
Sub ReLinkFootNotes() Dim i As Long, j As Long, k As Long, l As Long, FtRng As Range Application.ScreenUpdating = False With ActiveDocument Set FtRng = Selection.Range With FtRng .Style = "Footnote Text" With .Find .ClearFormatting .Replacement.ClearFormatting ' Change '[' and ']' on the next line to whatever is appropriate if the selected ' footnotes' numbers are enclosed in characters other than square brackets ' (e.g. .Text = "([0-9]{1,})" if there are no brackets) .Text = "\[([0-9]{1,})\]" .Replacement.Text = "\1" .Forward = True .Wrap = wdFindStop .Format = True ' Delete the next line if the footnote references are not superscripted. .Font.Superscript = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True .Execute Replace:=wdReplaceAll End With k = .Paragraphs(1).Range.Words(1) - 1 j = k l = ActiveDocument.Footnotes.Count - k For i = 1 To .Paragraphs.Count If .Paragraphs(i).Range.Words(1) = j + 1 Then j = j + 1 End If Next i End With For i = k + 1 To j StatusBar = "Finding Footnote Location: " & i + l With .Content.Find ' Change '"[" & i & "]"' string on the next line to whatever is appropriate ' if the in-line references are not enclosed in square brackets .Text = "[" & i & "]" ' Delete/comment out the next line if not applicable .Font.Superscript = True .MatchWholeWord = True .MatchWildcards = False .Execute If .Found = True Then .Parent.Select With Selection .Delete .Footnotes.Add Range:=Selection.Range, Text:="" End With End If End With Next i With FtRng For i = k + 1 To j StatusBar = "Transferring Footnote: " & i + l With .Paragraphs(1).Range .Cut With ActiveDocument.Footnotes(i + l).Range .Paste .Words(1).Delete .Characters.Last.Delete End With End With Next i On Error Resume Next End With Set FtRng = Nothing End With Application.ScreenUpdating = True End Sub Code:
"\[([0-9]{1,})\]" Code:
"\(([0-9]{1,})\)" |
#3
|
|||
|
|||
There is someone called Sueud Aleaqil created a collection of macros that process multiple cases, and this one of them, where he convert manual footnotes to automatic, although it converted it without the current format, but it did it.
This is it (Arabic) التحميل المجاني - الدكتور سعود بن عبدالعزيز العقيل For converting English numbers to Arabic, there is a macro in that collection too, but I found number 1 in my document is in English and won't convert, so I converted it to Arabic manually. It couldn't be converted automatically for some reason, it wasn't a normal number, because when I show the paragraph marks, there was a dotted rectangle around the number! Thank you. |
Tags |
footnote style |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert static superscript footnotes to dynamic footnotes | glmcmillan | Word VBA | 1 | 09-05-2022 06:53 AM |
Request for a macro to move footnotes (not formatted as footnotes) from end of page to end of doc | Pluckedchicken | Word VBA | 0 | 09-03-2020 05:21 AM |
How to change superscript footnotes into genuine Word footnotes | Knounte29 | Word VBA | 41 | 01-16-2020 04:48 PM |
creating manuscript w/footnotes from separate documents containing chapters with footnotes-word 2010 | Dottie | Publisher | 0 | 02-19-2017 03:18 PM |
Convert manual cross references in footnotes to other footnotes to automatic cross references | ghumdinger | Word VBA | 7 | 11-20-2014 11:47 PM |