Applescript Add Row to Table Microsoft Office

Posted by: waggy-d

Applescript Add Row to Table Microsoft Office - 02/23/12 01:41 PM

How do you add a row to an existing specific table (ie. Table 2) in an active Microsoft word document via applescript?

I've tried:

Tell application "Microsoft Word"
insert rows at bottom of table 2 of active document
end tell

with no luck?

I've also tried various oher permutations.

Would some be able to help with this?

Thanks
Posted by: Jim_

Re: Applescript Add Row to Table Microsoft Office - 02/23/12 02:42 PM

Not sure if it matters but what version of Office is it and what version of the OS?
Posted by: waggy-d

Re: Applescript Add Row to Table Microsoft Office - 04/12/12 12:40 PM

Hello. Reboot. I actually figured it out from another post on apple discussions:

tell application "Microsoft Word"
select (last row of table 2 of active document)
insert rows selection position below number of rows 1
end tell

It worked like a charm. I was using Office 2007 for Mac