Changing The Pasteboard's Appearance - Adobe 27510753 - InDesign CS2 - PC Manual

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

Advertisement

Adobe InDesign CS2 Scripting Guide
Rem The following assumes that your default master spread contains two pages.
With myDocument.MasterSpreads.Item(1).Pages.Item(1).MarginPreferences
.Top = 0
.Left = 0
.Bottom = 0
.Right = 0
.ColumnCount = 1
.ColumnGutter = 0
End With
With myDocument.MasterSpreads.Item(1).Pages.Item(2).MarginPreferences
.Top = 0
.Left = 0
.Bottom = 0
.Right = 0
.ColumnCount = 1
.ColumnGutter = 0
End With
myDocument.DocumentPreferences.PageHeight = "1p"
myDocument.DocumentPreferences.PageWidth = "6p"
Alternatively, you can change the application default margin preferences before you create the document:
Rem ApplicationPageMargins.vbs
Rem An InDesign CS2 VBScript
Rem Sets the application default page margins. All new documents
Rem will be created using these settings. Existing documents
Rem will be unaffected.
Set myInDesign = CreateObject("InDesign.Application.CS2")
With myInDesign.MarginPreferences
Rem Save the current application default margin preferences.
myY1 = .Top
myX1 = .Left
myY2 = .Bottom
myX2 = .Right
Rem Set the application default margin preferences.
.Top = 0
.Left = 0
.Bottom = 0
.Right = 0
End With
Rem Create a new example document to demonstrate the change.
Set myDocument = myInDesign.Documents.Add
myDocument.DocumentPreferences.PageHeight = "1p"
myDocument.DocumentPreferences.PageWidth = "6p"
Rem Reset the application default margin preferences to their former state.
With myInDesign.MarginPreferences
.Top = myY1
.Left = myX1
.Bottom = myY2
.Right = myX2
End With

Changing the pasteboard's appearance

The pasteboard is an area that surrounds InDesign pages. You can use it for temporary storage of page items.
You can change the size of the pasteboard and its color using scripting. The PasteboardColor property
controls the color of the pasteboard in Normal mode; the PreviewBackgroundColor property sets the
color of the pasteboard in Preview mode:
Rem PasteboardPreferences.vbs
Rem An InDesign CS2 VBScript
Rem Create a new document and change the size of the pasteboard.
Set myInDesign = CreateObject("InDesign.Application.CS2")
Set myDocument = myInDesign.Documents.Add
With myDocument.PasteboardPreferences
Working with Documents in VBScript
149

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Indesign cs2

Table of Contents