word 2008 script questions
In article
<93c4506e-ceb0-4445-a4d8-b4ce2fd482c5@j22g2000hsf.googlegroups.com>,
Try this on for size:
(Note: Usenet or your news reader may line wrap long lines in the script
below. You'll have to fix such line wraps manually, by deleting the
appropriate carriage returns, before the script will compile correctly
on your computer.)
-- begin script
tell application "Microsoft Word"
activate
set myDoc to make new document
set myAddressTable to make new table at myDoc with properties
{number of rows:1, number of columns:2}
set enable borders of myAddressTable's border options to false
repeat with col from 1 to 2
my SetCellContents(myAddressTable, 1, col, "row 1, column " &
col)
end repeat
end tell
on SetCellContents(myTable, myRow, myColumn, myContents)
tell application "Microsoft Word"
set myCell to get cell from table myTable row myRow column
myColumn
set myText to the text object of myCell
set myText's content to myContents
end tell
end SetCellContents
-- end script
--
Please send all responses to the relevant news group rather than directly
to me, as E-mail sent to this address may be devoured by my very hungry
SPAM filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google Groups.
You'll need to use a real news reader if you want me to see your posts.
JR
|