C
Chuck
Hi All
I've got a problem using Dialogs(wdNoteOptions) to change footnote options.
We're using code to intercept the insert footnote command to make sure that
footnote references at the bottom of the page are not superscripted. The
code is slightly modified code copied from the MVP site (see end of this
post).
Using an InsertFootnote macro seems to disable the footnote/endnote options
dialog (can't get it to display from the standard menu or by right clicking
etc). However we can get it to display by highlighting the note reference in
the text and typing one character -- a Word dialog appears asking if the user
wants to delete (overwrite) the footnote or change the options.
We'd like to be able to call the NoteOptions dialog from a toolbar macro.
However, when I use Dialogs(wdDialogNoteOptions).Show to display the note
options dialog I get unwanted behavior after choosing options and clicking OK.
For instance, if I use Dialogs(wdDialogNoteOptions).Show and choose
"A,B,C..." in the "Number format" field, and click OK, the footnote numbers
change to "i, ii, iii", not "A,B,C". Or if I choose "*, +" etc from the
"Number format" field, the references change to "1st, 2nd" etc, not "*, +"
etc (this latter behaviour is puzzling because "1st, 2nd, 3rd" etc isn't an
option available in the Note Options dialog).
Note that this unwanted behaviour doesn't happen if I highlight the
reference in the text, type a character and bring up the Note Options dialog
that way. So the erratic behaviour appears to be related to be *using code*
to display the Note Options dialog, not the Note Options dialog itself.
Does anyone have any ideas as to why this is happening and more importantly,
how can I get Dialogs(wdDialogNoteOptions).Show to work properly while still
intercepting InsertFootnote to make sure footnote references at the bottom of
the page are not superscripted?
Many thanks for any help -- InsertFootnote code below for reference...
Sub InsertFootnote()
'
'This macro intercepts Insert > Footnote and automatically
'changes footnote numbers from superscript to normal
ActiveDocument.Footnotes.Add Range:=Selection.Range
With Selection
.Paragraphs(1).Range.Font.Reset
.Paragraphs(1).Range.Characters(2) = ""
.InsertAfter "." & vbTab
.Collapse wdCollapseEnd
.Paragraphs(1).Style = "Footnote Text"
End With
End Sub
I've got a problem using Dialogs(wdNoteOptions) to change footnote options.
We're using code to intercept the insert footnote command to make sure that
footnote references at the bottom of the page are not superscripted. The
code is slightly modified code copied from the MVP site (see end of this
post).
Using an InsertFootnote macro seems to disable the footnote/endnote options
dialog (can't get it to display from the standard menu or by right clicking
etc). However we can get it to display by highlighting the note reference in
the text and typing one character -- a Word dialog appears asking if the user
wants to delete (overwrite) the footnote or change the options.
We'd like to be able to call the NoteOptions dialog from a toolbar macro.
However, when I use Dialogs(wdDialogNoteOptions).Show to display the note
options dialog I get unwanted behavior after choosing options and clicking OK.
For instance, if I use Dialogs(wdDialogNoteOptions).Show and choose
"A,B,C..." in the "Number format" field, and click OK, the footnote numbers
change to "i, ii, iii", not "A,B,C". Or if I choose "*, +" etc from the
"Number format" field, the references change to "1st, 2nd" etc, not "*, +"
etc (this latter behaviour is puzzling because "1st, 2nd, 3rd" etc isn't an
option available in the Note Options dialog).
Note that this unwanted behaviour doesn't happen if I highlight the
reference in the text, type a character and bring up the Note Options dialog
that way. So the erratic behaviour appears to be related to be *using code*
to display the Note Options dialog, not the Note Options dialog itself.
Does anyone have any ideas as to why this is happening and more importantly,
how can I get Dialogs(wdDialogNoteOptions).Show to work properly while still
intercepting InsertFootnote to make sure footnote references at the bottom of
the page are not superscripted?
Many thanks for any help -- InsertFootnote code below for reference...
Sub InsertFootnote()
'
'This macro intercepts Insert > Footnote and automatically
'changes footnote numbers from superscript to normal
ActiveDocument.Footnotes.Add Range:=Selection.Range
With Selection
.Paragraphs(1).Range.Font.Reset
.Paragraphs(1).Range.Characters(2) = ""
.InsertAfter "." & vbTab
.Collapse wdCollapseEnd
.Paragraphs(1).Style = "Footnote Text"
End With
End Sub