deselecting text in Word

How can I deselect text in a document once it has been selected and edited?

I can't find this in the documentation and none of the obvious commands seem to work: deselect, select none, etc.

The below script works fine but I want to deselect myRange.

tell application "Microsoft Word"
activate
open "Photo [OSX]:Users:home:Desktop:Calendar.doc"

insert text textCalData at end of text object of front document
set theCount to count of paragraphs of active document
set myRange to create range active document start (start of content of text object of paragraph 3 of active document) end (end of content of text object of paragraph theCount of active document)

select myRange

set all caps of font object of selection to true


end tell

Pedro

G5 Mac OS X (10.3.9)

Posted on Feb 20, 2007 7:05 AM

Reply
2 replies

Feb 21, 2007 8:58 PM in response to Peter Robertson

You may try to set insertion point to the same point:

set myRange to create range active document start (start of content of text object of paragraph 3 of active document) end (start of content of text object of paragraph 3 of active document)

or to move the cursor with keystroke:

tell app "Microsoft Word" to activate
tell app "System Events"
tell process "Microsoft Word"
keystroke (ASCII character 29) -- arrow right
end
end

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

deselecting text in Word

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.