如何将 Microsoft Word 中突出显示的单词提取到 Excel 模板中?
模板已创建。我希望将 Word 文档中的文本放入已有的 Excel 文档中。
'code that highlights word "olympics"
Dim sFindText As String
sFindText = "Olympics"
Selection.ClearFormatting
Selection.HomeKey wdStory, wdMove
Selection.Find.ClearFormatting
Selection.Find.Execute sFindText
Do Until Selection.Find.Found = False
Selection.Range.HighlightColorIndex = wdYellow
Selection.MoveRight
Selection.Find.Execute
Loop