Adobe 27510753 - InDesign CS2 - PC Manual page 155

Scripting guide
Hide thumbs Also See for 27510753 - InDesign CS2 - PC:
Table of Contents

Advertisement

Adobe InDesign CS2 Scripting Guide
you might want to omit slug information for the final printing of a document. The following script sets up the
bleed and slug for a new document:
Rem BleedAndSlug.vbs
Rem An InDesign CS2 VBScript
Rem Create a new document.
Set myInDesign = CreateObject("InDesign.Application.CS2")
Set myDocument = myInDesign.Documents.Add
Rem The bleed and slug properties belong to the documentPreferences object.
With myDocument.DocumentPreferences
Rem Bleed
.DocumentBleedBottomOffset = "3p"
.DocumentBleedTopOffset = "3p"
.DocumentBleedInsideOrLeftOffset = "3p"
.DocumentBleedOutsideOrRightOffset = "3p"
Rem Slug
.SlugBottomOffset = "18p"
.SlugTopOffset = "3p"
.SlugInsideOrLeftOffset = "3p"
.SlugRightOrOutsideOffset = "3p"
End With
If all the bleed distances are equal, as in the preceding example, you can alternatively use the
DocumentBleedUniformSize
Rem UniformBleed.vbs
Rem An InDesign CS2 VBScript
Rem Create a new document.
Set myInDesign = CreateObject("InDesign.Application.CS2")
Set myDocument = myInDesign.Documents.Add
Rem The bleed properties belong to the documentPreferences object.
With myDocument.DocumentPreferences
Rem Bleed
.DocumentBleedTopOffset = "3p"
.DocumentBleedUniformSize = True
End With
If all the slug distances are equal, you can instead use the DocumentSlugUniformSize property:
Rem UniformSlug.vbs
Rem An InDesign CS2 VBScript
Rem Create a new document.
Set myInDesign = CreateObject("InDesign.Application.CS2")
Set myDocument = myInDesign.Documents.Add
Rem The slug properties belong to the documentPreferences object.
With myDocument.DocumentPreferences
Rem Slug:
.SlugTopOffset = "3p"
.DocumentSlugUniformSize = True
End With
In addition to setting the bleed and slug widths and heights, you can control the color used to draw the
guides defining the bleed and slug. This property is not in the DocumentPreferences object—instead, it's
in the PasteboardPreferences object:
Rem BleedSlugGuideColors.vbs
Rem An InDesign CS2 VBScript
Rem Set the colors used to display the bleed and slug guides.
Set myInDesign = CreateObject("InDesign.Application.CS2")
With myInDesign.ActiveDocument.PasteboardPreferences
Rem Any of InDesign's guides can use the UIColors constants...
.BleedGuideColor = idUIColors.idCuteTeal
.SlugGuideColor = idUIColors.idCharcoal
Rem ...or you can specify an array of RGB values (with values from 0 to 255)
Rem .BleedGuideColor = Array(0, 198, 192)
Rem .SlugGuideColor = Array(192, 192, 192)
End With
property:
Working with Documents in VBScript
147

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Indesign cs2

Table of Contents