Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-01-2024, 08:18 AM
Shelley Lou Shelley Lou is offline VBA Footnote Issues Windows 10 VBA Footnote Issues Office 2016
Expert
VBA Footnote Issues
 
Join Date: Dec 2020
Posts: 259
Shelley Lou is on a distinguished road
Default VBA Footnote Issues

I found the code below on another post that formats footnotes with a tab. I seem to be having a couple of issues in that it removes the bold format from the Footnote Reference number and applies bold to the Footnote Text. How can I get the code to reverse this so the Footnote Reference is bold but the Footnote Text is not bold? I've checked the styles for both of these in the Styles Pane and they are set correctly eg Footnote Reference set as bold and Footnote Text set as not bold. I've also set the Footnote Text in the Styles Pane to be indented at 0.25" but could this be added to the code itself?

Footnote Image.JPG

Code:
Sub InsertFootnote()
ActiveDocument.Footnotes.Add Range:=Selection.Range
With Selection
.Paragraphs(1).Range.Font.Reset
.Paragraphs(1).Range.Characters(2) = ""
.InsertAfter vbTab
.Font.Bold = True
.Collapse wdCollapseEnd
End With
ActiveWindow.ScrollIntoView Selection.Range
End Sub

 
Sub InsertFootnoteNow()
ActiveDocument.Footnotes.Add Range:=Selection.Range
With Selection
.Paragraphs(1).Range.Font.Reset
.Paragraphs(1).Range.Characters(2) = ""
.InsertAfter vbTab
.Font.Bold = True
.Collapse wdCollapseEnd
End With
ActiveWindow.ScrollIntoView Selection.Range
End Sub

Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Footnote Issues How to remove extra space between footnote separator and 1st footnote. No para breaks present. Swarup Word 2 07-09-2022 07:42 PM
VBA Footnote Issues Macro to change font size of Footnote Reference in Footnote Text TheBigBoss Word VBA 5 06-10-2022 06:14 AM
VBA Footnote Issues Footnote references in the footnote section losing their style when cut+pasted from same doc emblaw Word 4 12-08-2020 06:23 AM
VBA Footnote Issues Removing line break and indentation between footnote number and footnote text in Word jaanross Word 5 02-06-2020 12:04 AM
VBA Footnote Issues 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 01:08 PM.


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