Adobe 27510753 Scripting Guide - Page 163
Creating a preset using new values, Using a preset, Setting up master spreads
UPC - 718659445294
View all Adobe 27510753 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 163 highlights
Adobe InDesign CS2 Scripting Guide Working with Documents in VBScript 155 .PagesPerDocument = myDocument.DocumentPreferences.PagesPerDocument .SlugBottomOffset = myDocument.DocumentPreferences.SlugBottomOffset .SlugTopOffset = myDocument.DocumentPreferences.SlugTopOffset .SlugInsideOrLeftOffset = myDocument.DocumentPreferences.SlugInsideOrLeftOffset .SlugRightOrOutsideOffset = myDocument.DocumentPreferences.SlugRightOrOutsideOffset End With End If Creating a preset using new values To create a Document Preset using explicit values, run the following script: Rem DocumentPreset.vbs Rem An InDesign CS2 VBScript Rem Creates a new document preset. Set myInDesign = CreateObject("InDesign.Application.CS2") Rem If the document preset "myDocumentPreset" does not already exist, create it. Err.Clear On Error Resume Next Set myDocumentPreset = myInDesign.DocumentPresets.Item("myDocumentPreset") If Err.Number 0 Then Set myDocumentPreset = myInDesign.DocumentPresets.Add myDocumentPreset.Name = "myDocumentPreset" Err.Clear End If On Error GoTo 0 Rem Fill in the properties of the document preset. With myDocumentPreset .PageHeight = "9i" .PageWidth = "7i" .Left = "4p" .Right = "6p" .Top = "4p" .Bottom = "9p" .ColumnCount = 1 .DocumentBleedBottomOffset = "3p" .DocumentBleedTopOffset = "3p" .DocumentBleedInsideOrLeftOffset = "3p" .DocumentBleedOutsideOrRightOffset = "3p" .FacingPages = True .PageOrientation = idPageOrientation.idPortrait .PagesPerDocument = 1 .SlugBottomOffset = "18p" .SlugTopOffset = "3p" .SlugInsideOrLeftOffset = "3p" .SlugRightOrOutsideOffset = "3p" End With Using a preset To create a new document using a Document Preset, use the DocumentPreset parameter as previously shown in the "Creating a new document" section. Setting up master spreads After you've set up the basic document page size, slug, and bleed, you'll probably want to define the document's master spreads: Rem MasterSpread.vbs Rem An InDesign CS2 VBScript Rem Creates a document, then demonstrates setting master spread properties. Set myInDesign = CreateObject("InDesign.Application.CS2")