1

In a Word document, I would like to select a word or a phrase using the mouse, and run a macro. The macro should:

  1. Insert a footnote at the end of my selected word or phrase.
  2. Copy the selected text to the footnote, but italicised, and followed by a colon.
4

1 回答 1

4

应该这样做,当添加脚注时,它应该已经是斜体了!我还在逗号后添加了一个空格,为下一个脚注做好准备。

     Sub AddFootNote()

        NewFootNote = Selection & Chr(44) & Chr(32)

        With Selection
            With .FootnoteOptions
                .Location = wdBottomOfPage
                .NumberingRule = wdRestartContinuous
                .StartingNumber = 1
                .NumberStyle = wdNoteNumberStyleArabic
            End With
            .Footnotes.Add Range:=Selection.Range, Text:=NewFootNote

        End With

    End Sub

-edit- 如果你想确保你的脚注是斜体的,你可以添加这部分。

With ActiveDocument.Styles("Footnote Text").Font
    .Italic = True
End With 
于 2013-01-23T21:06:00.503 回答