< Zurück

02.12.2012 19:35:00 • Categories: Applescript, Excel • Tags: Applescript, Excel

AppleScript: add comment to cell in excel sheet

(* excel_addcomment.applescript *)

tell application "Microsoft Excel"     tell range "A10" of active sheet         set cmt to its Excel comment -- no error if nothing (dummy comment)         set vis to visible of cmt --get any property , returns missing value if empty         if vis is missing value then             set cmt to add comment         end if     end tell

    tell cmt         Excel comment text text "My comment" --overwrites, but omit 'over write'!         set visible to true         select its shape object -- to allow editing     end tell end tell

 


< Zurück | ^ nach oben