A Basic InDesign Script (2)
The Visual Basic Code
Note: Adapted from the script on page 17 of the Adobe
InDesign 2.0 Scripting Guide.
Remark statements are
shown in red.
Rem A First InDesign Script.
Dim myInDesign As InDesign.Application
Set myInDesign = CreateObject("InDesign.Application.2.0")
Rem Create a new publication and assign it to the variable "myDocument."
Set myDocument = myInDesign.Documents.Add
Rem Create a new text frame and assign it to the variable "myFrame."
Set myFrame = myDocument.Spreads.Item(1).TextFrames.Add
Rem Specify the size and shape of the text frame.
myBounds = Array("7p5", "9p3", "10p0", "42p10")
Rem Place the text.
myFrame.TextContents = "A First InDesign Script"