Newby needs help with opening a word document as read-only

Running Tiger 10.4.8

I’m trying to crawl through applescript and at the moment my project consists of converting maybe 3,000 word documents to pdf documents. I have adobe pdf 7.0 as one of my printer options so that should work. (from reading it appears as the print to pdf dialog isn’t applescriptable???)

However…the files are protected and I need to open them as read-only to avoid the dialog box.

To a newby the “dictionary” of applescript for Word is horrid. I haven’t the faintest clue how to implement the open read only thing…that the dictionary tells me is in existence…

How would an actual code look like that does this:

tell application “Microsoft Word”
“open the damn file as read only”
" print the damn file to adobe pdf 7.0 printer…and put the file in this location"
end tell

Please help. I will have many gracious coworkers…

Model: Powerbook g4 1.67Ghz
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi nukular,

unfortunately I have no experience with scripting MS Word (since the stone old version I own isn’t scriptable) …
but if you don’t find an other solution for the read only dialog you could try something like this (waits for the dialog to appear and closes it by simulating a return key press)

… open the file

tell application "System Events"
	tell process "Microsoft Word"
		set frontmost to true
		repeat until subrole of window 1 is "AXDialog"
		end repeat
		keystroke return
	end tell
end tell

D.