Adobe 27510753 Scripting Guide - Page 165
you put into the document uses those defaults, and any existing text remains unchanged.
UPC - 718659445294
View all Adobe 27510753 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 165 highlights
Adobe InDesign CS2 Scripting Guide Working with Documents in VBScript 157 Use the same property to apply a master spread to a master spread page: Rem ApplyMasterToMaster.vbs Rem An InDesign CS2 VBScript Rem Applies a master page to a master page. Rem Assumes that the default master spread name is "A-Master". Set myInDesign = CreateObject("InDesign.Application.CS2") Set myDocument = myInDesign.Documents.Add Rem Create a new master spread. Set myBMaster = myDocument.MasterSpreads.Add myBMaster.NamePrefix = "B" myBMaster.BaseName = "Master" Rem Apply master spread "A" to the first page of the new master spread. myInDesign.ActiveDocument.MasterSpreads.Item("B-Master").Pages.Item(1).AppliedMaster = myInDesign. ActiveDocument.MasterSpreads.Item("A-Master") Setting text-formatting defaults You can set the default text-formatting attributes for your application or for individual documents. If you set the text-formatting defaults for the application, they become the defaults for all new documents-existing documents remain unchanged. When you set the text-formatting defaults for a document, any new text that you put into the document uses those defaults, and any existing text remains unchanged. Setting application text defaults To set the text-formatting defaults for your application: Rem ApplicationTextDefaults.vbs Rem An InDesign CS2 VBScript Rem Sets the application text defaults, which will become the text formatting Rem defaults for all new documents. Existing documents will remain unchanged. Set myInDesign = CreateObject("InDesign.Application.CS2") With myInDesign.TextDefaults .AlignToBaseline = True Rem The following settings have a chance of generating Rem errors when the specific fonts, font styles, and/or Rem languages are not installed on your system. Disable Rem error handling to skip any errors. On Error Resume Next .AppliedFont = myInDesign.Fonts.Item("Minion Pro") .FontStyle = "Normal" .AppliedLanguage = "English: USA" Rem Reinstate normal error handling. On Error GoTo 0 .AutoLeading = 100 .BalanceRaggedLines = False .BaselineShift = 0 .Capitalization = idCapitalization.idNormal .Composer = "Adobe Paragraph Composer" .DesiredGlyphScaling = 100 .DesiredLetterSpacing = 0 .DesiredWordSpacing = 100 .DropCapCharacters = 0 Rem If DropCapCharacters = 0, then trying to set the DropCapLines Rem property will generate an error. If .DropCapCharacters 0 Then .DropCapLines = 3 Rem Assumes that the application has a default Rem character style named "myDropCap" .DropCapStyle = myInDesign.CharacterStyles.Item("myDropCap") End If .FillColor = myInDesign.Colors.Item("Black") .FillTint = 100