Row and column numbers of a cell selected in a MS Word table?

I have a single cell selected in a MS Word 2004 table. How do I get the row and column numbers of that cell using Applescript? This has probably already been posted somewhere, but I couldn’t figure out how to search for this topic in the archives. Thanks.

Carl

I used the VBEditors browser to figure out how to write this in VBA and then looked at the Library for Word to translate it into AppleScript.

tell application "Microsoft Word"
	
	display dialog "row # " & row index of cell 1 of selection ¬
		& linefeed ¬
		& "column # " & column index of cell 1 of selection
	
end tell

Thank you very much! It works fine but I must say that I can’t understand why. Searching the Word 2004 Applescript Reference for “row index of cell” or “cell 1 of selection” yields nothing. Is this terminology from VB and simply not documented in the Applescript Reference?

It came from one of two sources.

  1. In Script Editor, view the library, press +, navigate to the location of Microsoft Word and select.
    The library for Word will be added to the Script Editor library.

  2. Go to the MicroSoft website, search keyword: “AppleScript” and download the free AppleScript guide.