Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Add tabulation to every footnote
Hi all,
I would like to every footnote in my Word document to start with a tabulation. The best idea is to probably write a macro which would check if a footnote starts with a tab and if it doesn't a tabulation should be added to avoid adding more than one tab. Could you provide me with a such macro, please? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Add tabulation to every footnote
If you mean that you want the first line to be indented, you could just add
a first line indent to the Footnote Text style. On the other hand, if you are saying that you want a tab character *after* the footnote number, then post back. -- Stefan Blom Microsoft Word MVP "menteith" wrote in message ... Hi all, I would like to every footnote in my Word document to start with a tabulation. The best idea is to probably write a macro which would check if a footnote starts with a tab and if it doesn't a tabulation should be added to avoid adding more than one tab. Could you provide me with a such macro, please? -- menteith |
#3
|
|||
|
|||
Could you tell me how to do this? I checked I do not see this option.
|
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Add tabulation to every footnote
You can modify the Footnote Text style so that it includes a hanging indent
and then make use of macros to insert the notes. Use the following macro and store it in the Normal template (for assistance, see http://www.gmayor.com/installing_macro.htm): Sub InsertFootnoteNow() 'Code by Dave Rado, modified by Stefan Blom ActiveDocument.Footnotes.Add Range:=Selection.Range With Selection .Paragraphs(1).Range.Font.Reset .Paragraphs(1).Range.Characters(2) = "" .InsertAfter ". " .Collapse wdCollapseEnd End With ActiveWindow.ScrollIntoView Selection.Range End Sub The macro intercepts the Insert Footnote command on the References tab; it does not intercept the Footnote and Endnote dialog box. -- Stefan Blom Microsoft Word MVP "menteith" wrote in message ... Could you tell me how to do this? I checked I do not see this option. -- menteith |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Add tabulation to every footnote
Hi Stefan--
I don't understand macro texts; could you explain where this one is seeking and/or inserting a tab character? In many situations that would be nicer than the space or the nothing that normally appears after the footnote reference. On Tuesday, November 5, 2013 2:55:26 PM UTC-5, Stefan Blom wrote: You can modify the Footnote Text style so that it includes a hanging indent and then make use of macros to insert the notes. Use the following macro and store it in the Normal template (for assistance, see http://www.gmayor.com/installing_macro.htm): Sub InsertFootnoteNow() 'Code by Dave Rado, modified by Stefan Blom ActiveDocument.Footnotes.Add Range:=Selection.Range With Selection .Paragraphs(1).Range.Font.Reset .Paragraphs(1).Range.Characters(2) = "" .InsertAfter ". " .Collapse wdCollapseEnd End With ActiveWindow.ScrollIntoView Selection.Range End Sub The macro intercepts the Insert Footnote command on the References tab; it does not intercept the Footnote and Endnote dialog box. "menteith" wrote in message ... Could you tell me how to do this? I checked I do not see this option. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Add tabulation to every footnote
Peter,
Thanks for your reply. You helped me notice a mistake. The line with InsertAfter should include an instruction that adds a tab character: Sub InsertFootnoteNow() 'Code by Dave Rado, 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 -- Stefan Blom Microsoft Word MVP "Peter T. Daniels" wrote in message ... Hi Stefan-- I don't understand macro texts; could you explain where this one is seeking and/or inserting a tab character? In many situations that would be nicer than the space or the nothing that normally appears after the footnote reference. On Tuesday, November 5, 2013 2:55:26 PM UTC-5, Stefan Blom wrote: You can modify the Footnote Text style so that it includes a hanging indent and then make use of macros to insert the notes. Use the following macro and store it in the Normal template (for assistance, see http://www.gmayor.com/installing_macro.htm): Sub InsertFootnoteNow() 'Code by Dave Rado, modified by Stefan Blom ActiveDocument.Footnotes.Add Range:=Selection.Range With Selection .Paragraphs(1).Range.Font.Reset .Paragraphs(1).Range.Characters(2) = "" .InsertAfter ". " .Collapse wdCollapseEnd End With ActiveWindow.ScrollIntoView Selection.Range End Sub The macro intercepts the Insert Footnote command on the References tab; it does not intercept the Footnote and Endnote dialog box. "menteith" wrote in message ... Could you tell me how to do this? I checked I do not see this option. |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Add tabulation to every footnote
OK, you don't want the period to be added after the footnote number? And you
want a version that can be used on existing footnotes? Try the following: Sub InsertFootnoteWithTabChar() 'Code by Stefan Blom, MVP Dim f As Footnote For Each f In ActiveDocument.Footnotes With f.Range.Paragraphs(1).Range .Characters(1).Font.Reset .Characters(2).Text = vbTab End With Next f End Sub The macro replaces the second character in each footnote paragraph with a tab (by default, Word adds a space). To run the macro, attach it to a keyboard shortcut and/or a button on your Quick Access Toolbar. See http://www.gmayor.com/installing_macro.htm. -- Stefan Blom Microsoft Word MVP "menteith" wrote in message ... 'Stefan Blom[_3_ Wrote: ;494893']Peter, Thanks for your reply. You helped me notice a mistake. The line with InsertAfter should include an instruction that adds a tab character: Sub InsertFootnoteNow() 'Code by Dave Rado, 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 -- Stefan Blom Microsoft Word MVP "Peter T. Daniels" wrote in message ...- Hi Stefan-- I don't understand macro texts; could you explain where this one is seeking and/or inserting a tab character? In many situations that would be nicer than the space or the nothing that normally appears after the footnote reference. On Tuesday, November 5, 2013 2:55:26 PM UTC-5, Stefan Blom wrote: - You can modify the Footnote Text style so that it includes a hanging indent and then make use of macros to insert the notes. Use the following macro and store it in the Normal template (for assistance, see http://www.gmayor.com/installing_macro.htm): Sub InsertFootnoteNow() 'Code by Dave Rado, modified by Stefan Blom ActiveDocument.Footnotes.Add Range:=Selection.Range With Selection .Paragraphs(1).Range.Font.Reset .Paragraphs(1).Range.Characters(2) = "" .InsertAfter ". " .Collapse wdCollapseEnd End With ActiveWindow.ScrollIntoView Selection.Range End Sub The macro intercepts the Insert Footnote command on the References tab; it does not intercept the Footnote and Endnote dialog box.- - "menteith" wrote in message ...- -- Could you tell me how to do this? I checked I do not see this option. --- Thanks for this. The macro add a dot to every footnote I create which is not a thing I would like to have. Could you please rewrite this macro so that is does not add tab on-the-fly but it adds it when I run this macro? So when the document is finished I could run the macro and it would add a tab to every footnote which has not already started with a tab. Thanks for your help! -- menteith |
#9
|
|||
|
|||
Thanks, it works!
But there is a small problem: the macro (as the older version you have made) makes a footnote number bigger, that is, 1, 2 and so on get bigger when you run the macro. I do not know why is that. Could you check it? And would it be a problem if you could make this macro in two versions: one that adds a tab on-the-fly, and the other one the way it works now, that is, adds a tab to already written footnotes? |
#10
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Add tabulation to every footnote
The macro clears the superscript formatting on the footnote number. If you
are saying that you don't want that, use the following instead: Sub InsertFootnoteWithTabChar() 'Code by Stefan Blom, MVP Dim f As Footnote For Each f In ActiveDocument.Footnotes With f.Range.Paragraphs(1).Range .Characters(2).Text = vbTab End With Next f End Sub -- Stefan Blom Microsoft Word MVP "menteith" wrote in message ... Thanks, it works! But there is a small problem: the macro (as the older version you have made) makes a footnote number bigger, that is, 1, 2 and so on get bigger when you run the macro. I do not know why is that. Could you check it? And would it be a problem if you could make this macro in two versions: one that adds a tab on-the-fly, and the other one the way it works now, that is, adds a tab to already written footnotes? -- menteith |
#11
|
|||
|
|||
Dear Stefan,
It works flawlessly now but it always adds a tab even if it has already been added. Is there a way to avoid it, that is, to add a tab only when footnote has not already started with a tab? Thank you for your time and effort. Could you also rewrite the script to add a tab on-the-fly as a footnote is added (as in your first version)? Last edited by menteith : November 7th 13 at 08:52 PM |
#12
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Add tabulation to every footnote
It is a rather basic macro; it replaces the second character (that is, the
one following the footnote number) with a tab character. It isn't checking for an already existing tab. Are you saying that most footnotes already have a tab character? In that case, modifying the Footnote Text style to include a hanging indent would suffice. -- Stefan Blom Microsoft Word MVP "menteith" skrev i meddelandet ... Dear Stefan, It works flawlessly now but it always adds a tab even if it has already been added. Is there a way to avoid it, that is, to add a tab only when footnote has not already started with a tab? Thank you for your time and effort. Could you also rewrite the script to add a tab on-the-fly as a footnote is added (as in your first version)? -- menteith |
#13
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Add tabulation to every footnote
By the way, if there is already a tab character, what precedes it? A space?
-- Stefan Blom Microsoft Word MVP "Stefan Blom" wrote in message ... It is a rather basic macro; it replaces the second character (that is, the one following the footnote number) with a tab character. It isn't checking for an already existing tab. Are you saying that most footnotes already have a tab character? In that case, modifying the Footnote Text style to include a hanging indent would suffice. -- Stefan Blom Microsoft Word MVP "menteith" skrev i meddelandet ... Dear Stefan, It works flawlessly now but it always adds a tab even if it has already been added. Is there a way to avoid it, that is, to add a tab only when footnote has not already started with a tab? Thank you for your time and effort. Could you also rewrite the script to add a tab on-the-fly as a footnote is added (as in your first version)? -- menteith |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
can't see footnote text when rest pointer on footnote mark | Microsoft Word Help | |||
When typing text in footnote, why does footnote move upward, send | Microsoft Word Help | |||
Space between footnote and text and footnote and footer FIXED! | Page Layout | |||
footnote reference style different in text to footnote pane versio | Microsoft Word Help | |||
Large space between footnote and 2-inch line separating footnote from body of text on page | New Users |