【发布时间】:2025-12-24 16:30:06
【问题描述】:
我一直在使用宏来仅在页脚中查找/替换文本。目前,我手动编辑宏来调整查找/替换文本。我想添加一个弹出框来询问我要搜索什么文本以及用什么替换它。我自己尝试这样做并没有成功。
下面是我目前使用的宏。有什么想法吗?
Sub FooterDates()
Dim oSection As Word.Section
Dim oRange As Word.Range
Dim var
For Each oSection In ActiveDocument.Sections()
For var = 1 To 3
Set oRange = oSection.Footers(var).Range
oRange.Find.Execute FindText:="December 2015", _
ReplaceWith:="February 2016", Replace:=wdReplaceAll
Set oRange = Nothing
Next
Next
End Sub
【问题讨论】: