Re: Microsoft Word Tables
Re: Microsoft Word Tables
- Subject: Re: Microsoft Word Tables
- From: Gil Dawson <email@hidden>
- Date: Wed, 15 Dec 2010 11:00:55 -0800
Thanks , Stan!
That works! Also for "set".
--Gil
On Dec 14, 2010, at 6:50 PM, Stan Cleveland wrote: On Dec 14, 2010, at 5:59 PM, Gil Dawson wrote: Anybody work with tables in Word? I'd like to "get" and "set" the values in cells, using row and column numbers, as I do in Excel.
This much I got...
tell application "Microsoft Word" get name of document 1 --> "My Table Tests" get uniform of table 1 of document 1 --> true get row index of row 3 of table 1 of document 1 --> 3 get column index of cell 4 of row 3 of table 1 of document 1 --> 4 get value of cell 4 of row 3 of table 1 of document 1 --> missing value get contents of cell 4 of row 3 of table 1 of document 1 --> missing value get every text of cell 4 of row 3 of table 1 of document 1 --> current application end tell
Hi Gil,
This may get you going again. The code below returns the correct cell contents, but always with a return appended to the end. You may want to strip that off. Numbers are also returned as strings with a trailing return.
tell application "Microsoft Word" tell table 1 of document 1 set blah to content of text object of cell 1 of row 2 end tell end tell
HTH, Stan
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden