开发者

Copy from Word to Excel [closed]

开发者_运维问答 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I want from Excel to search a word document and see if I can find a table and if I can copy that table into Excel. I don't know the size of the table until I find it. I will be creating a new sheet in an existing workbook just for this found table.


Here is how to loop through each table in a word document. Figuring out how you want to do the rest shouldn't be an issue (if it is, update your question with info on what you have tried, etc.). You'll either need to be in Excel and open a word object, or be in word and open an Excel object.

Sub FindTables()

Dim tTable As table

For Each tTable In ActiveDocument.Tables
    tTable.Range.Copy
    'Do what you wish (.range.copy here used for example only)
Next

End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜