Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-12-2017, 05:07 PM
macropod's Avatar
macropod macropod is offline How to change superscript footnotes into genuine Word footnotes Windows 7 64bit How to change superscript footnotes into genuine Word footnotes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Did you compare the attachments in posts #1 & #8? You'll see from them that, if the instructions in post #2 are followed exactly, the process works as described.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 07-12-2017, 06:16 PM
iwonder iwonder is offline How to change superscript footnotes into genuine Word footnotes Windows 10 How to change superscript footnotes into genuine Word footnotes Office 2013
Novice
 
Join Date: Jun 2017
Location: France
Posts: 10
iwonder is on a distinguished road
Default

Paul, thanks for replying

I did follow your explainations, but in the test file sent by Knoute29, footnotes are gathered together, and yes, it works fine if selected in a row (altogether).

But when notes are disseminated (scattered?) in the text (as they are in my converted files), i have to select them with the Ctrl key, and in that case, i found that it doesn't work
Am I right ?

Quote:
Originally Posted by macropod View Post
Did you compare the attachments in posts #1 & #8? You'll see from them that, if the instructions in post #2 are followed exactly, the process works as described.
Reply With Quote
  #3  
Old 07-12-2017, 06:32 PM
iwonder iwonder is offline How to change superscript footnotes into genuine Word footnotes Windows 10 How to change superscript footnotes into genuine Word footnotes Office 2013
Novice
 
Join Date: Jun 2017
Location: France
Posts: 10
iwonder is on a distinguished road
Default

Below are the code and sample text used :
Did I made a mistake ?

Code:
Sub ReLinkFootNotes()
    Dim i As Integer, j As Integer, k As Integer, l As Integer, FtRng As Range
    Application.ScreenUpdating = False
    With ActiveDocument
        Set FtRng = Selection.Range
        With FtRng
            .Style = "Note de bas de page"
            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
                .Text = "([0-9]{1;})"
                .Replacement.Text = "\1"
                .Forward = True
                .Wrap = wdFindStop
                .Format = False
                .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
Attached Files
File Type: doc testfile.doc (66.5 KB, 18 views)
Reply With Quote
  #4  
Old 07-12-2017, 07:35 PM
macropod's Avatar
macropod macropod is offline How to change superscript footnotes into genuine Word footnotes Windows 7 64bit How to change superscript footnotes into genuine Word footnotes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by iwonder View Post
But when notes are disseminated (scattered?) in the text (as they are in my converted files), i have to select them with the Ctrl key, and in that case, i found that it doesn't work
With footnotes, you can only process them on one page at a time (i.e. you can't select them across multiple pages) and you have to select the footnotes concerned for processing.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 07-14-2017, 01:13 PM
iwonder iwonder is offline How to change superscript footnotes into genuine Word footnotes Windows 10 How to change superscript footnotes into genuine Word footnotes Office 2013
Novice
 
Join Date: Jun 2017
Location: France
Posts: 10
iwonder is on a distinguished road
Default

Having spent a lot of time on your code, I'm 99% sure that a punctuation mark must precede the footnote calling number to make it correctly work.

"This is a sentence.1 This"
will work

"This is a word1 followed by the rest of the sentence."
will not work

I read many English text where the footnote calling number is located at the end of a sentence, just after the period. Maybe this is a rule of thumb in English typography. (Is it ?)
But in my native language, it is not ; footnote calling numbers can be anywhere in a sentence.
Reply With Quote
  #6  
Old 07-15-2017, 05:09 AM
macropod's Avatar
macropod macropod is offline How to change superscript footnotes into genuine Word footnotes Windows 7 64bit How to change superscript footnotes into genuine Word footnotes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Well, it was you who wrote:
Quote:
Originally Posted by iwonder View Post
Having spent a lot of time on your code, I'm 99% sure that a punctuation mark must precede the footnote calling number to make it correctly work.
And that complaint has nothing to do with my code. Accordingly, it can only be understood as an unwarranted criticism or a complete irrelevance. You choose.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change superscript footnotes into genuine Word footnotes Word footnotes and track changes problem Carnegie Word 14 03-13-2017 01:31 AM
Convert manual cross references in footnotes to other footnotes to automatic cross references ghumdinger Word VBA 7 11-20-2014 11:47 PM
How to change superscript footnotes into genuine Word footnotes word 2007 - footnotes and text box glggluig Word 1 08-10-2014 04:09 AM
How to change superscript footnotes into genuine Word footnotes Corrupted footnotes in Word mythander889 Word 12 09-11-2012 03:58 PM
How to change superscript footnotes into genuine Word footnotes Can Word automatically update footnotes? gib65 Word 2 08-15-2011 01:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft