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)?
474 Views Asked by Zhao Yang At
2
You have more than one problem with this code.
The first is that you are not setting
oLookWordDoc
to point to a document, so none of the Word code will work.Second, you have two variables pointing to the same table,
oLookwordTbl
andr
. You only need one of these.Third, you are selecting the table to run
Find
instead of simply using theFind
method 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.