Hi there.
I receive password protected Word files to a particular folder and wish to open them all in a batch, in this example with the password “hello”
the following script ought to work
set the source_folder to (“SBs Drive:Users:SB:Desktop:edit:”) as string
set the item_list to list folder source_folder without invisibles
tell application “Microsoft Word”
repeat with i from 1 to number of items in the item_list
set this_file to source_folder & item i of item_list
open this_file password document “hello”
end repeat
end tell
Although I’m following the syntax in the Word dictionary, my scripted password is ignored and is requested for each file as it opens.
Any suggestions?
Thanks
SB
Model: iMac
AppleScript: 2.0
Browser: Safari 525.18
Operating System: Mac OS X (10.5)