How to copy a formatted paragraph from Word 2013 to Excel?

前端 未结 3 1394
陌清茗
陌清茗 2021-01-14 00:40

I want to open a Word document and copy each formatted paragraph into its own cell in an Excel worksheet, retaining the formatting for further processing. I have been able t

3条回答
  •  天涯浪人
    2021-01-14 01:17

    The answer will be a bit ugly. This way is normally not how you should write Excel macros, but here it goes:

    ...
    Sheets(FileName).Cells(ParaCount, 1).Select
    Sheets(FileName).Paste
    ...
    

    Don't use .Select unless you need to.

提交回复
热议问题