复制脚注的一部分
Copying a portion of a footnote
在 Word 文件中,我只需要复制脚注的一部分,比方说从字符 2 到字符 8。下面的代码不起作用。
Dim rng As Range
Set rng = ActiveDocument.Footnotes(1).Range.Duplicate
rng.SetRange(2, 8) 'compilation error, also those indexes refer to the main story
Set rng = rng.Document.Range(2, 8) 'compile, but those indexes refer to the main story
rng.Copy
ActiveDocument.Footnotes(1).Range.Start
是 2。但是当您将范围设置为 2 时,它指向主要故事。
我该怎么做?
谢谢
例如:
Sub Demo()
Dim Rng As Range
Set Rng = ActiveDocument.Footnotes(1).Range
With Rng
.Start = .Start + 2
.End = .Start + 6
MsgBox .Text
End With
End Sub
在 Word 文件中,我只需要复制脚注的一部分,比方说从字符 2 到字符 8。下面的代码不起作用。
Dim rng As Range
Set rng = ActiveDocument.Footnotes(1).Range.Duplicate
rng.SetRange(2, 8) 'compilation error, also those indexes refer to the main story
Set rng = rng.Document.Range(2, 8) 'compile, but those indexes refer to the main story
rng.Copy
ActiveDocument.Footnotes(1).Range.Start
是 2。但是当您将范围设置为 2 时,它指向主要故事。
我该怎么做? 谢谢
例如:
Sub Demo()
Dim Rng As Range
Set Rng = ActiveDocument.Footnotes(1).Range
With Rng
.Start = .Start + 2
.End = .Start + 6
MsgBox .Text
End With
End Sub