Re: Replace cover page using applescript in Acrobat
Re: Replace cover page using applescript in Acrobat
- Subject: Re: Replace cover page using applescript in Acrobat
- From: Shane Stanley <email@hidden>
- Date: Thu, 11 Mar 2010 09:33:12 +1100
- Thread-topic: Replace cover page using applescript in Acrobat
On 11/3/10 8:11 AM, "Don Feldman" <email@hidden> wrote:
> tell application "Adobe Acrobat Pro"
> set docPgToBe_replaced to "Macintosh
> HD:Users:don_feldman:Desktop:Switch_Chapter_ Covers:chapter
> PDF:9780071714921.pdf"
> set SourceOfNewPage to "Macintosh HD:Users:don_feldman:Desktop:Switch_Chapter_
> Covers:cover PDF:9780071714921.pdf"
>
> replace pages docPgToBe_replaced over 1 from SourceOfNewPage starting with 1
> number of pages 1
> save docPgToBe_replaced
The replace pages command requires documents as parameters, but you're using
file paths. You need to first open the documents, then refer the documents.
Probably something like this:
tell application "Adobe Acrobat Pro"
set docPgToBe_replaced to "Macintosh
HD:Users:don_feldman:Desktop:Switch_Chapter_ Covers:chapter
PDF:9780071714921.pdf"
set SourceOfNewPage to "Macintosh
HD:Users:don_feldman:Desktop:Switch_Chapter_ Covers:cover
PDF:9780071714921.pdf"
open alias docPgToBe_replaced
open alias SourceOfNewPage
replace pages document "9780071714921.pdf" over 1 from
"9780071714921.pdf" starting with 1 number of pages 1
--
Shane Stanley <email@hidden>
AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden