View Single Post
  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default 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