且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从Excel工作簿复制到Word中的文档,而无需添加参考

更新时间:2023-12-04 13:32:04

更改theFields.Result.Text.因此,您可以在Excel中执行.CheckSpelling,然后将theFields.Result.Text = .Range("A1").Text

Change theFields.Result.Text. So you can do .CheckSpelling in Excel, then make theFields.Result.Text = .Range("A1").Text

Dim correctSpelling as String

With ws
 .Range("A1").Select
 .Paste
 .Range("A1").CheckSpelling
 correctSpelling = .Range("A1").Text
End With

    theFields.Result.Text = correctSpelling

    End If
Next theFields
End Sub