Michael Ghilissen asked the following question:
"How do you get/set the text object of a cell of a Word table with AS? I tried all the variations I could think of, unsuccessfully."
Here is an example that might help
tell application "Microsoft Word"
-- make a new document set myDoc to make new document
-- make a table in this document set myTable to make new table at beginning of myDoc ¬ with properties {number of columns:4, number of rows:4}
-- to get a specific cell
set myCell to get cell from table myTable row 1 column 3
set myTO to the text object of myCell set the content of myTO to "hi there"
-- to iterate through cells in a table
repeat with columnIndex from 1 to number of columns of myTable repeat with rowIndex from 1 to number of rows of myTable set curCell to get cell from table myTable row rowIndex column columnIndex set curTO to the text object of curCell set the content of curTO to "Cell: row " & rowIndex & " column " & columnIndex end repeat end repeat
end tell
enjoy!
Jim "Murf" Murphy
|