Hello All,
I have written a simple script that will adjust the column widths in excel to adjust to the longest cell value. I was wondering if anyone had a way to do this without using system events.
Thanks,
CarbonQuark
tell application "Microsoft Excel"
activate
tell application "System Events"
keystroke "a" using command down
end tell
tell application "System Events"
tell process "Microsoft Excel"
tell menu bar 1
tell menu bar item "Format"
tell menu "Format"
tell menu item "Column"
tell menu 1
click menu item "AutoFit Selection"
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell