Adobe 27510753 - InDesign CS2 - PC Manual page 172

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

Advertisement

164
Working with Documents in VBScript
End With
With .Guides.Add
End With
With .Guides.Add
End With
Set myLeftFooter = .TextFrames.Add
myLeftFooter.ItemLayer = myDocument.Layers.Item("Footer")
myLeftFooter.GeometricBounds = Array(myBottomMargin + 14, .MarginPreferences.Right,
myBottomMargin + 28, myRightMargin)
myLeftFooter.ParentStory.InsertionPoints.Item(1).Contents = idSpecialCharacters.
idSectionMarker
myLeftFooter.ParentStory.InsertionPoints.Item(1).Contents = idSpecialCharacters.idEmSpace
myLeftFooter.ParentStory.InsertionPoints.Item(1).Contents = idSpecialCharacters.
idAutoPageNumber
myLeftFooter.ParentStory.Characters.Item(1).AppliedCharacterStyle = myDocument.
CharacterStyles.Item("page_number")
myLeftFooter.ParentStory.Paragraphs.Item(1).ApplyStyle myDocument.ParagraphStyles.
Item("footer_left"), False
Rem Slug information.
myDate = Date
With myDocument.MetadataPreferences
& vbCrLf & _
.GetProperty("http://ns.adobe.com/xap/1.0/", "email/*[1]")
End With
Set myLeftSlug = .TextFrames.Add
myLeftSlug.ItemLayer = myDocument.Layers.Item("Slug")
myLeftSlug.GeometricBounds = Array(myDocument.DocumentPreferences.PageHeight + 36,
.MarginPreferences.Right, myDocument.DocumentPreferences.PageHeight + 144, myRightMargin)
myLeftSlug.Contents = myString
myLeftSlug.ParentStory.Texts.Item(1).ConvertToTable
Rem Body text master text frame.
Set myLeftFrame = .TextFrames.Add
myLeftFrame.ItemLayer = myDocument.Layers.Item("BodyText")
myLeftFrame.GeometricBounds = Array(.MarginPreferences.Top, .MarginPreferences.Right,
myBottomMargin, myRightMargin)
End With
With .Pages.Item(2)
myTopMargin = .MarginPreferences.Top
myBottomMargin = myDocument.DocumentPreferences.PageHeight - .MarginPreferences.Bottom
myRightMargin = myDocument.DocumentPreferences.PageWidth - .MarginPreferences.Right
myLeftMargin = .MarginPreferences.Left
With .Guides.Add
End With
With .Guides.Add
End With
Set myRightFooter = .TextFrames.Add
myRightFooter.ItemLayer = myDocument.Layers.Item("Footer")
myRightFooter.GeometricBounds = Array(myBottomMargin + 14, .MarginPreferences.Left,
.ItemLayer = myDocument.Layers.Item("GuideLayer")
.Orientation = idHorizontalOrVertical.idHorizontal
.Location = myBottomMargin
.FitToPage = False
.ItemLayer = myDocument.Layers.Item("GuideLayer")
.Orientation = idHorizontalOrVertical.idHorizontal
.Location = myBottomMargin + 14
.FitToPage = False
.ItemLayer = myDocument.Layers.Item("GuideLayer")
.Orientation = idHorizontalOrVertical.idHorizontal
.Location = myBottomMargin + 28
.FitToPage = False
myString = "Author:" & vbTab & .Author & vbTab & "Description:" & vbTab & .Description
"Creation Date:" & vbTab & myDate & vbTab & "Email Contact" & vbTab &
.ItemLayer = myDocument.Layers.Item("GuideLayer")
.Orientation = idHorizontalOrVertical.idVertical
.Location = myLeftMargin
.ItemLayer = myDocument.Layers.Item("GuideLayer")
.Orientation = idHorizontalOrVertical.idVertical
.Location = myRightMargin
Adobe InDesign CS2 Scripting Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Indesign cs2

Table of Contents