MS Word - select text from range of paragraphs

What’s the correct syntax for this?

Tried this, but it selects nothing.

tell application "Microsoft Word"
	activate
	tell active document
		set numP to count of paragraphs
		set myRange to ¬
			create range start (|start| of content of paragraph 7) end (|end| of content of paragraph numP)
		select myRange
	end tell
end tell

This works:

tell application "Microsoft Word"
	activate
	tell active document
		set numP to count of paragraphs
		set myRange to ¬
			create range start (start of content of text object of paragraph 7) end (end of content of text object of paragraph numP)
		select myRange
	end tell
end tell

The paragraph class does not have a start of content or end of content property, but its text object (which is of class text range) does.

1 Like

Thanks, that’s it.

At one point I had tried this, but got an error. Think what happened is: I forgot to have a sample document open in Word :confounded: