![]() |
#4
|
|||
|
|||
![]()
RobiNew,
We will have to agree to disagree. The code you posted doesn't work to do anything. Start with a document with 1 footnote. Code:
Sub ScratchMacro() 'Here is your code. If you try to run it, you will see it does nothing but error With ftNote.Range .InsertBefore supLetter 'i.e. the letter a .Characters(1).Font.Superscript = True End With lbl_Exit: Exit Sub End Sub Sub ScratchMacro2() 'Here is your code modified with variables declared and defined. 'No erorrs and doing what you decribed. Dim ftNote As Footnote Dim supLetter As String Set ftNote = ActiveDocument.Footnotes(1) supLetter = "a" With ftNote.Range .InsertBefore supLetter 'i.e. the letter a .Characters(1).Font.Superscript = True End With 'As you see, this does nothing to the actual reference in the document body. lbl_Exit: Exit Sub End Sub Sub ScratchMacro3() 'A basic Word Macro coded by Gregory K. Maxey 'This is my code. It gives the illusion that the reference number has been changed from 1 to 1a, but 'has no affect on the actual reference number in the document body. Dim ftNote As Footnote Dim supLetter As String supLetter = "a" Set ftNote = ActiveDocument.Footnotes(1) With ftNote .Range.Characters.First.Previous.Delete .Range = supLetter & " " & .Range .Range.Characters.First.Font.Superscript = True End With lbl_Exit: Exit Sub End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word Macro to Find a phrase followed by a number and a lower case letter, capitalizing the letter | rekent | Word VBA | 2 | 01-14-2025 01:45 PM |
Using text frames in the Footnote area | RRB | Word | 9 | 12-07-2023 02:30 AM |
![]() |
TheBigBoss | Word VBA | 5 | 06-10-2022 06:14 AM |
![]() |
jaanross | Word | 5 | 02-06-2020 12:04 AM |
![]() |
NoCalScribe | Word VBA | 3 | 07-15-2019 07:20 PM |