|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Applescript : close word document (office 2011)
i'm simply trying to close a document (without quitting word), but this does not work.
I've tried : Code:
close documents saving no close active document close document 1 The error I get (on the close line) is: Code:
Microsoft Word got an error: The object you are trying to access does not exist Thanks in advance. Code:
set input to {POSIX path of "/Users/Wesley/Desktop/test.doc"}
--ENABLE GUI SCRIPTING
tell application "System Events"
if UI elements enabled is false then set UI elements enabled to true
end tell
--RUN THE GUISCRIPT
set pdfSavePath to POSIX path of (choose folder with prompt "Set destination folder")
repeat with x in input
display dialog x
tell application "Microsoft Word"
activate
open x
set theActiveDoc to the active document
close theActiveDoc saving no
return
end tell
end repeat
Last edited by wesleyh; Jan 26, 2013 at 09:26 AM. |
|
|
|
0
|
|
|
#2 |
|
Works on Leopard with Microsoft Office 2004.
__________________
Space Corps Directive 34124 |
|
|
|
0
|
|
|
#3 |
|
Thanks, I reinstalled word and now it works. Perhaps I didn't select the automator section of the installation previously.
|
|
|
|
0
|
![]() |
|
| Tags |
| applescript, ms-office, office |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 03:45 AM.







Linear Mode
