将Excel中的范围内的文本复制到Word文档中 [英] Copy Text from Range in Excel into Word Document
本文介绍了将Excel中的范围内的文本复制到Word文档中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何:
1)从Excel文档中的范围复制文本。
2)打开Word文档。
3)将文本插入单词文档的特定部分。
1) copy text from a range in an Excel Document.
2) Open a Word Document.
3) inserts the text into a specific part of the word document.
认为
Kojo
编辑:这里是方法
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim j As Integer
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Open("C:\Files\DailyStrategy.doc")
With wrdDoc
If wrdDoc.Bookmarks.Exists("MarketCommentry")
Then wrdDoc.Bookmarks("MarketCommentry").Range.Text = shortString
wrdDoc.SaveAs "c:\temp\test.doc"
End If
' close the document
Set wrdDoc = Nothing
Set wrdApp = Nothing
End With
推荐答案
以下是一些可能有帮助的文章:
Here are some articles that may help:
这篇关于将Excel中的范围内的文本复制到Word文档中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文