Previous | Next | (P-PDF) Mac Issues
Topic: Applescripting Merge in 5.0 (Via Email)
Conf: (P-PDF) Mac Issues, Msg: 111302
Date: 5/12/2004 03:56 AM
I am trying to merge specific PDF files together via Applescript. In detail, I have a report on a new car dealership, and general reports on different makes of cars. I want to merge the relevant make reports to the end of each dealership report.
I am not having trouble choosing the proper files, but I am getting an applescript error on the insert pages command. I can't figure out what I'm doing wrong. There are no problems opening the files in Acrobat, it only stops when the insert pages command is called.
tell application "FileMaker Developer"
set file_name to get data cell "nameofile" of current record
set makefile_name to get data cell "makefile" of current record
tell application "Finder"
open document file file_name of folder "WATCH Reports" of folder "Desktop" of folder "withan" of folder "Users" of startup disk
open document file makefile_name of folder "Makes" of folder "WATCH Reports" of folder "Desktop" of folder "withan" of folder "Users" of startup disk
tell application "Acrobat 5.0"
tell makefile_name -- Document 2 is the current file we are inserting
set TotalPagesOfDoc2 to (count each PDPage)
tell file_name -- Document 1 is our main pdf file
set LastPageOfDoc1 to (count each PDPage)
insert pages file_name after LastPageOfDoc1 from makefile_name starting with 1 number of pages TotalPagesOfDoc2
close document 2