RE: applescript-users digest, Vol 2 #712 - 18 msgs
RE: applescript-users digest, Vol 2 #712 - 18 msgs
- Subject: RE: applescript-users digest, Vol 2 #712 - 18 msgs
- From: Steve Suranie <email@hidden>
- Date: Thu, 31 May 2001 11:52:37 -0400
Hi folks:
Can anyone give me a hand with some Acrobat scripting - specifically
closing a document.
I'm trying to open an existing pdf file (file1) and then search a
folder for any file that ends in .pdf and add them to file 1.
Everything works fine except I can't seem to close the files once I
open them. I get the following error message:
Acrobat 4.0 got an error. Can't get file: "System:desktop folder:...
Access not allowed.
Here's my code if that'll help:
if last text item of fileName is "pdf" then
tell application "Acrobat(tm) 4.0"
set filePath2 to "System:desktop folder:Distiller Folder:Out:" &
fileName
set fileRef2 to (open for access file filePath2) -- creates file
close access fileRef2
open alias filePath2 -- opens the second document
set y to the number of last PDPage
insert pages document pdfDocName after x from document fileName
starting with 1 number of pages y
close file filePath2 <---------HERE IS WHERE IT BREAKS
end tell
end if
Any help would be appreciated
Thanks
Steve