COM select text / find text
Posted: 22 May 2018, 02:15
Hello!
I am trying to select text inside a Word-document using COM. The problem that I encountered is that I don't know how many lines to select, so something like will not help me. I am trying to select from row 7 to the END char of page 1. (not the end of page 1 because there's a unwanted empty row).
Question two: I am trying to find a word in Word (with COM) and putting it into a variable.
Using works for the entire document except for the part I want to search. It's inside a textbox.
Help appreicated.
I am trying to select text inside a Word-document using COM. The problem that I encountered is that I don't know how many lines to select, so something like
Code: Select all
oWord.Selection.MoveDown(5, 3, 9)
Question two: I am trying to find a word in Word (with COM) and putting it into a variable.
Using
Code: Select all
oWord.Selection.Find.Execute("My word")
Help appreicated.