【发布时间】:2020-09-03 20:59:13
【问题描述】:
我正在尝试构建一个宏来删除散布在 MS Outlook 联系人备注字段中的一系列电子邮件。这是我到目前为止所拥有的,当它执行时,似乎没有任何可见的事情发生。感谢任何反馈。
电子邮件看起来像<name@xyz.com>
Sub OutlookDeleteTextBetween()
Dim olInspector As Outlook.Inspector
Dim olDocument As Word.Document
Dim olSelection As Word.Selection
Set olInspector = Application.ActiveInspector()
Set olDocument = olInspector.WordEditor
Set olSelection = olDocument.Application.Selection
olSelection.WholeStory
With olSelection.Find
.Text = "\<*\>"
.MatchWildcards = True
.Replacement.Text = ""
.Execute Replace:=wdReplaceAll
End With
End Sub
【问题讨论】:
标签: vba email outlook contacts