Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 08-09-2025, 08:28 AM
gmaxey gmaxey is offline Insert a letter 'a' after the reference number in the footnote area Windows 10 Insert a letter 'a' after the reference number in the footnote area Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

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
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
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
Insert a letter 'a' after the reference number in the footnote area Macro to change font size of Footnote Reference in Footnote Text TheBigBoss Word VBA 5 06-10-2022 06:14 AM
Insert a letter 'a' after the reference number in the footnote area Removing line break and indentation between footnote number and footnote text in Word jaanross Word 5 02-06-2020 12:04 AM
Insert a letter 'a' after the reference number in the footnote area Adding footnote number as part of footnote text NoCalScribe Word VBA 3 07-15-2019 07:20 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:46 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