Custom number format for footnotes

M

Masanao Baba

any way I can set custom number format for footnotes to
something like "[a], , [c] ..."?
any help would be appreciated.

-masanao
 
S

Suzanne S. Barnhill

You can't. You can modify the font of the Footnote Reference style, but
there is no way (through the UI) to format the numbering (that is, you can
select a, b, c, but you can't add the brackets). A macro can be used to do
this after the fact, or you can modify the numbers manually.
 
J

Jean-Guy Marcil

Hi Masanao,

As Suzanne said, it is not normally possible, unless you manually tamper
with the result. But, with code you can intercept the "Insert footnote"
function.
This code does it all, the Footnote dialog will not show up but everything
will be there ([ (a) in the document and at the bottom ]. So be careful and
make sure that this is what you want to do.
If you want all documents based on a template to behave that way, put the
code in the template, if you want just a particular document to have this
behaviour, put the code only in that document.

See
http://word.mvps.org/faqs/macrosvba/CreateAMacro.htm
for help on installing macros.
Note that this macro MUST be called "InsertFootnote" or it will not work

Try this code:

'_______________________________________
Sub InsertFootnote()

Dim LocCursor As Range

Set LocCursor = Selection.Range


With ActiveDocument.Range(Start:=ActiveDocument.Content.Start, End:= _
ActiveDocument.Content.End)
With .FootnoteOptions
.Location = wdBottomOfPage
.NumberingRule = wdRestartContinuous
.StartingNumber = 1
.NumberStyle = wdNoteNumberStyleLowercaseLetter
End With
.Footnotes.Add Range:=Selection.Range, Reference:=""
End With

'Dialogs(wdDialogInsertFootnote).Show

Selection.HomeKey wdLine
Selection.Font.Superscript = True
Selection.TypeText "("
Selection.MoveRight wdCharacter, 1
Selection.TypeText ")"
Selection.EndKey wdLine

LocCursor.InsertBefore "("
LocCursor.SetRange LocCursor.Start, LocCursor.End + 1
LocCursor.InsertAfter ")"
LocCursor.Font.Superscript = True
LocCursor.SetRange LocCursor.End, LocCursor.End
LocCursor.InsertAfter " "
LocCursor.Font.Superscript = False

End Sub
'_______________________________________


--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top