Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2024, 06:31 AM
akw akw is offline Footnote style Windows 10 Footnote style Office 2021
Novice
Footnote style
 
Join Date: Feb 2024
Posts: 1
akw is on a distinguished road
Default Footnote style


I would like there to be a tab between the footnote reference and the footnote text embedded in the Word Style so that the footnote looks like the picture attached.

I created the attachment manually and have not found a way to include it as a inbuilt Word Style.
Attached Images
File Type: png Footnote_tab.PNG (3.1 KB, 18 views)
Reply With Quote
  #2  
Old 02-18-2024, 12:10 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Footnote style Windows 11 Footnote style Office 2021
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Word doesn't provide a simple way to do this. You will have to "intervene" by using a couple of macros.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #3  
Old 02-18-2024, 12:36 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Footnote style Windows 11 Footnote style Office 2021
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

You can set a hanging indent for your Footnote Text style and then add the following pair of macros to your Normal.dotm:

Sub InsertFootnote()
'Codefrom wordmvp.com, modified by Stefan Blom
ActiveDocument.Footnotes.Add Range:=Selection.Range

With Selection
.Paragraphs(1).Range.Font.Reset
.Paragraphs(1).Range.Characters(2) = ""
.InsertAfter "." & vbTab
.Collapse wdCollapseEnd
End With
ActiveWindow.ScrollIntoView Selection.Range

End Sub

Sub InsertFootnoteNow()
'Code from wordmvp.com, modified by Stefan Blom
ActiveDocument.Footnotes.Add Range:=Selection.Range

With Selection
.Paragraphs(1).Range.Font.Reset
.Paragraphs(1).Range.Characters(2) = ""
.InsertAfter "." & vbTab
.Collapse wdCollapseEnd
End With
ActiveWindow.ScrollIntoView Selection.Range
End Sub



The macros will override the built-in commands to add footnotes and run the code instead. They will apply to future footnotes that you create in Word.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional

Last edited by Stefan Blom; 02-19-2024 at 01:34 AM.
Reply With Quote
  #4  
Old 02-19-2024, 01:52 AM
RRB's Avatar
RRB RRB is offline Footnote style Windows 11 Footnote style Office 2021
Susan Flamingo
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 263
RRB is on a distinguished road
Default Footnote style

Are you saying that you can intercept built-in Word commands and customize their behavior?

So if I hit ctrl+alt+f (insert footnote) it will execute your code as opposed to the built in behavior?

Where are all the Word "events" documented, with their exact names? So if I want to run a macro that when a certain file opens you get a message box: "You better get working faster because you are falling behind", where can I learn about the file/open "event"?

Total Newbie to VBA/Word macros, please be patient and excuse my cosmic ignorance.

Thank you and have a good day!

Susan Flamingo
Reply With Quote
  #5  
Old 02-19-2024, 02:57 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Footnote style Windows 11 Footnote style Office 2021
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Yes, you can intercept any built-in Word command.

Display the Visual Basic Editor by pressing Alt+F11 (or Alt+Fn+F11 on some keyboards). On the main menu, click View > Project Explorer (if necessary). Click the Normal project (which is a representation of the Normal template). Add a new Module from the Insert menu. Paste in the code from my previous message. Click the Save icon.
Attached Images
File Type: png visualBasicEditor.png (71.1 KB, 12 views)
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #6  
Old 02-19-2024, 03:02 AM
RRB's Avatar
RRB RRB is offline Footnote style Windows 11 Footnote style Office 2021
Susan Flamingo
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 263
RRB is on a distinguished road
Default

Thank you.

But where would you advise me to go to learn on all built-in Word command end events like when a doc is opened?

Thank you
Reply With Quote
  #7  
Old 02-19-2024, 03:21 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Footnote style Windows 11 Footnote style Office 2021
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

For a list of commands, open the Macros dialog box (press Alt+F8 or Alt+Fn+F8) and choose the "Word commands" category for "Macros in."

Note that it might be a bit trickier to find out which command you need to intercept for a given task.
Attached Images
File Type: png Macros_dialog_box.png (32.7 KB, 12 views)
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #8  
Old 02-20-2024, 04:17 AM
RRB's Avatar
RRB RRB is offline Footnote style Windows 11 Footnote style Office 2021
Susan Flamingo
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 263
RRB is on a distinguished road
Default

Thank you very much for the info. I also learned that if you type: ctrl + alt + (the plus key on the number pad) the cursor changes to a clover and whatever menu you choose you will get the command that it executes.

Regarding the macro you wrote of hanging footnotes:

Could this handle:
1. Asking the user what character should be on the left of the FN referer (something like the open parentheses char( and what char should be on the right of the referer, like the close parentheses) or [ ] and then insert the FN referer with those chars and then in the FN area open a footnote with the FN "referee" also within those chars.

I know this can be done by finding anf replace after the fact but having this in real-time would be totally cooooooooool.

I know you and others have better things to do than write code for a lazy gall like myself, but if you have an extra few minutes to do it I would be most appreciative!

Thank you and have a good day!

Susan Flamingo
Reply With Quote
  #9  
Old 02-25-2024, 12:49 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Footnote style Windows 11 Footnote style Office 2021
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

You should post this a new question.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Footnote style How to remove extra space between footnote separator and 1st footnote. No para breaks present. Swarup Word 2 07-09-2022 07:42 PM
Restarting footnote and endnote numbering? Can I have a style that starts a new section? RRB Word 3 10-14-2021 12:51 PM
Footnote style Changing the default footnote reference style: [1] RRB Word 2 06-10-2021 04:04 PM
Footnote style Footnote references in the footnote section losing their style when cut+pasted from same doc emblaw Word 4 12-08-2020 06:23 AM
Footnote style Is there a way programmatically to determine the footnote number style, if other than arabic numbers gn4619 Word VBA 2 11-23-2015 11:00 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:59 PM.


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