I am working on copy and past the word tables to excel. but there are a lot of 'enter' key in word tables. could I know how to replace the the enter key in whole word tables. I am encountering issue" wrong number of argument or invalid property assignment"
How replace word tables chr(13)?
485 Views Asked by Zhao Yang At
2
You have more than one problem with this code.
The first is that you are not setting
oLookWordDocto point to a document, so none of the Word code will work.Second, you have two variables pointing to the same table,
oLookwordTblandr. You only need one of these.Third, you are selecting the table to run
Findinstead of simply using theFindmethod ofTable.Range.Fourth, your find and replacement texts are incorrect.
The tidied code below will replace the paragraph marks in the table with a space.