288 44 10MB
English Pages 1829 Year 2003
AdobeInDesignCS ScriptingGuide
version .0
4 September, 2003
ADOBE SYSTEMS INCORPORATED Corporate Headquarters
345 Park Avenue San Jose, CA 950-2704 (408) 536-6000
Adobe InDesign CS Scripting Guide Copyright 2003 Adobe Systems Incorporated. All rights reserved. he information in this document is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in this document. he sotware described in this document is furnished under license and may only be used or copied in accordance with the terms of such license. Acrobat, Adobe, InCopy, and InDesign are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Macintosh and Apple are registered trademarks, and Mac OS and AppleScript are trademarks of Apple Computer, Inc. registered in the United States and other countries. Microsot, Visual Basic, Windows, Windows 95, Windows 98, and Windows NT are either registered trademarks or trademarks of Microsot Corporation in the United States and/or other countries. All other brand and product names are trademarks or registered trademarks of their respective holders.
Introduction
If you’re reading this, you’ve discovered the most powerful feature in InDesign. No other feature—no tool, palette, or dialog box that you see in the program’s user interface—can save you as much time, trouble, and money as scripting.
What is scripting? A script is a series of commands that tell InDesign to perform a series of actions. hese actions can be simple, and affect only a single, selected object in the current publication; or complex, and affect all of the objects in all of the InDesign publications on your hard drive. he actions might involve only InDesign, or they might involve other applications, such as word processors, spreadsheets, and database management programs. Virtually every task you can perform by manipulating InDesign’s tools, menus, palettes, and dialog boxes can be performed by a script. We naturally think of scripting as a way to automate repetitive tasks, but it can also be a creative tool. In addition to performing routine production tasks, such as preparing a set of publications for remote printing, you can use scripts for creative tasks that would be too difficult or time consuming to do yourself. For example, you could write a script to randomly change the font and color of the characters in a selection, or gradually increase the size and baseline shit of characters from one end of a range of text to the other. Without scripting, you might not use these creative effects. Scripting isn’t only for sotware engineers—it’s for every InDesign user. You don’t need a degree in computer science or mathematics to write scripts that can automate a wide variety of common page layout tasks in InDesign. If you can read this text, you can write InDesign scripts. We realize, however, that not every InDesign user will be familiar with programming terms, concepts, and techniques, so we’ve included a chapter, “Getting Started with InDesign Scripting,” containing introductory information that should help get you started with scripting (even if you’re experienced with AppleScript, Visual Basic, or JavaScript, you should read this chapter, as it covers a number of InDesign-specific matters). At the same time, we cannot fully document AppleScript, Visual Basic, or JavaScript, so you’ll probably also need documentation for any or all of those scripting languages. On the Macintosh, scripting is accomplished using AppleScript, a scripting system that sends messages to applications or to the operating system using AppleEvents. In Windows, Visual Basic programs use a similar system for interapplication communication, usually referred to as Windows Automation. InDesign JavaScripts, by contrast, run on either platform. he terminology differs among the scripting languages, but the idea is the same— to send information from one program (the scripting system) to another program (InDesign) to make the receiving application perform some task. his doesn’t mean that all applications can be controlled by scripts. For scripting to work, an application has to receive messages from another application, and has to be able to turn those messages into actions. Next, the messages you send to an application have to be constructed in a particular way, or the application won’t be able to understand what you want it to do. You can think of this book as a kind of “language lesson”—in it, we’ll show you how to talk to InDesign.
InDesign CS Scripting Guide Introduction 1
Why use scripting? Graphic design is a field characterized by creativity, but most of the actual work of page layout is anything but creative. When you think about the work that you do, chances are good you’ll find that you spend most of your time doing the same or similar production tasks, over and over again. In fact, you’ll probably notice that the time you spend placing and replacing images, correcting errors in text, and preparing files for printing at an imagesetting service provider oten reduce the time you have available for doing creative work. Wouldn’t it be great if you could hire an assistant—one that wouldn’t mind doing some or all of the boring, repetitive tasks for you? If you could do that, you’d have more time to concentrate on the creative aspects of your work. With a small investment of time, InDesign scripting can be the page layout assistant you need. You can start with short, simple scripts that save you a few seconds every day, and move on to scripts that work all night while you’re sleeping. hink about your work—is there a repetitive task that’s driving you crazy? If so, you’ve identified a candidate for a script. hink analytically about the task. What are the steps involved in performing the task? What are the conditions in which you need to do the task? Once you understand the process you go through, you’ll be able to turn it into a script.
What about macros? A macro is a recording of a series of user interface actions—menu choices, key presses, and mouse movements. When you “play” a macro, the macro performs all of the recorded actions. You create macros using special utility programs. QuicKeys, from CE Sotware, is an example of a macro-creating program. Many people are confused about the difference between macros and scripting. Macros and scripts are both ways of automating repetitive tasks, but they work very differently. he following points summarize the key differences. • Macros use a program’s user interface to do their work. As a macro runs, it displays and closes dialog boxes, pulls down menus and makes menu choices, and types text into documents or fields. Scripts do not use a program’s user interface to perform their tasks, and execute far faster than the fastest macro. • Macros have very limited facilities for getting and responding to information from a program. Scripts are capable of getting information and making decisions and calculations based on the information they receive.
System requirements he language you use to write scripts depends on the scripting system of the platform you’re using: Visual Basic for Windows; AppleScript for the Macintosh, or JavaScript for either platform. While the scripting systems differ, the ways that they work with InDesign are very similar. Each example script shown in this manual will be shown in both systems. Translating a script from one system to another is a fairly easy task.
Macintosh To write AppleScripts on the Macintosh, you must have AppleScript (it comes with all Apple systems, or can be downloaded for free from Apple’s web site) version 1.6 or higher, and an AppleScript script editor. Apple’s Script Editor is included with the Mac OS; third-party script editors, such as Script Debugger (from Late Night Sotware, http://www.latenightsw.com), are also available.
2
Introduction
InDesign CS Scripting Guide
Windows To use InDesign scripting in Windows, you’ll need some version of Microsot Visual Basic—Visual Basic 5 Control Creation Edition (CCE), Visual Basic 6, Visual Basic .NET, VBScript, or an application that contains Visual Basic for Applications (VBA). Microsot Office, Visio, AutoCAD, and other programs include VBA. While InDesign supports VBA, it does not include VBA. If you do not already have one of the Visual Basic versions, you can use the Visual Basic 5.0 Control Creation Edition, available for free download from http://msdn.microsot.com. Visual Basic applications require certain external components in order to run. If you’re having trouble running the compiled scripting examples, you’ll need to install some or all of the following files: • MSVBVM60.DLL • STDOLE2.TLB • OLEAUT32.DLL • OLEPRO32.DLL • COMCAT.DLL • ASYNCFILT.DLL • CTL3D32.DLL hese files are available for download from http://support.microsot.com/download/support/mslfiles/Vbrun60.exe. To create InDesign scripts using VBScript ( “stripped down” version of Visual Basic), all you need is a text editor (Notepad will do). To run the VBScripts, you use the free Windows Scripting Host (WSCRIPT.EXE). he Windows Scripting Host is included with most current Windows installations, or can be downloaded from: http://msdn. microsot.com. To use InDesign scripting in Windows, you must install InDesign from a user with Administrator privileges. Ater you’ve completed the installation, any user can run InDesign scripts, and any user with Power User or Adminstrator priveleges can add scripts to the InDesign Scripts palette.
JavaScript InDesign also supports JavaScript for cross-platform scripting. InDesign’s JavaScript support is based on an Adobe implementation of JavaScript known as ExtendScript. he ExtendScript interpreter conforms to the current ECMA 262 standard for JavaScript. All language features of JavaScript 1.5 are supported, including try/catch/finally, equality operators, and the new instanceof and in operators. Adobe GoLive also uses the ExtendScript JavaScript interpreter. InDesign JavaScript files must be run from the Scripts palette, which guarantees that they are interpreted by the ExtendScript interpreter. hese scripts will not run from your operating system (as Jscripts would in Windows or OSA JavaScripts would on the Mac OS). InDesign JavaScript files must have the file extension “.js” to be recognized by the Scripts palette.
InDesign CS Scripting Guide Introduction 3
InDesign scripting resources In addition to this Guide, you can find more information on InDesign scripting at adobe.com. he InDesign scripting community has its own user to user forum (at http://www.adobeforums.com), where scripters can ask questions, post answers, and show off their newest scripts. At the time of this writing, the forum contains literally hundreds of example scripts.
4
Introduction
InDesign CS Scripting Guide
Getting Started with InDesign Scripting
If you’ve used InDesign, you’ve worked with frames and their contents, and you’ve learned to apply colors, formatting, and styles. You’ve set up publications, spreads, pages, and the design elements on those pages. If you’ve done all of this, you’ve gotten used to thinking of an InDesign publication as a series of objects. InDesign scripting relies on the same approach. he heart of InDesign scripting is the object model: a description of all of the types of items—documents, spreads, pages, frames, and the contents of those frames—that can appear in an InDesign publication. Each type of object has its own special properties, and every object in an InDesign publication has its own identity. In this chapter, we’ll cover the basic concepts of scripting, or programming, for both Windows and the Macintosh. For more detailed directions on using your particular scripting system with InDesign, see the appropriate reference chapter later in this manual. Experienced scripters might want to skip directly to those chapters.
Objects he terminology of object oriented programming can be hard to understand, at first. “Objects” belong to “classes,” and have “properties” you manipulate using “methods” (Windows) or “commands” (Macintosh). What do these words mean in this context? Here’s a way to think about objects and object properties. Imagine that you live in a house that responds to your commands (you can think of this house as technologically advanced, or magical, or both). he object properties of your house might include the number of rooms, the color of the exterior paint, or the date of its construction. Each object in the house can respond to various methods according to its capabilities. Windows and doors, for example, can open or close—but the floor and ceiling cannot. Imagine that the house can change some of its properties—if given the right sort of command. You might say, “House, paint yourself blue.” Because your house can respond to the method “paint,” you’ll soon have a house of a different color. Next, your house contains a number of smaller objects. Each room, for example, might be an object, with each window, door, or appliance being other objects inside the room. You can talk to these objects directly, or you can talk to them through the house. You have to be very specific, though—you can’t tell your house to open a window without telling it which window you want to open. You can also give commands to the objects inside the rooms. “Tell the kitchen to open the north window,” you might say. Some properties of objects can be changed; some cannot. he location of a piece of furniture can be changed; the construction date of the house cannot. Properties that can be changed are “read/write”; properties that cannot be changed are “read only.” To apply this metaphor to InDesign—the application is the house, the spreads and pages are the rooms, and the frames on your pages are the windows and doors. You can tell InDesign pages to add frames, and you can tell frames to change their attributes or content. You can then tell the frames to change color, or import a graphic, or populate themselves with text. Objects in your publication are arranged in a hierarchy—frames are on pages, which are inside a document, which is inside InDesign. When we speak of an “object model,” or a “hierarchy,” we’re talking about this structure.
Object references When you send a command to an InDesign object, you need to make sure you send the message to the right object—the correct “address.” To do this, you identify objects by their position in the hierarchy. he following examples show how to refer to the first text frame of the first spread of the active document (note that these are not complete scripts).
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 5
AppleScript firsttextframeofthefirstspreadofthefirstdocument
Visual Basic Documents.Item(1).Spreads.Item(1).TextFrames.Item(1)
JavaScript app.documents.item(0).spreads.item(0).textFrames.item(0)
When you identify an object in this fashion, you’re creating an object reference. Visual Basic and AppleScript use different ways to create object references, but the idea is the same—to give the script a road map to the object you want to work with. AppleScript Note: When your script refers to a text object, InDesign returns the text contained in the object—not a reference to the object itself. To get a reference to the text object, use the object reference property, as shown below. tellapplication"InDesignCS" setmyDocumenttomakedocument tellspread1ofmyDocument setmyTextFrametomaketextframe setcontentsofmyTextFrameto"InDesign" --Thefollowinglinewouldreturnthetext"InDesign" getparagraph1ofmyTextFrame --Thefollowinglinewouldreturnatextobject getobjectreferenceofparagraph1ofmyTextFrame endtell endtell
Object classes Objects with similar qualities are grouped into “classes.” In InDesign, every type of frame—rectangles, polygons, ovals, and freeform paths—belongs to the class “PageItems,” and shares properties with every other member of that class. Properties such as the geometric location of the object on the page, for example, are common to all PageItems.
Comments Comments are a way to add descriptive text to a script. Comments are ignored by the scripting system as the script executes—this keeps comments from producing errors when you run your script. Comments come in handy when you want to document the operation of a script (for yourself or for someone else). To enter a comment in an AppleScript, type “--” to the let of your comment. In Visual Basic, enter “Rem” (for “remark”) or “’” (a single straight quote) to the let of the comment. Enter the comment marker at the beginning of a line to make the entire line a comment. In JavaScript, enter “//” to the let of the comment, or surround the comment with “/*” and “*/”.
AppleScript --thisisacomment (*andsoisthis*)
Visual Basic Remthisisacomment ‘andsoisthis
6
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
JavaScript //thisisacomment /*andsoisthis*/
Values he point size of a character of text, the horizontal location of a text frame on a page, or the color used to format the stroke of a rectangle are all examples of values used in InDesign scripting. Values are the data your scripts use to do their work. he type of a value defines what sort of data the value contains. he value type of the contents of a word, for example, is a text string; the value type of the leading of a paragraph is a number. Most of the time, the values used in your scripts will be numbers or text. he following table explains the value types most commonly used in InDesign scripting. Value type: boolean integer
double (Visual Basic), fixed or real (AppleScript), floating point (JavaScript) string array (Visual Basic, JavaScript) or list (AppleScript)
What it is: Logical True or False
Example:
Whole numbers (no decimal points). Integers can be positive or negative. In Visual Basic, you can use the long data type for integers. In AppleScript, you can also use the fixed or long data types for both integers and real numbers. A high-precision number which may contain a decimal point.
14
A series of text characters. Strings appear inside (straight) quotation marks A list of values (the values can be any type).
"Iamastring"
True
13.9972
{"0p0","0p0","16p4","20p6"}in AppleScript,orArray("0p0","0p0", "16p4","20p6")inVisualBasic,or ["0p0","0p0","16p4","20p6"]in JavaScript.
Variables Variables are containers for data. A variable might hold a number, a string of text, or a reference to an InDesign object. Variables have names, and you refer to a variable by its name. To put data into a variable, we assign the data to the variable. he file name of the current InDesign publication, the current date and time, and the number of pages in the publication are all examples of data that can be assigned to a variable. Why not simply enter the data itself (the publication’s name, or the current date and time, or the number of pages in the publication), rather than using variables? Because, if you do, you’ll end up with a script that will work in only one publication or situation. By using variables, you can write scripts that will work in a wider range of situations. As a script executes, it can assign data to the variables that reflect the current publication and selection (for example), and then make decisions based on the content of the variables. Assigning values or strings to variables is fairly simple, as shown below.
AppleScript setmyNumberto10 setmyStringto"Hello,World!"
Visual Basic myNumber=10 myString="Hello,World!"
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 7
JavaScript varmyNumber=10; varmyString="Hello,World!";
In AppleScript, you can assign a reference to an InDesign object to a variable as you create the object: setmyTextFrametomaketextframewithproperties(geometricbounds:(0,0,3.5,4))
...or you can fill the variable with a reference to an existing object: tellapplication"InDesignCS" setmyTextFrametofirsttextframeofthefirstspreadofthefirstdocument endtell
Visual Basic works about the same way—to assign a variable as you create a frame (“myInDesign” in the following line is a reference to the InDesign application object): SetmyTextFrame=myInDesign.Documents.Item(1).Spreads.Item(1).TextFrames.Add
...or to refer to an existing frame: SetmyTextFrame=InDesign.Documents.Item(1).Spreads.Item(1).TextFrames.Item(1)
he same operation in JavaScript is somewhat more similar to Visual Basic than it is to AppleScript (in InDesign JavaScript, “app” is a reference to the InDesign application): varmyTextFrame=app.documents[0].spreads[0].textFrames[0]; //or varmyTextFrame=app.documents.item(0).spreads.item(0).textFrames.item(0);
Note: In JavaScript, all variables are considered global by default—that is, they are not bound to a specific function. In AppleScript
and Visual Basic, variables are local unless specifically defined as global variables. his means that the variables do not persist outside the function in which they are created. In general, in any of the languages, it’s best to use local variables and pass specific values to functions/subroutines/handlers rather than defining and using global variables. In JavaScript, you define a variable as a local variable using “var,” as shown above. To specify that a number of variables in a JavaScript function are local variables, you can list them at the beginning of the function, as shown below. functionmyFunction(){ varmyNumber,myString; }
About variable names Try to use descriptive names for your variables—something like “firstPage” or “corporateLogo,” rather than “x” or “c.” Using more verbose names makes your script much easier to read, and does not slow the execution of the script. Variable names must be a single word, but you can use internal capitalization (such as “myFirstPage”) or underscore characters (“my_first_page”) to create more readable names. Variable names cannot begin with a number, and they can’t contain punctuation or quotation marks. You might also want to give your variable names a prefix so that they’ll stand out from the objects, commands, and keywords of your scripting system. All of the variables used in this book, for example, begin with “my.”
8
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
To “Set” or not to “Set”? In AppleScript, you use “set” to assign any value type to a variable: setmyDocumenttoactivedocument setmyStringto"X"
In Visual Basic versions other than VB.NET, you use “Set” to assign object references to variables, but not to string, array, and number variable types. SetmyDocument=myInDesign.Documents.Add myString="X"
In VB.NET, you do not need to use “Set” for object variables. myDocument=myInDesign.Documents.Add myString="X"
Like VB.NET, JavaScript does not require “Set” when you are assigning values to variables, regardless of the type of the variable. myDocument=app.documents.add(); myString="X";
About array variables AppleScript, Visual Basic, and JavaScript all support arrays—a variable type that is a list of values. In AppleScript, an array is called a “list.”
AppleScript setmyArrayto{1,2,3,4}
Visual Basic myArray=Array(1,2,3,4) RemInVisualBasic.NET:myArray=NewDouble(1,2,3,4)
JavaScript myArray=[1,2,3,4];
To refer to an item in an array, you refer to the item by its index in the array. he first item in an array in Visual Basic and JavaScript is item 0; in AppleScript, the first item in an array is item 1.
AppleScript setmyFirstArrayItemtoitem1ofmyArray
Visual Basic myFirstArrayItem=myArray(0)
Note: Visual Basic’s Option Base statement can be used to set the first item of an array to item 1. he examples in this book and on your InDesign CD assume that the first item in an array is item 0, not item 1, as that is the default. If you have set the Option Base to 1, you will need to adjust all of the array references in the example scripts accordingly.
JavaScript myFirstArrayItem=myArray[0];
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 9
Arrays can include other arrays, as shown below.
AppleScript setmyArrayto{{0,0},{72,72}}
Visual Basic myArray=Array(Array(0,0),Array(72,72)) RemInVisualBasic.NET:myArray=NewArray(NewDouble(0,0),NewDouble(0,0))
JavaScript myArray=[[0,0],[72,72]];
Converting values from one type to another All of the scripting languages supported by InDesign provide ways to convert variable values from one type to another. he most common conversions involve converting numbers to strings (so that you can enter them in text or display them in dialog boxes) or converting strings to numbers (so that you can use them to set a point size or page location).
AppleScript --Toconvertfromanumbertoastring: setmyNumberto2 setmyStringto(myNumberasstring) --Toconvertfromastringtoanumber: setmyStringto"2" setmyNumberto(myStringasinteger) --ifyourstringcontainsadecimalvalue,use"asreal"ratherthan"asinteger"
Visual Basic RemToconvertfromanumbertoastring: myNumber=2 myString=cstr(myNumber) RemToconvertfromastringtoaninteger: myString="2" myNumber=cInt(myString) RemIfyourstringcontainsadecimalvalue,use"cDbl"ratherthan"cInt": myNumber=cDbl(myString)
JavaScript //Toconvertfromanumbertoastring: myNumber=2; myString=myNumber+""; //Toconvertfromastringtoaninteger: myString="2"; myNumber=parseInt(myString); //Ifyourstringcontainsadecimalvalue,use"parseFloat"ratherthan"parseInt": myNumber=parseFloat(myString); //Youcanalsoconvertstringstonumbersusingthefollowing: myNumber=+myString;
Finding the value type of a variable Sometimes, your scripts will need to make decisions based on the value type of an object. If you’re working on a script that operates on a text selection, for example, you might want to have that script stop if the type of the selection is a page item. All of the scripting languages feature the ability to get the type of a variable.
10
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
AppleScript --Givenavariableofunknowntype,"myMysteryVariable"... setmyTypetoclassofmyMysteryVariable --myTypewillbeanAppleScripttype(e.g.,rectangle)
Visual Basic RemGivenavariableofunknowntype,"myMysteryVariable"... myType=TypeName(myMysteryVariable) RemmyTypewillbeastringcorrespondingtothevariabletype(e.g.,"Rectangle")
JavaScript //Givenavariableofunknowntype,"myMysteryVariable"... varmyType=typeof(myMysteryVariable); //Ifthevariableisanobject,"typeof"willreturn"object". //Togetthespecifictypeoftheobject,addthefollowing: if(myType=="object"){ myType=myMysteryVariable.constructor.name; } //myTypewillbeastringcorrespondingtotheJavaScripttype(e.g.,"Rectangle")
When you are iterating through a collection, JavaScript will insist that the type of the item is the type of the collection. When you are iterating through a pageItems collection, for example, the type of each item will be “PageItem,” rather than “Rectangle,” “Oval,” “Polygon,” “GraphicLine,” or “TextFrame.” To get the specific type of an item when you are iterating through a collection of unlike items, use the “getElements()” method, as shown below. for(myCounter=0;myCountermyHeight
Would return the value “true” (or 1) if myWidth is greater than myHeight, or “false” (0), if it isn’t. All of the scripting languages provide additional “utility” operators. In AppleScript and Visual Basic, the “&” concatenates (or joins) two strings: "Pride"&"andPrejudice"
...would return the string: "PrideandPrejudice."
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 11
To accomplish the same end using JavaScript, use “+” to join the two strings. "Pride"+"andPrejudice" //returnsthestring:"PrideandPrejudice."
Methods Methods (sometimes called “commands,” or “events”) are the “verbs” of scripting—they’re the parts of the script that make things happen. he type of the object you’re working with determines the number and type of methods you can use to manipulate it. In AppleScript, you’ll use the “make” command to create new objects, “set” to assign values to properties or create object variables. In Visual Basic, you’ll use the “Add” method to create new objects, the “Set” statement to assign InDesign objects to Visual Basic variables, and the = (equals) operator to property values (in Visual Basic.NET, you can omit the “Set”). In JavaScript, you use the “add()” method to create new objects, and use “=” to assign objects to a variable. If you use more than one scripting language, it’s easy to get confused as you switch from one language to another. When you’re using AppleScript, remember that the equals sign is only used in logical statements (“If...”) and that “set” is used for all variable assignment. When you’re using Visual Basic (versions other than VB.NET), keep in mind that “Set” is only used when you are creating an object variable. In JavaScript, the equals sign is used for assigning values to a variable; you use “==” to compare objects. Parameters are “control inputs” to the method—when you create a group, for example, InDesign needs to know which objects to use when creating the new group. his is an example of a required paramter. When you create a new document, you can specify that InDesign base the new document on a document preset, but it’s not required (it’s an optional parameter).
AppleScript In AppleScript, you can also use the “with properties” to specify object properties as the object is created. tellapplication"InDesignCS" --Exampleofanoptionalparameter(requiresthatyouhaveadocumentpreset --named"7x9_book_cover"). setmyDocumenttomakedocumentwithdocumentpreset"7x9_book_cover" tellpage1ofmyDocument --Exampleofusing"withproperties"tospecifyobjectpropertiesasyoucreatetheobject. setmyOvaltomakeovalwithproperties{geometricbounds:{"6p","6p","18p","18p"}} --Another"withproperties"example. setmyRectangletomakerectanglewithproperties{strokeweight:4} --Exampleofarequiredparameter: setmyGrouptomakegroupwithproperties{groupitems:{myOval,myRectangle}} endtell endtell
VBScript SetmyInDesign=CreateObject("InDesign.Application.CS") RemExampleofanoptionalparameter(requiresthatyouhave Remadocumentpresetnamed"7x9_book_cover"). SetmyDocument=myInDesign.Documents.Add(myInDesign.DocumentPresets.Item("7x9_book_cover")) SetmyOval=myDocument.Pages.Item(1).Ovals.Add myOval.GeometricBounds=Array("6p","6p","18p","18p") SetmyRectangle=myDocument.Pages.Item(1).Rectangles.Add myRectangle.StrokeWeight=4 RemExampleofarequiredparameter. SetmyGroup=myDocument.Pages.Item(1).Groups.Add(Array(myOval,myRectangle))
12
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
JavaScript //Exampleofanoptionalparameter(requiresthatyouhave //adocumentpresetnamed"7x9_book_cover"). varmyDocument=app.documents.add(app.documentPresets.item("7x9_book_cover")) //Exampleofsettingobjectpropertiesasyoucreatetheobject. //The"add"methodcantakethreeoptionalparameters.Tosetthepropertiesasyou //createanobject,youmustuse"undefined"foroptionalparametersyoudonotintendtoset. varmyOval=myDocument.pages.item(0).ovals.add(undefined,undefined,undefined,{geometricBounds:["6p","6p", "18p","18p"]}); varmyRectangle=myDocument.pages.item(0).rectangles.add(undefined,undefined,undefined,{strokeWeight:4}); //Exampleofarequiredparameter. varmyGroup=myDocument.pages.item(0).groups.add([myOval,myRectangle]);
Conditional statements If you could talk to InDesign in the course of a work session, you might say, “If the selected object is a rectangle, then set its stroke weight to 12 points.” Conditional statements make decisions—they give your scripts a way to evaluate something (the color of the selected object, or the number of pages in the publication, or the date) and then act according to the result. Conditional statements almost always start with “if.” he following examples check the number of currently open publications. If no publications are open, the scripts display a messages in a dialog box.
AppleScript tellapplication"InDesignCS" if(countdocuments)=0then displaydialog"NoInDesigndocumentsareopen!" endif endtell
Visual Basic DimmyInDesignasInDesign.Application SetmyInDesign=CreateObject("InDesign.Application.CS") IfmyInDesign.Documents.Count=0 MsgBox"NoInDesigndocumentsareopen!" EndIf EndSub
JavaScript if(app.documents.length==0){ alert("NoInDesigndocumentsareopen!"); }
Note: JavaScript uses “==” for comparing values (as in the example above), and “=” for assigning values. Visual Basic and AppleScript use “=” for both purposes.
Control structures If you could talk to InDesign, you might say, “Repeat the following procedure twenty times.” In scripting terms, this sort of direction is called a “control structure.” Control structures provide for repetitive processes, or “loops.” he idea of a loop is to repeat some action over and over again, with or without changes between instances (or “iterations”) of the loop, until some condition is met. Our scripting languages have a variety of different control structures to choose from. he simplest form of a loop is one that repeats some series of script operations a set number of times.
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 13
AppleScript repeatwithcounterfrom1to20 --dosomething endrepeat
Visual Basic Forcounter=1to20 Remdosomething Nextcounter
JavaScript for(varmyCounter=0;myCounter Open Dictionary. he Script Editor displays a standard Open File dialog box. 3. Select the InDesign application and click the OK button. he Script Editor displays a list of InDesign’s objects and commands. You’ll also be able to see the properties associated with each object.
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 17
Visual Basic To view InDesign’s object library in Visual Basic (the steps shown are for Visual Basic 6; Visual Basic 5 CCE and Visual Basic.NET users will see slightly different dialog boxes): 1. In any Visual Basic project, choose Project > References. Visual Basic displays the References dialog box. 2. Turn on the “Adobe InDesign CS Type Library” option from the list of available references and click the OK button If the library does not appear in the list of available references, click the Browse button and locate and select the file “Resources for Visual Basic. tlb” (which is usually inside ~:/Documents and Settings/user_name/ApplicationData/Adobe/InDesign CS—where “user_name” is your user name). Once you’ve found the file, click the Open button to add the reference to your project.
3. Choose View > Object Browser. Visual Basic displays the Object Browser dialog box. 4. Choose “InDesign” from the list of open libraries shown in the Project/Library pop-up menu. Visual Basic displays the objects making up the InDesign object model. 5. Click an object class. Visual Basic displays the properties and methods of the object. For more information on a property or method, select the item—Visual Basic displays the definition of the item at the bottom of the Object Browser window.
18
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
JavaScript and VBScript If you’re using JavaScript or VBScript to write your InDesign scripts, you won’t be able to view the InDesign object model as you can in AppleScript or Visual Basic. Instead, refer to the corresponding reference section of this guide.
Your First InDesign Script he traditional first project in any programming language is to display, or print, the message “Hello World!” In this example, we’ll create a new InDesign publication, then add a frame containing this message.
AppleScript To create an AppleScript script: 1. Locate and open the Apple Script Editor. 2. Enter the following script. he lines preceded by “--” are comments, and will be ignored by the scripting system. hey’re included to describe the operation of the program. As you look through the script, you’ll see how we create, then address each object in turn. he AppleScript command “tell” sets the object that will receive the next message we send. --HelloWorld tellapplication"InDesignCS" --Createanewdocumentandassignits --identitytothevariable"myDocument" setmyDocumenttomakedocument tellmyDocument --Createanewtextframeonthefirstpage. tellpage1 setmyTextFrametomaketextframe --Changethesizeofthetextframe. setgeometricboundsofmyTextFrameto{"0p0","0p0","18p0","18p0"} --Entertextinthetextframe. setcontentsofmyTextFrameto"HelloWorld!" endtell endtell endtell
3. Save the script. 4. Run the script (click the Run button in the Script Editor). InDesign should create a new publication, add a text frame, and enter text. During this process, the Script Editor might ask where your copy of InDesign is located—select the application from the list of applications displayed, and the Script Editor will remember where it is the next time you run the script.
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 19
Visual Basic To create a Visual Basic script (the steps shown are for Visual Basic 6; Visual Basic 5 CCE and Visual Basic.NET users will see slightly different dialog boxes): 1. Start Visual Basic and create a new project. Add the InDesign CS Type Library reference to the project, as shown earlier.
2. Create a new button on the default form. Double-click the button to open the Code window.
3. Enter the following code (between the “Private Sub” and “End Sub: lines defining the code under the button). he lines preceded by “Rem” are comments, and will be ignored by the scripting system. hey’re included to describe the operation of the program. As you look through the script, you’ll see how we create, then address each object in turn. You do not need to enter the comments.
20
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
RemHelloWorld RemDeclarevariabletypes(optionalifOptionExplicitisoff). DimmyInDesignAsInDesign.Application DimmyDocumentAsInDesign.Document DimmyPageAsInDesign.Page DimmyTextFrameAsInDesign.TextFrame RemEndofvariabletypedeclarations. SetmyInDesign=CreateObject("InDesign.Application.CS") RemCreateanewdocument. SetmyDocument=myInDesign.Documents.Add RemGetareferencetothefirstpage. SetmyPage=myDocument.Pages.Item(1) RemCreateatextframe. SetmyTextFrame=myDocument.TextFrames.Add RemSpecifythesizeandshapeofthetextframe. myTextFrame.GeometricBounds=Array("0p0","0p0","18p0","18p0") RemEntertextinthetextframe. myTextFrame.Contents="HelloWorld!"
4. Save the form. 5. Start InDesign. 6. Return to Visual Basic and run the program. 7. Click the button you created earlier. InDesign should create a new publication, create a new text frame, and then enter the text.
VBScript To create a VBasic script: 1. Start any text editor (Notepad, for example). 2. Enter the following code. he lines preceded by “Rem” are comments, and will be ignored by the scripting system. hey’re included to describe the operation of the program. As you look through the script, you’ll see how we create, then address each object in turn. You do not need to enter the comments. RemHelloWorld SetmyInDesign=CreateObject("InDesign.Application.CS") RemCreateanewdocument. SetmyDocument=myInDesign.Documents.Add RemGetareferencetothefirstpage. SetmyPage=myDocument.Pages.Item(1) RemCreateatextframe. SetmyTextFrame=myDocument.TextFrames.Add RemSpecifythesizeandshapeofthetextframe. myTextFrame.GeometricBounds=Array("0p0","0p0","18p0","18p0") RemEntertextinthetextframe. myTextFrame.Contents="HelloWorld!"
3. Save the file as text only to the Scripts folder in the Presets folder inside your InDesign application folder. Give the file the file extension “.vbs”. 4. Display the Scripts palette, if it’s not already visible. Double-click the script name in the palette to run the script.
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 21
JavaScript To create a JavaScript: 1. Using any text editor (including InDesign), enter the following text: //HelloWorld! varmyDocument=app.documents.add(); with(myDocument){ varmyPage=myDocument.pages.item(0); with(myPage){ //Createanewtextframeandassignittothevariable"myTextFrame" varmyTextFrame=textFrames.add(); //Specifythesizeandshapeofthetextframe. myTextFrame.geometricBounds=["0p0","0p0","18p0","18p0"]; //Entertextinthetextframe. myTextFrame.contents="HelloWorld!" } }
2. Save the text as a plain text file with the file extension “.js” in the Scripts folder inside the Presets folder in your InDesign folder. 3. To test the script, double-click the script name in InDesign’s Scripts palette.
Adding features to “Hello World” Next, let’s create a new script that makes changes to the “Hello World” publication we created with our first script. Don’t worry if you’ve closed the publication without saving it—all you have to do to make a new one is run the script again. Our second script will demonstrate how to: • Get the active document. • Use a function (or “handler” in AppleScript) in your script. • Get the page dimensions and page margins of the active publication. • Resize a text frame. • Change the formatting of the text in the text frame.
AppleScript To create the script: 1. Choose File > New in the Script Editor to create a new script. 2. Enter the following code: --Improved"HelloWorld" tellapplication"InDesignCS" --Getareferencetoafont. try --Enterthenameofafontonyoursystem,ifnecessary. setmyFonttofont"Helvetica" endtry --Gettheactivedocumentandassigntheresulttothevariable"myDocument."
22
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
setmyDocumenttoactivedocument tellmyDocument --Usethehandler"myGetBounds"togettheboundsofthe --"livearea"insidethemarginsofpage1. setmyBoundstomyGetBounds(myDocument,page1) telltextframe1ofpage1 --Resizethetextframetomatchthepagemargins. setgeometricboundstomyBounds tellparagraph1 --Changethefont,size,andparagraphalignment. try setappliedfonttomyFont endtry setpointsizeto72 etjustificationtocenteralign endtell endtell endtell endtell --myGetBoundsisahandlerthatreturnstheboundsofthe"livearea"ofapage. onmyGetBounds(myDocument,myPage) tellapplication"InDesignCS" setmyPageHeighttopageheightofdocumentpreferencesofmyDocument setmyPageWidthtopagewidthofdocumentpreferencesofmyDocument setmyLefttoleftofmarginpreferencesofmyPage setmyToptotopofmarginpreferencesofmyPage setmyRighttorightofmarginpreferencesofmyPage setmyBottomtobottomofmarginpreferencesofmyPage endtell setmyRighttomyLeft+(myPageWidth-(myRight+myLeft)) setmyBottomtomyTop+(myPageHeight-(myBottom+myTop)) return{myTop,myLeft,myBottom,myRight} endmyGetBounds
3. Save the script. Make sure you have the “Hello World” document open, then run the script.
Visual Basic To create the script: 1. Open the project you created for the “Hello World” script, if it’s not already open. 2. Add a new button to the form. 3. Double-click the button to display the Code window, then enter the following code. RemImproved"HelloWorld" RemDeclarevariabletypes(optionalifOptionExplicitisoff) DimmyInDesignAsInDesign.Application DimmyDocumentAsInDesign.Document DimmyPageAsInDesign.Page DimmyStoryAsInDesign.Story DimmyTextFrameAsInDesign.TextFrame RemEndofvariabletypedeclarations. SetmyInDesign=CreateObject("InDesign.Application.CS") RemEnterthenameofafontonyoursystem,ifnecessary.
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 23
SetmyFont=myInDesign.Fonts.Item("Arial") SetmyDocument=myInDesign.ActiveDocument SetmyPage=myDocument.Pages.Item(1) RemGetpagewidthandpageheightusingthefunction"myGetBounds". myBounds=myGetBounds(myDocument,myPage) SetmyTextFrame=myPage.TextFrames.Item(1) RemResizethetextframetomatchthepublicationmargins. myTextFrame.GeometricBounds=myBounds SetmyParagraph=myTextFrame.Paragraphs.Item(1) RemChangethefont,size,andalignment. IfTypeName(myFont)"Nothing"Then myParagraph.AppliedFont=myFont EndIf myParagraph.PointSize=48 myParagraph.Justification=idJustification.idLeftAlign
4. Ater the “End Sub” line, enter the following text to create a function. PrivateFunctionmyGetBounds(myDocument,myPage) RemDeclarevariabletypes(optionalifOptionExplicitisturnedoff) RemOmitifyouareusingVBSCript. DimmyPageHeight,myPageWidth,myTop,myLeft,myRight,myBottomAsDouble RemEndofvariabledeclaractions. myPageHeight=myDocument.DocumentPreferences.PageHeight myPageWidth=myDocument.DocumentPreferences.PageWidth myTop=myPage.MarginPreferences.Top myLeft=myPage.MarginPreferences.Left myRight=myPage.MarginPreferences.Right myBottom=myPage.MarginPreferences.Bottom myRight=myPageWidth-myRight myBottom=myPageHeight-myBottom myGetBounds=Array(myTop,myLeft,myBottom,myRight) RemIfyouareusingVB.NET,replacethelineabovewiththefollowing: RemmyGetBounds=NewDouble(myTop,myLeft,myBottom,myRight) EndFunction
5. Save the form. Make sure you have the “Hello World” document open, then click the button you created in Step 2 to run the script.
VBScript To create the script: 1. Start any text editor (Notepad, for example). 2. Enter the following code. he lines preceded by “Rem” are comments, and will be ignored by the scripting system. hey’re included to describe the operation of the program. As you look through the script, you’ll see how we create, then address each object in turn. You do not need to enter the comments. RemImproved"HelloWorld" SetmyInDesign=CreateObject("InDesign.Application.CS") RemEnterthenameofafontonyoursystem,ifnecessary. SetmyFont=myInDesign.Fonts.Item("Arial") SetmyDocument=myInDesign.ActiveDocument SetmyPage=myDocument.Pages.Item(1) RemGetpagewidthandpageheightusingthefunction"myGetBounds". myBounds=myGetBounds(myDocument,myPage)
24
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
SetmyTextFrame=myPage.TextFrames.Item(1) RemResizethetextframetomatchthepublicationmargins. myTextFrame.GeometricBounds=myBounds SetmyParagraph=myTextFrame.Paragraphs.Item(1) RemChangethefont,size,andalignment. IfTypeName(myFont)"Nothing"Then myParagraph.AppliedFont=myFont EndIf myParagraph.PointSize=48 myParagraph.Justification=idJustification.idLeftAlign FunctionmyGetBounds(myDocument,myPage) myPageHeight=myDocument.DocumentPreferences.PageHeight myPageWidth=myDocument.DocumentPreferences.PageWidth myTop=myPage.MarginPreferences.Top myLeft=myPage.MarginPreferences.Left myRight=myPage.MarginPreferences.Right myBottom=myPage.MarginPreferences.Bottom myRight=myPageWidth-myRight myBottom=myPageHeight-myBottom myGetBounds=Array(myTop,myLeft,myBottom,myRight) RemIfyouareusingVB.NET,replacethelineabovewiththefollowing: RemmyGetBounds=NewDouble(myTop,myLeft,myBottom,myRight) EndFunction
3. Save the text as a plain text file with the file extension “.vbs” in the Scripts folder inside the Presets folder in your InDesign folder. 4. To test the script, make sure you have the “Hello World” document open, then double-click the script name in InDesign’s Scripts palette.
JavaScript 1. Enter the following JavaScript in a new text file. //ImprovedHelloWorld! //Enterthenameofafontonyoursystem,ifnecessary. myFont=app.fonts.item("Arial"); varmyDocument=app.activeDocument with(myDocument){ varmyPage=pages.item(0); varmyBounds=myGetBounds(myPage,myDocument); with(myDocument.pages.item(0)){ //Getareferencetothetextframe. varmyTextFrame=textFrames.item(0); //Changethesizeofthetextframe. myTextFrame.geometricBounds=myBounds; varmyParagraph=myTextFrame.paragraphs.item(0); myParagraph.appliedFont=myFont; myParagraph.justification=Justification.leftAlign; myParagraph.pointSize=48; } } //myGetBoundscalculatesandreturntheboundsofthe"livearea"ofthepage. functionmyGetBounds(myPage,myDocument){ vararray=newArray() varitem=0; with(myDocument.documentPreferences){
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 25
}
varmyPageHeight=pageHeight; varmyPageWidth=pageWidth; } with(myPage.marginPreferences){ varmyX1=left; varmyY1=top; varmyY2=bottom; varmyX2=right; } array[item++]=myY1; array[item++]=myX1; array[item++]=myPageHeight-myY2; array[item++]=myPageWidth-myX2; returnarray;
2. Save the text as a plain text file with the file extension “.js” in the Scripts folder inside the Presets folder in your InDesign folder. 3. To test the script, double-click the script name in InDesign’s Scripts palette.
26
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
Adding a user interface If you want your script to collect and act on information entered by you or any other user of your script, you’ll probably want to add a user interface to the script. While AppleScript, VBScript, and JavaScript can create dialog boxes for simple yes/no questions and text entry, you might want to create more complex dialog boxes. While Visual Basic can create complete user interfaces, these run from a separate Visual Basic executable file. InDesign scripting includes the ability to create complex dialog boxes that appear inside InDesign, and look very much like the program’s standard user interface items.
Dialog overview An InDesign dialog is an object like any other in InDesign scripting. he dialog can contain text edit fields (known as “text editbox controls”), number entry fields (“real editbox,” “integer editbox,” and other controls), pop-up menus (“dropdown controls”), controls which combine a text edit field with a pop-up menu (combobox controls), checkboxes (“checkbox controls”) and radio buttons (“radiobutton controls”). Actually, the dialog object itself does not directly contain the controls—that’s the purpose of the dialog column object. Dialog columns give you a way to control the positioning of controls within a dialog box. Inside dialog columns, you can further subdivide the dialog into other dialog columns or border panels (both of which can, if necessary, contain further dialog columns and border panels). border panel
dialog column
dialog column
dialog column
dialog column
static text radiobutton group radiobutton control integer editbox checkbox control
dropdown
Like any other InDesign scripting object, the various parts of a dialog box have their own properties. A checkbox control, for example, has a property for its text (“static label”) and another property for its state (“checked state”). he dropdown control has a property for setting the list of options that appear on the control’s menu (“string list”). To use a dialog box in your script, you create the dialog box object, populate it with various controls, display the dialog box, and then gather values from the dialog box controls for use in your script. Dialogs remain in InDesign’s memory until they are destroyed. his means that you can keep a dialog box in memory and have data stored in its properties used by multiple scripts, but it also means that the dialog boxes take up memory and should be disposed of when the are not in use. In general, you should destroy the dialog box object before your script finishes execution.
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 27
Adding a user interface to “Hello World” In this example, we’ll add a simple user interface to our “Hello World” script. he options in the dialog box will provide a way for you to specify the example text (we assume you’re tired of the phrase “Hello World” by now) and change the point size of the text. hese examples also use a handler (AppleScript), or function (VBScript, JavaScript) to get the “live area” of the current page (“myGetBounds”).
AppleScript 1. Enter the following AppleScript in your script editor. --SimpleUserInterfaceExample tellapplication"InDesignCS" activate setmyDocumenttomakedocument setmyDialogtomakedialog tellmyDialog setnameto"SimpleUserInterfaceExampleScript" setmyDialogColumntomakedialogcolumn tellmyDialogColumn --Createatextentryfield. setmyTextEditFieldtomaketexteditboxwithproperties{editcontents:"HelloWorld!",minwidth:180} --Createanumber(real)entryfield. setmyPointSizeFieldtomakerealeditboxwithproperties{editcontents:"72"} endtell show --Getthesettingsfromthedialogbox. --Getthepointsizefromthepointsizefield. setmyPointSizetoeditcontentsofmyPointSizeFieldasreal --Gettheexampletextfromthetexteditfield. setmyStringtoeditcontentsofmyTextEditField --Removethedialogboxfrommemory. destroymyDialog endtell tellpage1ofmyDocument --Createatextframe. setmyTextFrametomaketextframe setgeometricboundsofmyTextFrametomymyGetBounds(myDocument,page1ofmyDocument) --Applythesettingsfromthedialogboxtothetextframe. setcontentsofmyTextFrametomyString --Setthepointsizeofthetextinthetextframe. setpointsizeoftext1ofmyTextFrametomyPointSize endtell endtell onmyGetBounds(myDocument,myPage) tellapplication"InDesignCS" setmyPageHeighttopageheightofdocumentpreferencesofmyDocument setmyPageWidthtopagewidthofdocumentpreferencesofmyDocument setmyLefttoleftofmarginpreferencesofmyPage setmyToptotopofmarginpreferencesofmyPage setmyRighttorightofmarginpreferencesofmyPage setmyBottomtobottomofmarginpreferencesofmyPage endtell setmyRighttomyLeft+(myPageWidth-(myRight+myLeft)) setmyBottomtomyTop+(myPageHeight-(myBottom+myTop)) return{myTop,myLeft,myBottom,myRight} endmyGetBounds
28
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
2. Save the text as a compiled script in the Scripts folder inside the Presets folder in your InDesign folder. 3. To test the script, double-click the script name in InDesign’s Scripts palette, or run it from your script editor.
VBScript Because most Visual Basic users will use Visual Basic forms and controls to create user interfaces, the following example is a VBScript. Save this script as a text file with the file extension “.vbs” to the Scripts folder inside the Presets folder in your InDesign folder, then run the script from the Scripts palette. 1. Enter the following VBScript using any text editor. RemSimpleUserInterfaceExample SetmyInDesign=CreateObject("InDesign.Application.CS") SetmyDialog=myInDesign.Dialogs.Add myDialog.CanCancel=True myDialog.Name="SimpleUserInterfaceExampleScript" SetmyDialogColumn=myDialog.DialogColumns.Add SetmyTextEditField=myDialogColumn.TextEditboxes.Add myTextEditField.EditContents="HelloWorld!" myTextEditField.MinWidth=180 RemCreateanumber(real)entryfield. SetmyPointSizeField=myDialogColumn.RealEditboxes.Add myPointSizeField.EditValue=72 myDialog.Show RemGetthevaluesfromthedialogboxcontrols. myString=myTextEditField.EditContents myPointSize=myPointSizeField.EditValue RemRemovethedialogboxfrommemory. myDialog.Destroy RemCreateanewdocument. SetmyDocument=myInDesign.Documents.Add SetmyTextFrame=myDocument.Pages.Item(1).TextFrames.Add RemResizethetextframetothe"live"areaofthepage(usingthefunction"myGetBounds"). myBounds=myGetBounds(myDocument,myDocument.Pages.Item(1)) myTextFrame.GeometricBounds=myBounds RemEnterthetextfromthedialogboxinthetextframe. myTextFrame.Contents=myString RemSetthesizeofthetexttothesizeyouenteredinthedialogbox. myTextFrame.Texts.Item(1).PointSize=myPointSize RemFunctionforgettingtheboundsofthe"livearea" FunctionmyGetBounds(myDocument,myPage) myPageHeight=myDocument.DocumentPreferences.PageHeight myPageWidth=myDocument.DocumentPreferences.PageWidth myTop=myPage.MarginPreferences.Top myLeft=myPage.MarginPreferences.Left myRight=myPage.MarginPreferences.Right myBottom=myPage.MarginPreferences.Bottom myRight=myPageWidth-myRight myBottom=myPageHeight-myBottom myGetBounds=Array(myTop,myLeft,myBottom,myRight) EndFunction
2. Save the text as a plain text file with the file extension “.vbs” in the Scripts folder inside the Presets folder in your InDesign folder. 3. To test the script, double-click the script name in InDesign’s Scripts palette.
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 29
JavaScript 1. Enter the following JavaScript using any text editor. //SimpleUserInterfaceExample varmyDialog=app.dialogs.add({name:"SimpleUserInterfaceExampleScript",canCancel:true}); with(myDialog){ //Addadialogcolumn. with(dialogColumns.add()){ //Createatexteditfield. varmyTextEditField=textEditboxes.add({editContents:"HelloWorld!",minWidth:180}); //Createanumber(real)entryfield. varmyPointSizeField=realEditboxes.add({editValue:72}); } } //Displaythedialogbox. varmyResult=myDialog.show(); if(myResult==true){ //Getthevaluesfromthedialogboxcontrols. varmyString=myTextEditField.editContents; varmyPointSize=myPointSizeField.editValue; //Removethedialogboxfrommemory. myDialog.destroy(); //Createanewdocument. varmyDocument=app.documents.add() with(myDocument){ //Createatextframe. varmyTextFrame=pages.item(0).textFrames.add(); //Resizethetextframetothe"live"areaofthepage(usingthefunction"myGetBounds"). varmyBounds=myGetBounds(myDocument,myDocument.pages.item(0)); myTextFrame.geometricBounds=myBounds; //Enterthetextfromthedialogboxinthetextframe. myTextFrame.contents=myString; //Setthesizeofthetexttothesizeyouenteredinthedialogbox. myTextFrame.texts.item(0).pointSize=myPointSize; } } else{ //UserclickedCancel,soremovethedialogboxfrommemory. myDialog.destroy(); } functionmyGetBounds(myDocument,myPage){ with(myDocument.documentPreferences){ varmyPageHeight=pageHeight; varmyPageWidth=pageWidth; } with(myPage.marginPreferences){ varmyTop=top; varmyLeft=left; varmyRight=right; varmyBottom=bottom; } myRight=myPageWidth-myRight; myBottom=myPageHeight-myBottom; return[myTop,myLeft,myBottom,myRight]; }
30
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
2. Save the text as a plain text file with the file extension “.js” in the Scripts folder inside the Presets folder in your InDesign folder. 3. To test the script, double-click the script name in InDesign’s Scripts palette.
Creating a more complex user interface In the next set of examples, we’ll add more controls and more different types of controls to the example dialog box.
AppleScript 1. Enter the following AppleScript in your script editor. --ComplexUserInterfaceExample tellapplication"InDesignCS" activate setmyDocumenttomakedocument setmyDialogtomakedialog --Thisexampledialogboxusesborderpanelsanddialogcolumnsto --separateandorganizetheuserinterfaceitemsinthedialog. tellmyDialog setnameto"UserInterfaceExampleScript" setmyDialogColumntomakedialogcolumn tellmyDialogColumn setmyBorderPaneltomakeborderpanel tellmyBorderPanel setmyDialogColumntomakedialogcolumn tellmyDialogColumn makestatictextwithproperties{staticlabel:"Message:"} endtell setmyDialogColumntomakedialogcolumn tellmyDialogColumn setmyTextEditFieldtomaketexteditboxwithproperties¬ {editcontents:"HelloWorld!",minwidth:180} endtell endtell setmyBorderPaneltomakeborderpanel tellmyBorderPanel setmyDialogColumntomakedialogcolumn tellmyDialogColumn makestatictextwithproperties{staticlabel:"PointSize:"} endtell setmyDialogColumntomakedialogcolumn tellmyDialogColumn setmyPointSizeFieldtomakerealeditboxwithproperties{editcontents:"72"} endtell endtell setmyBorderPaneltomakeborderpanel tellmyBorderPanel setmyDialogColumntomakedialogcolumn tellmyDialogColumn makestatictextwithproperties{staticlabel:"VerticalJustification:"} endtell setmyDialogColumntomakedialogcolumn tellmyDialogColumn setmyVerticalJustificationMenutomakedropdownwithproperties¬ {stringlist:{"Top","Center","Bottom"},selectedindex:0} endtell
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 31
endtell setmyBorderPaneltomakeborderpanel tellmyBorderPanel makestatictextwithproperties{staticlabel:"ParagraphAlignment:"} setmyParagraphAlignmentGrouptomakeradiobuttongroup tellmyParagraphAlignmentGroup setmyLeftRadioButtontomakeradiobuttoncontrolwithproperties¬ {staticlabel:"Left",checkedstate:true} setmyCenterRadioButtontomakeradiobuttoncontrolwithproperties¬ {staticlabel:"Center"} setmyRightRadioButtontomakeradiobuttoncontrolwithproperties¬ {staticlabel:"Right"} endtell endtell endtell show --Getthesettingsfromthedialogbox. --Getthepointsizefromthepointsizefield. setmyPointSizetoeditcontentsofmyPointSizeFieldasreal --Gettheexampletextfromthetexteditfield. setmyStringtoeditcontentsofmyTextEditField --Gettheverticaljustificationsettingfromthepop-upmenu. ifselectedindexofmyVerticalJustificationMenuis0then setmyVerticalJustificationtotopalign elseifselectedindexofmyVerticalJustificationMenuis1then setmyVerticalJustificationtocenteralign else setmyVerticalJustificationtobottomalign endif --Gettheparagraphalignmentsettingfromtheradiobuttongroup. getpropertiesofmyParagraphAlignmentGroup ifselectedbuttonofmyParagraphAlignmentGroupis0then setmyParagraphAlignmenttoleftalign elseifselectedbuttonofmyParagraphAlignmentGroupis1then setmyParagraphAlignmenttocenteralign else setmyParagraphAlignmenttorightalign endif --Removethedialogboxfrommemory. destroymyDialog endtell tellpage1ofmyDocument setmyTextFrametomaketextframe setgeometricboundsofmyTextFrametomymyGetBounds(myDocument,page1ofmyDocument) --Applythesettingsfromthedialogboxtothetextframe. setcontentsofmyTextFrametomyString --Applytheverticaljustificationsetting. setverticaljustificationoftextframepreferencesofmyTextFrametomyVerticalJustification --Applytheparagraphalignment("justification"). --"text1ofmyTextFrame"isallofthetextinthetextframe. setjustificationoftext1ofmyTextFrametomyParagraphAlignment --Setthepointsizeofthetextinthetextframe. setpointsizeoftext1ofmyTextFrametomyPointSize endtell endtell onmyGetBounds(myDocument,myPage) tellapplication"InDesignCS"
32
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
setmyPageHeighttopageheightofdocumentpreferencesofmyDocument setmyPageWidthtopagewidthofdocumentpreferencesofmyDocument setmyLefttoleftofmarginpreferencesofmyPage setmyToptotopofmarginpreferencesofmyPage setmyRighttorightofmarginpreferencesofmyPage setmyBottomtobottomofmarginpreferencesofmyPage endtell setmyRighttomyLeft+(myPageWidth-(myRight+myLeft)) setmyBottomtomyTop+(myPageHeight-(myBottom+myTop)) return{myTop,myLeft,myBottom,myRight} endmyGetBounds
2. Save the text as a compiled script in the Scripts folder inside the Presets folder in your InDesign folder. 3. To test the script, double-click the script name in InDesign’s Scripts palette, or run it from your script editor.
VBScript Because most Visual Basic users will use Visual Basic forms and controls to create user interfaces, the following example is a VBScript. Save this script as a text file with the file extension “.vbs” to the Scripts folder inside the Presets folder in your InDesign folder, then run the script from the Scripts palette. 1. Enter the following VBScript using any text editor. RemComplexUserInterfaceExample SetmyInDesign=CreateObject("InDesign.Application.CS") myInDesign.Activate SetmyDialog=myInDesign.Dialogs.Add myDialog.CanCancel=True myDialog.Name="UserInterfaceExampleScript" RemCreateadialogcolumn. SetmyDialogColumn=myDialog.DialogColumns.Add RemCreateaborderpanel. SetmyBorderPanel=myDialogColumn.BorderPanels.Add RemCreateadialogcolumninsidetheborderpanel. SetmyTempDialogColumn=myBorderPanel.DialogColumns.Add SetmyStaticText=myTempDialogColumn.StaticTexts.Add myStaticText.StaticLabel="Message:" RemCreateanotherdialogcolumninsidetheborderpanel. SetmyTempDialogColumn=myBorderPanel.DialogColumns.Add SetmyTextEditField=myTempDialogColumn.TextEditboxes.Add myTextEditField.EditContents="HelloWorld!" myTextEditField.MinWidth=180 RemCreateanotherborderpanel. SetmyBorderPanel=myDialogColumn.BorderPanels.Add RemCreateadialogcolumninsidetheborderpanel. SetmyTempDialogColumn=myBorderPanel.DialogColumns.Add SetmyStaticText=myTempDialogColumn.StaticTexts.Add myStaticText.StaticLabel="PointSize:" RemCreateanotherdialogcolumninsidetheborderpanel. SetmyTempDialogColumn=myBorderPanel.DialogColumns.Add SetmyPointSizeField=myTempDialogColumn.RealEditboxes.Add myPointSizeField.EditValue=72 RemCreateanotherborderpanel. SetmyBorderPanel=myDialogColumn.BorderPanels.Add RemCreateadialogcolumninsidetheborderpanel.
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 33
SetmyTempDialogColumn=myBorderPanel.DialogColumns.Add SetmyStaticText=myTempDialogColumn.StaticTexts.Add myStaticText.StaticLabel="VerticalJustification:" RemCreateanotherdialogcolumninsidetheborderpanel. SetmyTempDialogColumn=myBorderPanel.DialogColumns.Add SetmyVerticalJustificationMenu=myTempDialogColumn.Dropdowns.Add myVerticalJustificationMenu.StringList=Array("Top","Center","Bottom") myVerticalJustificationMenu.SelectedIndex=0 RemCreateanotherborderpanel. SetmyBorderPanel=myDialogColumn.BorderPanels.Add RemCreateadialogcolumninsidetheborderpanel. SetmyTempDialogColumn=myBorderPanel.DialogColumns.Add SetmyStaticText=myTempDialogColumn.StaticTexts.Add myStaticText.StaticLabel="ParagraphAlignment:" RemCreateanotherdialogcolumninsidetheborderpanel. SetmyTempDialogColumn=myBorderPanel.DialogColumns.Add SetmyRadioButtonGroup=myTempDialogColumn.RadiobuttonGroups.Add SetmyLeftRadioButton=myRadioButtonGroup.RadiobuttonControls.Add myLeftRadioButton.StaticLabel="Left" myLeftRadioButton.CheckedState=True SetmyCenterRadioButton=myRadioButtonGroup.RadiobuttonControls.Add myCenterRadioButton.StaticLabel="Center" SetmyRightRadioButton=myRadioButtonGroup.RadiobuttonControls.Add myRightRadioButton.StaticLabel="Right" RemIftheuserclickedOK,thencreatetheexampledocument. IfmyDialog.Show=TrueThen RemGetthevaluesfromthedialogboxcontrols. myString=myTextEditField.EditContents myPointSize=myPointSizeField.EditValue RemCreateanewdocument. SetmyDocument=myInDesign.Documents.Add SetmyTextFrame=myDocument.Pages.Item(1).TextFrames.Add RemResizethetextframetothe"live"areaofthepage(usingthefunction"myGetBounds"). myBounds=myGetBounds(myDocument,myDocument.Pages.Item(1)) myTextFrame.GeometricBounds=myBounds RemEnterthetextfromthedialogboxinthetextframe. myTextFrame.Contents=myString RemSetthesizeofthetexttothesizeyouenteredinthedialogbox. myTextFrame.Texts.Item(1).PointSize=myPointSize RemSettheverticaljustificationofthetextframetothedialogmenuchoice. SelectCasemyVerticalJustificationMenu.SelectedIndex Case0 myTextFrame.TextFramePreferences.VerticalJustification=idVerticalJustification.idTopAlign Case1 myTextFrame.TextFramePreferences.VerticalJustification=idVerticalJustification.idCenterAlign CaseElse myTextFrame.TextFramePreferences.VerticalJustification=idTopAlign.idBottomAlign EndSelect Remsettheparagraphalignmentofthetexttothedialogradiobuttonchoice. SelectCasemyRadioButtonGroup.SelectedButton Case0 myTextFrame.Texts.Item(1).Justification=idJustification.idLeftAlign Case1 myTextFrame.Texts.Item(1).Justification=idJustification.idCenterAlign CaseElse myTextFrame.Texts.Item(1).Justification=idJustification.idRightAlign EndSelect
34
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
RemRemovethedialogboxfrommemory. myDialog.Destroy EndIf RemFunctionforgettingtheboundsofthe"livearea" FunctionmyGetBounds(myDocument,myPage) myPageHeight=myDocument.DocumentPreferences.PageHeight myPageWidth=myDocument.DocumentPreferences.PageWidth myTop=myPage.MarginPreferences.Top myLeft=myPage.MarginPreferences.Left myRight=myPage.MarginPreferences.Right myBottom=myPage.MarginPreferences.Bottom myRight=myPageWidth-myRight myBottom=myPageHeight-myBottom myGetBounds=Array(myTop,myLeft,myBottom,myRight) EndFunction
2. Save the text as a plain text file with the file extension “.vbs” in the Scripts folder inside the Presets folder in your InDesign folder. 3. To test the script, double-click the script name in InDesign’s Scripts palette.
JavaScript 1. Enter the following JavaScript using any text editor. //ComplexUserInterfaceExample //Createadialog. varmyDialog=app.dialogs.add({name:"UserInterfaceExampleScript",canCancel:true}); with(myDialog){ //Addadialogcolumn. with(dialogColumns.add()){ //Createaborderpanel. with(borderPanels.add()){ with(dialogColumns.add()){ //Thefollowinglineshowshowtosetapropertyasyoucreateanobject. staticTexts.add({staticLabel:"Message:"}); } with(dialogColumns.add()){ //Thefollowinglineshowshowtosetmultiplepropertiesasyoucreateanobject. varmyTextEditField=textEditboxes.add({editContents:"HelloWorld!",minWidth:180}); } } //Createanotherborderpanel. with(borderPanels.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"PointSize:"}); } with(dialogColumns.add()){ //Createanumberentryfield.NotethatthisfielduseseditValue //ratherthaneditText(asatextEditBoxwould). varmyPointSizeField=realEditboxes.add({editValue:72}); } } //Createanotherborderpanel. with(borderPanels.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"VerticalJustification:"});
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 35
} with(dialogColumns.add()){ //Createapop-upmenu("dropdown")control. varmyVerticalJustificationMenu=dropdowns.add({stringList:["Top","Center","Bottom"], selectedIndex:0}); } } //Createanotherborderpanel. with(borderPanels.add()){ staticTexts.add({staticLabel:"ParagraphAlignment:"}); varmyRadioButtonGroup=radiobuttonGroups.add(); with(myRadioButtonGroup){ varmyLeftRadioButton=radiobuttonControls.add({staticLabel:"Left",checkedState:true}); varmyCenterRadioButton=radiobuttonControls.add({staticLabel:"Center"}); varmyRightRadioButton=radiobuttonControls.add({staticLabel:"Right"}); } } } } //Displaythedialogbox. if(myDialog.show()==true){ varmyParagraphAlignment,myString,myPointSize,myVerticalJustification; //Iftheuserdidn’tclicktheCancelbutton, //thengetthevaluesbackfromthedialogbox. //Gettheexampletextfromthetexteditfield. myString=myTextEditField.editContents //Getthepointsizefromthepointsizefield. myPointSize=myPointSizeField.editValue; //Gettheverticaljustificationsettingfromthepop-upmenu. if(myVerticalJustificationMenu.selectedIndex==0){ myVerticalJustification=VerticalJustification.topAlign; } elseif(myVerticalJustificationMenu.selectedIndex==1){ myVerticalJustification=VerticalJustification.centerAlign; } else{ myVerticalJustification=VerticalJustification.bottomAlign; } //Gettheparagraphalignmentsettingfromtheradiobuttongroup. if(myRadioButtonGroup.selectedButton==0){ myParagraphAlignment=Justification.leftAlign; } elseif(myRadioButtonGroup.selectedButton==1){ myParagraphAlignment=Justification.centerAlign; } else{ myParagraphAlignment=Justification.rightAlign; } myDialog.destroy(); //Nowcreatethedocumentandapplythepropertiestothetext. varmyDocument=app.documents.add(); with(myDocument){ varmyPage=pages[0]; with(myPage){ //Createatextframe. varmyTextFrame=pages.item(0).textFrames.add(); with(myTextFrame){
36
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
//Setthegeometricboundsoftheframeusingthe"myGetBounds"function. geometricBounds=myGetBounds(myDocument,myPage); //Setthecontentsoftheframetothestringyouenteredinthedialogbox. contents=myString; //Setthealignmentoftheparagraph. texts.item(0).justification=myParagraphAlignment; //Setthepointsizeofthetext. texts.item(0).pointSize=myPointSize; //Settheverticaljustificationofthetextframe. textFramePreferences.verticalJustification=myVerticalJustification; } } } } else{ myDialog.destroy() } //Utilityfunctionforgettingtheboundsofthe"livearea"ofapage. functionmyGetBounds(myDocument,myPage){ with(myDocument.documentPreferences){ varmyPageHeight=pageHeight; varmyPageWidth=pageWidth; } with(myPage.marginPreferences){ varmyTop=top; varmyLeft=left; varmyRight=right; varmyBottom=bottom; } myRight=myPageWidth-myRight; myBottom=myPageHeight-myBottom; return[myTop,myLeft,myBottom,myRight]; }
2. Save the text as a plain text file with the file extension “.js” in the Scripts folder inside the Presets folder in your InDesign folder. 3. To test the script, double-click the script name in InDesign’s Scripts palette.
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 37
About error handling Imagine that you’ve written a script that formats the current text selection. What should the script do if the current selection turns out not to be text at all, but a rectangle, oval, or polygon? “Error handling” is code you add to your script to respond to conditions other than those you expect it to encounter. If you have complete control over the situations in which your script will run, there’s no need for you to worry about error handling. If not, however, you’ll have to add some error handling capabilities to your script. he following examples show how to how you can stop a script from executing when no objects are selected in InDesign.
AppleScript tellapplication"InDesignCS" --First,checktoseewhetheranyInDesigndocumentsareopen. --Ifnodocumentsareopen,displayanerrormessage. if(countdocuments)isnotequalto0then setmySelectiontoselection if(countmySelection)isnotequalto0then --Somethingisselected.Ifthiswerearealscript,youwould --nowdosomethingwiththeobjectorobjectsintheselection. displaydialog"Youhave"&(countmySelection)&"itemsselected." else --Noobjectswereselected,sodisplayanerrormessage. displaydialog"NoInDesignobjectsareselected.Pleaseselectanobjectandtryagain." endif else --Nodocumentswereopen,sodisplayanerrormessage. displaydialog"NoInDesigndocumentsareopen.Pleaseopenadocumentandtryagain." endif endtell
Visual Basic DimmyInDesignAsInDesign.Application SetmyInDesign=CreateObject("InDesign.Application.CS") RemFirst,checktoseewhetheranyInDesigndocumentsareopen. RemIfnodocumentsareopen,displayanerrormessage. IfmyInDesign.Documents.Count0Then IfmyInDesign.Selection.Count>0Then RemSomethingisselected.Ifthiswerearealscript,youwould Remnowdosomethingwiththeobjectorobjectsintheselection. MsgBox"Youhave"&CStr(myInDesign.Selection.Count)&"itemsselected." Else RemNothingisselected,sodisplayanerrormessage. MsgBox"NoInDesignobjectsareselected.Pleaseselectanobjectandtryagain." EndIf Else RemNodocumentsareopen,sodisplayanerrormessage. MsgBox"NoInDesigndocumentsareopen.Pleaseopenafileandtryagain." EndIf
38
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
JavaScript //First,checktoseewhetheranyInDesigndocumentsareopen. //Ifnodocumentsareopen,displayanerrormessage. if(app.documents.length>0){ if(app.selection.length>0){ //Somethingisselected.Ifthiswerearealscript,youwould //nowdosomethingwiththeobjectorobjectsintheselection. alert("Youhave"+app.selection.length+"itemsselected.") } else{ //Nothingisselected,sodisplayanerrormessage. alert("Nothingisselected.Pleaseselectanobjectandtryagain.") } } else{ //Nodocumentsareopen,sodisplayanerrormessage. alert("NoInDesigndocumentsareopen.Pleaseopenadocumentandtryagain.") }
You can also use JavaScript’s “try…catch” statement for error handling, as shown in the example below: //Displaythetypeofthefirstitemintheselection. try{ myObjectType=app.selection[0].constructor.name; alert("Thefirstselecteditemisa"+myObjectType+"object."); } catch(e){ if(app.documents.length==0){ //Nodocumentsareopen,sodisplayanerrormessage. alert("NoInDesigndocumentsareopen.Pleaseopenadocumentandtryagain."); } else{ if(app.selection.length==0){ //Nothingisselected,sodisplayanerrormessage. alert("Nothingisselected.Pleaseselectanobjectandtryagain."); } else{ alert("Anerroroccurred,butI’mnotsurewhatitwas."); } } }
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 39
Testing and troubleshooting Scripting environments provide tools for monitoring the progress of your script as it’s running. his makes it much easier for you to track down any problems your script might be encountering or causing.
AppleScript he Apple Script Editor application doesn’t have extensive debugging tools, but it does have the AppleScript Event Log Window. To watch your script send commands to and receive information from InDesign, choose Controls>Open Event Log. he Script Editor displays the Event Log window. Turn on the Show Events and Show Events Results options, and then run your script. As the script executes, you’ll see the commands sent to InDesign, and InDesign’s responses. In addition, the Result window (choose Controls>Show Result) displays the value returned from the most recent script statement.
hird-party AppleScript editors, such as Script Debugger (from Late Night Sotware: www.latenightsw.com) offer far more robust debugging features than the Apple Script Editor. If you will be writing more than a few simple scripts, we strongly recommend that you acquire a script editor with better script debugging capabilities.
Visual Basic In Visual Basic, you can stop your script at any point, and can step through your script one line at a time. You can also observe the values of variables defined in your script using the Watch and Locals windows—two very valuable tool for debugging your scripts.
To view a variable in the Watch window, select the variable and choose Debug>Quick Watch. Visual Basic displays the Quick Watch dialog box. Click the Add button. Visual Basic displays the Watch window. To stop your script at a particular line (so you can get a look at the Watch window, select the line and choose Debug>Toggle Breakpoint. When you run the script, Visual Basic will stop at the breakpoint you set, and you can look at the values in your variables (if you’ve hidden the Watch window, you can display it again by choosing View>Watch Window). Choose Debug>Step Into (or press F8 in Visual Basic 6/F11 in Visual Basic.NET) to execute the next line of your script, or choose Run>Start (or press F5) in Visual Basic 6 or Debug>Start (or press F5) in Visual Basic.NET to continue normal execution of the script. 40
Getting Started with InDesign Scripting
InDesign CS Scripting Guide
JavaScript InDesign’s JavaScript support includes a debugger for examining your scripts as they execute. You can display the debugger at the start of every script, or when a script error occurs, or display the debugger for a single script. Once you’re using the debugger dialog, you can step through the script line-by-line, or examine the contents of variables, or cancel script execution. Using the debugger can greatly assist you in finding and fixing script errors.
he JavaScript debugger is controlled by the setting of the value “$.level”: Value: 0 1 2
What it means: Disable debugging. Break on errors. Break at the beginning of every script.
When the debugger is active (i.e., when the value of $.level is set to something other than 0), you can display the debug window by entering “debugger” or “$.bp()”. To turn on the JavaScript debugger for all scripts, run the following script: //TurntheJavaScriptdebuggeron. alert("JavaScriptDebuggerOn"); $.level=2;
To turn the JavaScript debugger off, run the following script: //TurntheJavaScriptdebuggeroff. alert("JavaScriptDebuggerOff"); $.level=0;
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 41
To display the JavaScript debugger when a scripting error occurs, run the following script: //TurntheJavaScriptonwhenerrorsoccur. alert("JavaScriptDebuggerOff") $.level=1;
To invoke the debugger at any point in a specific script, enter the following lines in the script: //turndebuggingon. $.level=1; //displaythedebugger. debugger; //turndebuggingoffagain(sothatitwon’taffectsubsequentscripts. $.level=0;
You can also display the debugger in response to values in the script, as shown in the following example: //conditional_break.js $.level=1; with(app){ //Use"confirm"todisplayayes/nodialogbox. myValue=confirm("ClickYestostartthedebugger,orclickNotocontinue."); //IftheuserclickedtheYesbutton,displaythedebugger. $.bp(myValue==true); } $.level=0;
To monitor variable values as a script executes in the debugger, you can use the “write” or “writeln” methods, as shown in the example below: //debugger_write.js $.level=2; debugger; with(app){ $.write("DefaultColorNames:"); for(myCounter=0;myCounterKeyboardShortcuts, select an editable shortcut set from the Set pop-up menu, then select Scripts from the Product Area menu. A list of the scripts in your Scripts palette will appear. Select a script and assign a keyboard shortcut as you would for any other InDesign feature.
Using the Script Label palette Many of the objects in the InDesign object model have a label property—it’s a property that can be set to any string of up to 32Kb of text. he main purpose of the label property is to identify objects so that scripts can act on them. One way to assign a label to an object is to use the Script Label palette (choose Window>Script Label).
If the Script Label palette is not available, it’s because the plug-in is not installed or has been disabled. Use the plug-in manager to enable the plug-in, or reinstall the palette. he following examples show how to get a reference to a page item with a given label.
AppleScript --Givenareferencetoapage"myPage"containingatextframewiththelabel"myTargetFrame" tellmyPage setmyTextFrametotextframe"myTargetFrame" endif
Visual Basic RemGivenareferencetoapage"myPage"containingatextframewiththelabel"myTargetFrame" setmyTextFrame=myPage.TextFrames.Item("myTargetFrame")
JavaScript //Assumingthatthefirstpageoftheactivedocumentcontains //atextframewiththelabel"myTargetFrame" with(app.documents.item(0).pages.item(0)){ myTargetFrame=textFrames.item("myTargetFrame"); }
InDesign CS Scripting Guide
Getting Started with InDesign Scripting 45
AppleScript Reference his section describes the objects in the InDesign AppleScript dictionary. he objects are shown in alphabetical order, and each object description shows the object’s elements (objects that are contained within the object), properties (attributes of the object), and methods (commands the object can respond to). Note: Due to the constraints of our page layout, we’ve had to hyphenate some scripting terms. When you are entering the term, do not enter the hyphen. No scripting terms in InDesign contain hyphens.
About long script lines In some cases, individual script lines are too long to print on a single line in this guide. In these cases, we’ve used a special character (¬) to show that the line continues to the next line. his character also denotes a “line end” or “ sot return” in the script. When you copy an example script into your script editor, delete these characters.
About “with properties” Here’s an example script that creates a color and the assigns values to various properties: setmyNewColortomakecolor tellmyNewColor setcolormodeltoprocess setcolorspacetoCMYK setcolorvalueto{30,80,30,10} setnameto"DCG504a" endtell
he following example uses AppleScript’s “with properties” statement to do the same thing as the above example, but executes much faster: setmyNewColortomakecolorwithproperties{colormodel:process,¬ colorspace:CMYK,colorvalue:{30,80,30,10},name:"DCG504a"}
For any “make” method, any required parameters must appear inside a properties record. For the “group” method, for example: --Where“myPage”isapage,“myRectangle”isarectangle,and“myOval”isanoval tellmyPage setmyGrouptomakegroupwithproperties{groupitems:{myRectangle,myOval}} endtell
About properties he properties of an object are the object’s attributes—a character object, for example, has font, font style, point size, and baseline shit properties. Here’s an example property reference table (from the book object): Property:
Type:
Access:
Description:
automatic document conversion
boolean
read/write
Whether to automatically convert document during repagination and synchronization
automatic pagination
boolean
read/write
If true, repaginate the book documents when the book pagination changes.
46
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
file path
file reference or file name as string
read only
he file path to the book file (does not include the file name).
full name
file reference or file name as string
read only
he file path to the book file, including the file name.
index
integer
read only
index of the book within its parent application
insert blank page
boolean
read/write
If true, insert blank pages to meet the odd/even setting.
modified
boolean
read only
If true, the document has been modified since it was last saved.
name
string
read only
he file name of the book.
object reference
book
read only
An object reference to the object.
parent
object
read only
he parent of the object.
print preferences
print preferences
read only
he print preferences of the book.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
repagination option
next page, next odd page, next even page
read/write
Sets the repagination options for the book.
saved
boolean
read only
If true, the document has been saved since it was opened.
style source document
document
read/write
he current master document.
In general, read only properties are either system information (such as the unique id assigned to InDesign objects) or are set as the result of a command (the id of an book, for example, is set when the object is created). he read/write properties, however, can be changed, as shown below: --Givenabookdocument"myBook" setautomaticpaginationofmyBooktotrue setinsertblankpageofmyBooktotrue
About methods When you look at InDesign’s AppleScript dictionary using the Script Editor (or other AppleScript editor), it can be difficult to tell which methods apply to a given object. he “merge” method, for example, might apply to layers, or colors, or documents, or all of the above. In this reference, we’ve tried to associate methods with the objects they apply to. We have not documented AppleScript standard commands, such as “get,” “set,” or “count,” which many or most of the objects can respond to. Here’s an example command reference (from the document object): Name: export
Parameters: Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Type:
Description:
nothing
Exports the object to file.
InDesign CS Scripting Guide AppleScript Reference 47
his table shows that the export method can use up to four parameters. Parameters shown in brackets are optional. Here’s how the parameters work: Parameter:
What it means:
format
Defines the file format to export. Use any of the constants shown.
to
Sets the name of the file to export.
[showing options]
If true, InDesign will display the export options dialog box.
[using]
Defines the export preset to use when exporting the document. If the file type you’re exporting to does not use export presets (e.g., SVG), omit this parameter.
he “Type” column shows the type of value returned by the command. he following is an example export command built from the information shown in the table above: telldocument1toexportasPDFtypeto"washu-chan:myPDF.pdf"¬ usingpdfexportstyle"myPreset"showingoptionsfalse
When you compile the above example, AppleScript changes the wording slightly (you can enter the text in this form, if you like). telldocument1toexportasPDFtypeto"washu-chan:myPDF.pdf"¬ usingpdfexportstyle"myPreset"withoutshowingoptions
About elements Elements are the objects contained by an object. he document object, for example, contains pages, master spreads, colors, paragraph styles, text frames, and other objects. When objects contain elements, we’ve included a table showing the methods you can use to refer to an element. he following is an example element from the document object. Name:
Refere to by:
character style
index, name, range, relative, test, id
he following table shows example reference forms. Reference:
What it means:
Example:
id
Refer to the object by its id
setmyCharacterStyletocharacterstyleid204ofdocument1
index
Refer to the object by its index
setmyCharacterStyletocharacterstyle1ofdocument1
name
Refer to the object by its name
setmyCharacterStyletocharacterstyle"run-inhead"ofdocument1
test
Refer to the object using an AppleScript filter clause
setmyCharacterStyletocharacterstyle1ofdocument1¬
relative
Refer to the object relative to another object (before/ater)
setmyCharacterStyletocharacterstyleafter¬ characterstyle"heading"
48
AppleScript Reference
whosenamecontains"run-in"
InDesign CS Scripting Guide
angle combobox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit value
fixed
read/write
Real number value of the control.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the angle combobox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
angle combobox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
string list
list of strings
read/write
A list of the strings that appear on the menu of the control.
Methods Method:
Parameters:
Return:
Description:
make
None
angle combobox
Create a new angle combobox.
InDesign CS Scripting Guide AppleScript Reference 49
angle editbox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit value
fixed
read/write
Real number value of the control.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the angle editbox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
angle editbox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
Methods Method:
Parameters:
Return:
Description:
make
None
angle editbox
Create a new angle editbox.
50
AppleScript Reference
InDesign CS Scripting Guide
application Elements Element:
Refer to by:
book
index, name, range, relative, test
character style
index, name, range, relative, test, id
color
index, name, range, relative, test, id
dashed stroke style
index, name, range, relative, test, id
dialog
index, name, range, relative, test, id
display setting
index, name, range, relative, test
document
index, name, range, relative, test
document preset
index, name, range, relative, test, id
dotted stroke style
index, name, range, relative, test, id
flattener preset
index, name, range, relative, test, id
font
index, name, range, relative, test
gradient
index, name, range, relative, test, id
ink
index, name, range, relative, test, id
language with vendors
index, name, range, relative, test, id
layout window
index, name, range, relative, test
library
index, name, range, relative, test
mixed ink
index, name, range, relative, test, id
mixed ink group
index, name, range, relative, test, id
paragraph style
index, name, range, relative, test, id
PDF export preset
index, name, range, relative, test
printer preset
index, name, range, relative, test
story window
index, name, range, relative, test
striped stroke style
index, name, range, relative, test, id
stroke style
index, name, range, relative, test, id
swatch
index, name, range, relative, test, id
tint
index, name, range, relative, test, id
TOC style
index, name, range, relative, test, id
trap preset
index, name, range, relative, test, id
user dictionary
index, name, range, relative, test
window
index, name, range, relative, test
XML export map
index, name, range, relative, test
XML import map
index, name, range, relative, test
XML tag
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
active document
document
read/write
he active (front-most) document.
active script
file reference or file name as string
read only
he file path to the current script running from the scripts palette.
active window
object
read/write
he active (front-most) window.
button preferences
button preferences
read only
button preferences
InDesign CS Scripting Guide AppleScript Reference 51
Property:
Type:
Access:
Description:
change preferences
change preferences
read/write
he current change settings for InDesign’s find/change feature. his object corresponds to options found in the Find/ Change panel (including the options in the Change Format Settings section of that panel).
class
type
read only
he class of the object.
clipboard preferences
clipboard preferences
read only
Clipboard preferences
color settings
color setting
read only
he application default color management settings.
dictionary preferences
dictionary preferences
read only
he application default user dictionary preferences. his object corresponds to the Dictionary panel of the Preferences dialog box.
display performance preferences
display performance preferences
read only
he application default display performance preferences. his object corresponds to the Display Performance panel of the Preferences dialog box.
document preferences
document preferences
read only
he application default document preferences. his object corresponds to the document panel of the Preferences dialog box.
EPS export preferences
EPS export preferences
read only
he application default epss export preferences. his object corresponds to the epss Export dialog box (which appears when you export an epss).
EPS import preferences
EPS import preferences
read only
he application default epss import preferences. his object corresponds to the epss Import dialog box (which appears when you import an epss and have turned on the Show Options option in the Place dialog box).
excel import preferences
excel import preferences
read only
he application default Excel Import preferences. his object corresponds to the Excel Import dialog box (which appears when you import an Excel document and have turned on the Show Options option in the Place dialog box).
file path
file reference or file name as string
read only
he file path to the folder containing the InDesign application (does not include the file name).
find preferences
find preferences
read/write
he current find settings for InDesign’s find/change feature. his object corresponds to options found in the Find/ Change panel (including the options in the Find Format Settings section of that panel).
full name
file reference or file name as string
read only
he file path to the InDesign application file, including the file name.
galley preferences
galley preferences
read only
he application default story Editor preferences. his object corresponds to the story Editor Display panel of the Preferences dialog box.
general preferences
general preferences
read only
he application default general preferences. his object corresponds to the General panel of the Preferences dialog box.
grid preferences
grid preferences
read only
he application default grid preferences. his object corresponds to the Grids panel of the Preferences dialog box.
52
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
guide preferences
guide preferences
read only
he application default guide preferences. his object corresponds to the guides and Pasteboard panel of the Preferences dialog box.
image IO preferences
image IO preferences
read only
image IO preferences
IME preferences
IME preferences
read only
IME preferences
index generation options
index options
read only
he options controlling index generation. his object corresponds to the Generate index dialog box (to display this dialog box, choose Generate index from the index palette menu).
JPEG export preferences
JPEG export preferences
read only
he application default JPEG export preferences. his object corresponds to the JPEG Export dialog box (which appears when you export a JPEG).
layout adjustment preferences
layout adjustment preferences
read only
he application default layout adjustment preferences. he properties in this object correspond to the options shown in the Layout Adjustment dialog box (choose Layout Adjustment from the Layout menu to display this dialog box).
locale
danish locale, english locale, international english locale, finnish locale, french locale, german locale, italian locale, portuguese locale, spanish locale, swedish locale, japanese locale
read only
he locale of the application.
margin preferences
margin preferences
read only
he application default margin preferences. hese settings affect all new documents you create, but have no effect on the margin preferences of existing documents. his object corresponds to the options found in the Margins and columns dialog box.
name
string
read only
he name of the application.
object reference
object
read only
An object reference to the object.
package for GoLive preferences
package for GoLive preferences
read only
he default Package For GoLive preferences
palettes visible
boolean
read/write
Whether the palettes are shown
parent
object
read only
he parent of the object.
pasteboard preferences
pasteboard preferences
read only
he application default pasteboard preferences. he properties of this object correspond to the pasteboard-related options in the guides and Pasteboard panel of the Preferences dialog box.
PDF export preferences
PDF export preferences
read only
he application default pdf export preferences. his object corresponds to the pdf Export dialog box (which appears when you export a pdf).
PDF place preferences
PDF place preferences
read only
he application default pdf import preferences. his object corresponds to the pdf Import dialog box (which appears when you import an pdf and have turned on the Show Options option in the Place dialog box).
polygon preferences
polygon preferences
read only
he application default polygon preferences. his object corresponds to the polygon Settings dialog box (to display this dialog box, double-click the polygon tool in the Tools palette).
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
InDesign CS Scripting Guide AppleScript Reference 53
Property:
Type:
Access:
Description:
selection
list
read/write
he current selection of the active window.
spell preferences
spell preferences
read only
he application default spelling preferences. his object corresponds to the Spelling panel of the Preferences dialog box.
story preferences
story preferences
read only
he application default story preferences. his object corresponds to the story palette. hese settings affect all new InDesign documents, but have no effect on the story preferences in existing documents.
SVG export preferences
SVG export preferences
read only
he application default SVG export preferences. his object corresponds to the SVG Export dialog box (which appears when you export an SVG file).
tagged text export preferences
tagged text export preferences
read only
he application tagged text export preferences. his object corresponds to the Tagged text Export dialog box, which appears when you export InDesign tagged text.
tagged text import preferences
tagged text import preferences
read only
he application default tagged text import preferences. his object corresponds to the Tagged text Import dialog box (which appears when you import a tagged text file and have turned on the Show Options option in the Place dialog box).
text defaults
text default
read only
he application default text formatting. Changing the application default text formatting sets the default formatting for all new documents, but has no effect on existing documents. To change the default text formatting for an existing document, change the settings of the text default object for that document.
text export preferences
text export preferences
read only
he application text export preferences. his object corresponds to the text Export dialog box, which appears when you export text.
text frame preferences
text frame preferences
read only
he application default text frame preferences. Changing the properties of this object affects all new documents; the text frame preferences in existing documents are not changed.
text import preferences
text import preferences
read only
he application default text import preferences. his object corresponds to the text Import dialog box (which appears when you import a text file and have turned on the Show Options option in the Place dialog box).
text preferences
text preferences
read only
he application default text preferences. his object corresponds to the text panel of the Preferences dialog box.
transform preferences
transform preferences
read only
Transform preferences
transparency preferences
transparency preferences
read only
he application default transparency preferences. his object corresponds to the setting of the Transparency Blend Space submenu of the Edit menu.
unused swatches
list of swatches
read only
A list of the unused swatches.
54
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
user interaction level
never interact, interact with all, interact with self, interact with local
read/write
Use this property to suppress or activate the application’s display of alerts and dialog boxes. If you turn this property off, make certain that you turn it on again before your script completes execution.
version
fixed
read only
he version of InDesign.
view preferences
view preferences
read only
he application default view preferences. he properties of this object correspond to the options in the Units and Increments panel of the Preferences dialog box.
visible
boolean
read only
If true, the application is visible.
word RTF import preferences
word RTF import preferences
read only
he application default word/RTF import preferences. his object corresponds to the word/RTF Import dialog box (which appears when you import a word or RTF file and have turned on the Show Options option in the Place dialog box).
XML export preferences
XML export preferences
read only
he default XML export preferences.
XML import preferences
XML import preferences
read only
he default XML import preferences.
XML view preferences
XML view preferences
read only
he application default XML view preferences. he properties of this object correspond to the show/hide options on the Structure View menu.
Methods Method:
Parameters:
Return:
Description:
activate
None
nothing
Brings InDesign to the front.
cascade windows
None
nothing
Arranges the open InDesign document windows in a “cascade” (i.e., overlapping windows).
copy
None
nothing
Copies the selection in the active document window to the clipboard.
cut
None
nothing
Cuts the selection in the active document window to the clipboard.
delete unused tags
None
nothing
Deletes all unused XML markup tags.
nothing
Runs a script file stored on your disk.
do script
Name:
Type:
Description:
script
file reference or file name as string
he script to execute. Either a file reference or string containing the file name (including the file path).
[language]
visual basic, javascript, applescript
he language of the script to execute. If not specified, the language used to call this method is used.
InDesign CS Scripting Guide AppleScript Reference 55
Method: export presets
import
import styles
load xml tags
open
Parameters: Name:
Type:
Description:
format
pdf export presets format, printer presets format, flattener presets format, document presets format
the preset format.
to
string
a file to which to export the object.
Name:
Type:
Description:
format
pdf export presets format, printer presets format, flattener presets format, document presets format
he export file format to use.
from
string
he full file path of the file to import.
Name:
Type:
Description:
format
character styles format, paragraph styles format, text styles format, toc styles format
the format.
from
string
an InDesign file to import from.
Name:
Type:
Description:
from
string
What to import from.
Name:
Type:
Description:
from
object or objects
Either a file reference or string containing the file name (including the file path) of the file you want to open.
[showing window]
boolean
If true, show the document window.
Return:
Description:
nothing
Export the presets to a file.
nothing
Imports a file containing document styles, flattener styles, pdf export presets, or printer styles. To import text or graphics, use the import command of the document, spread, page, page item, or text object you want to import into. To import XML tags, use the import xml tags command.
nothing
Import styles or presets.
nothing
Load a set of tags from an external file.
object or objects
Opens a document, book or library.
paste
None
nothing
Pastes data from the clipboard into the active document window.
paste in place
None
nothing
Paste data from the clipboard into front document window at the same position as the original
paste into
None
nothing
Pastes data from the clipboard into the selected object in the active document window.
nothing
Prints one or more documents.
print out
56
Name:
Type:
Description:
from
file reference or file name as string (or, for multiple files, a list of file reference or strings)
One or more file paths.
[print dialog]
boolean
If true, display the Print dialog box.
[using]
printer preset or printer preset name as string
he name of the printer style to use, or an object reference to a printer style.
AppleScript Reference
InDesign CS Scripting Guide
Method: quit
save xml tags
search
select
tile windows
Parameters: Name:
Type:
Description:
[saving]
no, ask, yes
Use ask to display a dialog box asking if the user would like to save changes for each unsaved open document; use no to close all documents without savign; use yes to save all unsaved open document.
Name:
Type:
Description:
to
string
he file to export to.
Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
selectable items
object, list of objects, or nothing (to deselect all)
he object(s) to select.
[existing selection]
replace, add to, remove from
How to handle the existing selection.
None
Return:
Description:
nothing
Quits InDesign.
nothing
Save a set of tags to an external file.
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects an object or objects. If the object is a text object (e.g., characters, words, lines, paragraphs), any other selected objects are deselected (the AppendSelection parameter has no effect).
nothing
Arranges the open InDesign document windows in a “tiled” layout (i.e., non-overlapping windows).
InDesign CS Scripting Guide AppleScript Reference 57
asset Properties Property:
Type:
Access:
Description:
asset type
image type, EPS type, PDF type, geometry type, page type, text type
read/write
he type of the asset.
class
type
read only
he class of the object.
date
date
read only
he date and time the asset was created.
description
string
read/write
A description of the asset.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the asset within its parent library
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the asset.
object reference
asset
read only
An object reference to the object.
parent
library
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
list of objects
Place the asset in a document.
extract label
insert label
place asset
58
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
on
document
he document in which to place the asset.
AppleScript Reference
InDesign CS Scripting Guide
Description:
behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
object reference
behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
extract label
insert label
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Description:
InDesign CS Scripting Guide AppleScript Reference 59
book Elements Element:
Refer to by:
book content
index, name, range, relative, test, id
synchronize option
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
automatic document conversion
boolean
read/write
Whether to automatically convert document during repagination and synchronization
automatic pagination
boolean
read/write
If true, repaginate the book documents when the book pagination changes.
class
type
read only
he class of the object.
file path
file reference or file name as string
read only
he file path to the book file (does not include the file name).
full name
file reference or file name as string
read only
he file path to the book file, including the file name.
index
integer
read only
index of the book within its parent application
insert blank page
boolean
read/write
If true, insert blank pages to meet the odd/even setting.
modified
boolean
read only
If true, the document has been modified since it was last saved.
name
string
read only
he file name of the book.
object reference
book
read only
An object reference to the object.
parent
object
read only
he parent of the object.
print preferences
print preferences
read only
he print preferences of the book.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
repagination option
next page, next odd page, next even page
read/write
Sets the repagination options for the book.
saved
boolean
read only
If true, the document has been saved since it was opened.
style source document
document
read/write
he current master document.
Methods Method: close
export
60
Parameters: Name:
Type:
Description:
[saving]
no, ask, yes
If true, save changes before closing the book.
[saving in]
file reference or file name as string
he file in which to save the book.
Name:
Type:
Description:
[to]
file reference or file name as string
he file to which to export the book as File (string).
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Close the book.
nothing
Export the book to pdf
Method: make
package
package for go live
print out
save
synchronize
Parameters: Name:
Type:
Description:
full name
string
Full path name of the new book.
Name:
Type:
Description:
to
string
A folder, alias or path as string in which to place the packaged files.
copying fonts
boolean
If true, copy required fonts.
copying linked graphics
boolean
If true, copy linked graphics file.
copying profiles
boolean
If true, copy profiles.
updating graphics
boolean
If true, update graphics links before packaging.
including hidden layers
boolean
If true, include objects on hidden layers.
ignore preflight errors
boolean
If true, ignore preflight errors and package anyways.
creating report
boolean
If true, create package report.
Name:
Type:
Description:
location
string
File location for package.
Name:
Type:
Description:
[print dialog]
boolean
If true, invoke the print dialog.
[using]
printer preset or printer preset name as string
Printer style to use.
Name:
Type:
Description:
[to]
file reference or file name as string
Where to save the book. If the book is already saved, a copy is saved at this path, the original file is closed the new copy is opened.
None
Return:
Description:
book
Create a new book.
boolean
Packages the document.
boolean
Packages for GoLive.
nothing
Print the book.
nothing
Save the book.
nothing
Synchronize whole to the Style Source document
InDesign CS Scripting Guide AppleScript Reference 61
book content Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
date
date
read only
he date and time the book content file was last saved.
document page range
string
read only
he page range of the book content document.
full name
file reference or file name as string
read only
he file path to the book content file, including the file name.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the book content within its parent book
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
object reference
book content
read only
An object reference to the object.
parent
book
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
size
integer
read only
Size of the book content file on disk.
status
normal, missing document, document out of date, document in use, document is open
read only
he status of the book content file.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
book content
Create a new book content.
book content
Move the book content before/ ater another book content, or to beginning/end.
book content
Replace a file.
nothing
Sync this book content to the Style Source document
extract label
insert label
make
move
replace
synchronize
62
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
full name
string
Full path name of the new book content.
Name:
Type:
Description:
[to]
before, ater, at end, at beginning, unknown
location.
[reference]
book content
Before/ater this book content.
Name:
Type:
Description:
full name
string
Full path name of the replaced book content.
None
AppleScript Reference
InDesign CS Scripting Guide
bookmark Elements Element:
Refer to by:
bookmark
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
destination
object
read only
he destination of the bookmark.
id
integer
read only
A unique number identifying the object.
indent
integer
read only
he indent level of the bookmark.
index
integer
read only
index of the bookmark within its parent document or bookmark
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read/write
he name of the bookmark.
object reference
bookmark
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
bookmark
Create a new bookmark.
nothing
Move this bookmark under another.
nothing
Go to the bookmark.
extract label
insert label
make
move
show bookmark
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
destination
object
he bookmark’s destination as hyperlinktextDestination, hyperlinkpageDestination, hyperlinkExternalpageDestination or hyperlinkURLDestination.
Name:
Type:
Description:
to
before, ater, at beginning, at end
he new parent bookmark.
indent level
integer
he new indent level.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 63
border panel Elements Element:
Refer to by:
angle combobox
index, name, range, relative, test, id
angle editbox
index, name, range, relative, test, id
border panel
index, name, range, relative, test, id
checkbox control
index, name, range, relative, test, id
dialog column
index, name, range, relative, test, id
dialog row
index, name, range, relative, test, id
dropdown
index, name, range, relative, test, id
enabling group
index, name, range, relative, test, id
integer combobox
index, name, range, relative, test, id
integer editbox
index, name, range, relative, test, id
measurement combobox
index, name, range, relative, test, id
measurement editbox
index, name, range, relative, test, id
percent combobox
index, name, range, relative, test, id
percent editbox
index, name, range, relative, test, id
radiobutton group
index, name, range, relative, test, id
real combobox
index, name, range, relative, test, id
real editbox
index, name, range, relative, test, id
static text
index, name, range, relative, test, id
text editbox
index, name, range, relative, test, id
widget
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the border panel within its parent dialog column, dialog row, enabling group or border panel
min width
fixed
read/write
he minimum width of the control.
object reference
border panel
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
make
None
border panel
Create a new border panel.
64
AppleScript Reference
InDesign CS Scripting Guide
button Elements Element:
Refer to by:
behavior
index, name, range, relative, test, id
close window behavior
index, name, range, relative, test, id
EPS
index, name, range, relative, test, id
goto anchor behavior
index, name, range, relative, test, id
goto first page behavior
index, name, range, relative, test, id
goto last page behavior
index, name, range, relative, test, id
goto next page behavior
index, name, range, relative, test, id
goto next view behavior
index, name, range, relative, test, id
goto previous page behavior
index, name, range, relative, test, id
goto previous view behavior
index, name, range, relative, test, id
goto URL behavior
index, name, range, relative, test, id
graphic
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
image
index, name, range, relative, test, id
movie behavior
index, name, range, relative, test, id
open file behavior
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
PDF
index, name, range, relative, test, id
PICT
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
quit behavior
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
show hide fields behavior
index, name, range, relative, test, id
sound behavior
index, name, range, relative, test, id
state
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
view zoom behavior
index, name, range, relative, test, id
WMF
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scale of the page item relative to its containing page item
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item
absolute vertical scale
fixed
read/write
he vertical scale of the page item relative to its containing page item
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page items
appearance name
string
read only
Name of any appearance of field
InDesign CS Scripting Guide AppleScript Reference 65
Property:
Type:
Access:
Description:
associated XML element
XML element
read only
Returns the associated XML element
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he blend mode used to combine the object’s color with the background
class
type
read only
he class descriptor type
corner effect
none, rounded corner, inverse rounded corner, inset corner, bevel corner, fancy corner
read/write
he type of corner effect on the object
corner radius
fixed
read/write
he radius of the corner
description
string
read/write
Description
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of both ends of an open path
end join
miter end join, round end join, bevel end join
read/write
he appearance of the stroke at corner points
feather corner type
sharp, rounded, diffusion
read/write
he type of feathering to apply
feather mode
none, standard
read/write
he feather mode
feather width
fixed
read/write
he width of the feathering
fill color
swatch
read/write
he fill color of the object. Can also accept: string.
fill tint
fixed
read/write
he object’s fill tint percentage (-1 indicates no override)
gap color
swatch
read/write
Gap color for the page item
gap tint
fixed
read/write
Gap tint for the page item
geometric bounds
list of fixed or measurement strings {x1, y1, x2, y2}
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right)
gradient fill angle
fixed
read/write
Angle of a linear gradient on the fill
gradient fill length
fixed
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
gradient fill start
list of fixed or measurement strings {x, y}
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
gradient stroke angle
fixed
read/write
Angle of a linear gradient on the stroke
gradient stroke length
fixed
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the stroke
gradient stroke start
list of ns
read/write
Center point for a radial gradient or starting point for a linear gradient on the stroke
horizontal scale
fixed
read/write
he horizontal scaling percentage.
id
integer
read only
he button’s unique id
index
integer
read only
index of the button within its parent spread, master spread, group, text frame, story, text, character, word, line, text column, paragraph, text style range, cell, table, page, document, layer or insertion point
isolate blending
boolean
read/write
Indicates whether the object should blend in isolation
item layer
layer
read/write
he layer the object is on
knockout group
boolean
read/write
Indicates whether the object is a knockout group
label
string
read/write
A label that can be set to any string
let line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the let end of an open path
66
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
local display setting
high quality, typical, optimized, default
read/write
he display settings for this page item
locked
boolean
read/write
Whether the button is locked
miter limit
fixed
read/write
When a corner point switches from a mitered (pointed) join to a beveled (squared-off) join
name
string
read/write
he name of the button
nonprinting
boolean
read/write
Whether the page item is non-printing
object reference
button
read only
An object reference for this button
opacity
fixed
read/write
he opacity of the object
overprint fill
boolean
read/write
Whether to overprint the fill
overprint gap
boolean
read/write
Whether to overprint the gap
overprint stroke
boolean
read/write
Whether to overprint the stroke
overridden
boolean
read only
True if this page item originated on a master spread and was later overridden. It is still linked to the page item on the master
overridden master page item
page item
read only
he overridden master page item
parent
object
read only
he button’s parent. Can return: spread, master spread, group, text frame, story, text, character, word, line, text column, paragraph, text style range, cell, table, page, document, layer or insertion point.
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
right line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the right end of an open path
rotation angle
fixed
read/write
Angle of rotation
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he blend mode to use for drawing the shadow
shadow blur radius
fixed
read/write
he radius of the blur to apply to the shadow
shadow color
swatch
read/write
he color to apply to the shadow
shadow mode
none, drop
read/write
he shadow mode
shadow opacity
fixed
read/write
he opacity of the shadow
shadow x offset
fixed
read/write
he horizontal offset of the shadow
shadow y offset
fixed
read/write
he vertical offset of the shadow
shear angle
fixed
read/write
he shear angle of the page item relative to the spread
stroke alignment
center alignment, inside alignment, outside alignment
read/write
he stroke alignment for the page item
stroke color
swatch
read/write
he stroke color of the object. Can also accept: string.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he adjustment to add to the corners of a dashed line
stroke dash and gap
list of fixed or measurement strings {dash, gap, ...}
read/write
he dash and gap settings of a dashed line. A list of up to 6 values
stroke tint
fixed
read/write
he object’s stroke tint percentage (-1 indicates no override)
stroke type
stroke style
read/write
he stroke type
stroke weight
fixed
read/write
he weight (in points) to apply to the stroke of the object
text wrap preferences
text wrap preferences
read only
he text wrap preferences
InDesign CS Scripting Guide AppleScript Reference 67
Property:
Type:
Access:
Description:
vertical scale
fixed
read/write
he vertical scaling percentage.
visibility in pdf
visible in pdf, hidden in pdf, visible but does not print in pdf, hidden but printable in pdf
read/write
Visibility of the item in the output pdf
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width, in the format (top, let, bottom, right)
Methods Method: add path
apply appearance
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
using
string
the appearance.
Return:
Description:
page item
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects> Pathfinder>Add).
nothing
Apply an appearance.
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
page item
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
nothing
Export the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Fit content within a graphic frame.
nothing
Sets the string associated with the given key (label name).
exclude overlap path
Name:
Type:
Description:
with
list of objects
he objects to exclude.
export
Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
extract label
fit
insert label
68
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
AppleScript Reference
InDesign CS Scripting Guide
Method: intersect path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to intersect with.
Name:
Type:
Description:
[layer]
layer or layer name as string
he layer on which to create the button as layer.
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater this button or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
make compound path
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, layer, or master spread
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current location.
Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
make
minus back
move
override
Return:
Description:
page item
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
button
Create a new button.
page item
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
page item
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
page item
Overrides an item from the master page and places it on the page.
InDesign CS Scripting Guide AppleScript Reference 69
Method: place
place xml
Parameters: Name:
Type:
Description:
file name
string
he file to place.
[place point]
list of fixed or measurement strings {x, y}
he point at which to place the file.
[destination layer]
layer or layer name as string
he layer on which to place the file.
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
If true, convert straight quotes to typographer’s quotes.
Name:
Type:
Description:
using
XML element
he element to place into.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
release compound path
None
objects
release compound path.
remove override
None
nothing
Removes a locally overriden master page item
reset scaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
resize
70
Name:
Type:
Description:
[horizontal scale]
fixed
he horizontal scaling percentage.
[vertical scale]
fixed
he vertical scaling percentage.
[around]
list or fixed or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
AppleScript Reference
InDesign CS Scripting Guide
Method: rotate
select
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
list of fixed or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to rotate around.
[considering current rotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are rotated.
[considering parents rotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Rotate the page item.
nothing
Select this button.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
nothing
Shear the page item.
shear
Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
list of fixed or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to shear around.
[considering current shear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are sheared.
[considering parents shear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
InDesign CS Scripting Guide AppleScript Reference 71
Method: store
subtract path
unlink
72
Parameters: Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
asset
Store a page item in a library.
page item
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
button preference Properties Property:
Type:
Access:
Description:
appearance name
string
read/write
Name of any appearance of field
class
type
read only
he class descriptor type
name
string
read/write
he name of the button preference
object reference
button preference
read only
An object reference for this button preference
parent
object
read only
he button preference’s parent. Can return: application or document.
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
InDesign CS Scripting Guide AppleScript Reference 73
cell Elements Element:
Refer to by:
button
index, name, range, relative, test, id
cell
index, name, range, relative, test, id
character
index, name, range, relative, test
column
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
row
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items contained by this object, regardless of their location in the object hierarchy (i.e., including objects nested within other objects, such as groups).
auto grow
boolean
read/write
If true, the cell will expand to display its content.
bottom edge stroke color
swatch
read/write
he stroke color of the bottom edge of the cell.
bottom edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the bottom edge of the cell.
bottom edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the bottom edge of the cell.
bottom edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottom edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the bottom edge of the cell.
bottom edge stroke priority
integer
read/write
he stroke priority of the bottom edge
74
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
bottom edge stroke tint
fixed
read/write
he tint applied to the stroke of the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottom edge stroke type
stroke style
read/write
he type of stroke applied to the bottom edge of the cell.
bottom edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the bottom edge of the cell.
bottom inset
fixed or measurement string
read/write
he bottom inset the cell.
class
type
read only
he class of the object.
clip content to cell
boolean
read/write
If true, clip the content of the cell to the boundaries of the cell.
column span
integer
read only
he number of columns that this cell spans
contents
text or page item
read/write
he text contents of the cell.
diagonal line in front
boolean
read/write
If true, the diagonal line will draw in front of the contents of the cell.
diagonal line stroke color
swatch
read/write
he stroke color of the diagonal line(s) applied to the cell.
diagonal line stroke gap color
swatch
read/write
he gap color of the diagonal line(s).
diagonal line stroke gap overprint
boolean
read/write
If true, overprint the color of the gap of the diagonal line(s).
diagonal line stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonal line stroke overprint
boolean
read/write
If true, overprint the diagonal line(s) applied to the cell.
diagonal line stroke tint
fixed
read/write
he tint applied to the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonal line stroke type
stroke style
read/write
he type of stroke applied to the diagonal line(s) of the cell.
diagonal line stroke weight
fixed or measurement string
read/write
he stroke weight of the diagonal line(s) of the cell.
fill color
swatch
read/write
he swatch, color, gradient, tint, or mixed ink applied to the fill of the cell.
fill tint
fixed
read/write
he tint percentage applied to the fill of the cell (-1 indicates 100%, or no tint override).
first baseline offset
ascent offset, cap height, leading offset, embox height, x height, fixed height
read/write
he method used to calculate the distance from the first baseline of text in the cell and the top inset of the cell.
gradient fill angle
fixed
read/write
Angle of a linear gradient on the fill
gradient fill length
fixed
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
gradient fill start
list of fixed or measurement strings {x, y}
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
height
fixed or measurement string
read/write
he height of the cell.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the cell within its parent table.
inner column stroke color
swatch
read/write
he stroke color of the inner column of the cell.
inner column stroke gap color
swatch
read/write
he gap color of the stroke applied to the inner column of the cell.
InDesign CS Scripting Guide AppleScript Reference 75
Property:
Type:
Access:
Description:
inner column stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the inner column of the cell.
inner column stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the inner column of the cell (-1 indicates 100%, or no tint override).
inner column stroke overprint
boolean
read/write
If true, overprint the stroke applied to the inner column of the cell.
inner column stroke tint
fixed
read/write
he tint applied to the stroke of the inner column of the cell (-1 indicates 100%, or no tint override).
inner column stroke type
stroke style
read/write
he type of stroke applied to the inner column of the cell.
inner column stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the inner column of the cell.
inner row stroke color
swatch
read/write
he stroke color of the inner row of the cell.
inner row stroke gap color
swatch
read/write
he gap color of the stroke applied to the inner row of the cell.
inner row stroke gap overprint
boolean
read/write
Whether to overprint the gap of the inner row
inner row stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the inner row of the cell (-1 indicates 100%, or no tint override).
inner row stroke overprint
boolean
read/write
If true, overprint the stroke applied to the inner row of the cell.
inner row stroke tint
fixed
read/write
he tint applied to the stroke of the inner row of the cell (-1 indicates 100%, or no tint override).
inner row stroke type
stroke style
read/write
he type of stroke applied to the inner row of the cell.
inner row stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the inner row of the cell.
keep with next row
boolean
read/write
If true, keep this row with the next row when the rows break between pages, text frames, or text columns.
let edge stroke color
swatch
read/write
he stroke color of the let edge of the cell.
let edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the let edge of the cell.
let edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the let edge of the cell.
let edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the let edge of the cell (-1 indicates 100%, or no tint override).
let edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the let edge of the cell.
let edge stroke priority
integer
read/write
he stroke priority of the let edge
let edge stroke tint
fixed
read/write
he tint of the color of the let edge
let edge stroke type
stroke style
read/write
he type of stroke applied to the let edge of the cell.
let edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the let edge of the cell.
let inset
fixed or measurement string
read/write
he let inset of the cell.
maximum height
fixed or measurement string
read/write
Specifies the maximum height of the row containing the cell.
76
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
minimum first baseline offset
fixed or measurement string
read/write
he minimum distance (in points) between the first baseline of the text in the cell and the top inset of the frame or cell.
minimum height
fixed or measurement string
read/write
Constrains the row height to an amount no smaller than this value. he row may be larger than this amount, however, as the row height will continue to grow automatically as text is added.
name
string
read only
he name of the cell, in the form row number; column number. he third cell of the fourth row, for example, would have the name “R4:C3”.
object reference
cell
read only
An object reference to the object.
overflows
boolean
read only
If true, the cell contains overset (i.e., uncomposed) text.
overprint fill
boolean
read/write
If true, overprint the fill of the cell.
paragraph spacing limit
fixed or measurement string
read/write
When the vertical justification of the cell is set to justified, this is the maximum amount of space that will be added between paragraphs. Increase this value to encourage spacing between paragraphs of vertically justified text; decrease it to increase the leading between lines of text in vertically justified text.
parent
object
read only
he parent of the object.
parent column
column
read only
he parent column of the cell.
parent row
row
read only
he parent row of the cell.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right edge stroke color
swatch
read/write
he stroke color of the right edge of the cell.
right edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the right edge of the cell.
right edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the right edge of the cell.
right edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the right edge of the cell (-1 indicates 100%, or no tint override).
right edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the right edge of the cell.
right edge stroke priority
integer
read/write
he stroke priority of the right edge
right edge stroke tint
fixed
read/write
he tint applied to the stroke of the right edge of the cell (-1 indicates 100%, or no tint override).
right edge stroke type
stroke style
read/write
he type of stroke applied to the right edge of the cell.
right edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the right edge of the cell.
right inset
fixed or measurement string
read/write
he right inset the cell.
rotation angle
fixed
read/write
he rotation angle of the cell.
row span
integer
read only
he number of rows that this cell spans
row type
body row, header row, footer row, mixed state
read/write
he type of the row containing the cell.
start row
anywhere, next column, next frame, next page, next odd page, next even page
read/write
Where to start the row
text cell rotation follows story direction
boolean
read/write
Whether text cell direction matches the story direction
InDesign CS Scripting Guide AppleScript Reference 77
Property:
Type:
Access:
Description:
top edge stroke color
swatch
read/write
he stroke color of the top edge of the cell.
top edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the top edge of the cell.
top edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the top edge of the cell.
top edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the top edge of the cell (-1 indicates 100%, or no tint override).
top edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the top edge of the cell.
top edge stroke priority
integer
read/write
he stroke priority of the top edge
top edge stroke tint
fixed
read/write
he tint applied to the stroke of the top edge of the cell (-1 indicates 100%, or no tint override).
top edge stroke type
stroke style
read/write
he type of stroke applied to the right edge of the cell.
top edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the top edge of the cell.
top inset
fixed or measurement string
read/write
he top inset the cell.
top let diagonal line
boolean
read/write
If true, draw a diagonal line from the top let corner to the bottom right corner of the cell .
top right diagonal line
boolean
read/write
If true, draw a diagonal line from the top right corner to the bottom let corner of the cell .
vertical justification
top align, center align, bottom align, justify align
read/write
he vertical justification applied to the text in the cell.
width
fixed or measurement string
read/write
he width of the cell.
Methods Method: create outlines
delete merge
78
Parameters: Name:
Type:
Description:
[delete original]
boolean
If true, delete the original object.
None Name:
Type:
Description:
with
Cell
he cell or range of cells to merge with.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
objects
Creates outlines from the text.
nothing
Deletes the object.
cell
Merges cells together.
Method: search
select
split
unmerge
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Name:
Type:
Description:
using
horizontal, vertical
Sets the direction in which to split the cell.
None
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects the cell.
nothing
Splits the cell horizontally or vertically.
objects
Unmerges the cells.
InDesign CS Scripting Guide AppleScript Reference 79
change preference Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
applied character style
string
read/write
he character style applied to the text.
applied font
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
string
read/write
he paragraph style applied to the text.
auto leading
fixed
read/write
Percentage for calculating auto leading
balance ragged lines
boolean
read/write
Whether to balance ragged lines
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
change text
string
read/write
he replacement text. his property corresponds to the string in the Change To field of the Find/Change panel.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
fill color
string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he text override of the fill’s tint percentage (-1 indicates no override)
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
80
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed or measurement string or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
change preference
read only
An object reference to the object.
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
InDesign CS Scripting Guide AppleScript Reference 81
Property:
Type:
Access:
Description:
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines with only one word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
Where to start the paragraph
strike through color
swatch or string
read/write
he color of the strike through. Can return: swatch or string.
strike through gap color
swatch or string
read/write
he gap color of the strike through. Can return: swatch or string.
strike through gap overprint
boolean
read/write
Whether to overprint the gap of the strike through
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through
strike through overprint
boolean
read/write
Whether to overprint the strike through
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strike through
strike through weight
fixed
read/write
he line weight of the strike through
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
string
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he text override of the stroke’s tint percentage (-1 indicates no override)
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color of the underline. Can return: swatch or string.
underline gap color
swatch or string
read/write
he gap color of the underline. Can return: swatch or string.
82
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underline gap overprint
boolean
read/write
Whether to overprint the gap of the underline
underline gap tint
fixed
read/write
he gap tint of the underline
underline offset
fixed or measurement string
read/write
he offset of the underline
underline overprint
boolean
read/write
Whether to overprint the underline
underline tint
fixed
read/write
he tint of the underline
underline type
stroke style
read/write
he stroke type of the underline
underline weight
fixed
read/write
he line weight of the underline
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
InDesign CS Scripting Guide AppleScript Reference 83
character Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
nested style
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
tab stop
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
84
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ascent
fixed
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associated XML elements
list of XML elements
read only
he XML elements associated with this text object (if any).
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
fixed
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string or auto page number, next page number, previous page number, section marker, bullet character, copyright symbol, degree symbol, ellipsis character, forced line break, paragraph symbol, registered trademark, section symbol, trademark symbol, right indent tab, indent here tab, em dash, en dash, discretionary hyphen, nonbreaking hyphen, end nested style, double let quote, double right quote, single let quote, single right quote, em space, en space, flush space, hair space, nonbreaking space, thin space, figure space, punctuation space, column break, frame break, page break, odd page break, even page break
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
fixed
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
InDesign CS Scripting Guide AppleScript Reference 85
Property:
Type:
Access:
Description:
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradient stroke angle
fixed
read/write
he angle of the gradient applied to the stroke of the text.
gradient stroke length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal offset
fixed
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
86
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
index
integer
read only
index of the object within its parent object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed or measurement string or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
InDesign CS Scripting Guide AppleScript Reference 87
Property:
Type:
Access:
Description:
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
character
read only
An object reference to the object.
open type features
list of long
read/write
open type features
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
parent story
story
read only
he story containing the text object.
parent text frame
text frame
read only
he text frame containing the text object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
88
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
InDesign CS Scripting Guide AppleScript Reference 89
Property:
Type:
Access:
Description:
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this character. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
90
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method: apply style
changecase
convert to table
create outlines
delete
Parameters: Name:
Type:
Description:
using
character style or paragraph style
he paragraph style or character style to apply.
[clearing overrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
uppercase, lowercase, titlecase, sentencecase
Case option to use.
Name:
Type:
Description:
[column separator]
string
he character to interpret as the column separator.
[row separator]
string
he character to interpret as the row separator.
[number of columns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original text.
None
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Deletes the object.
InDesign CS Scripting Guide AppleScript Reference 91
Method: export
markup
move
place
92
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he full path to the exported file.
[showing options]
boolean
If true, display the Export dialog box.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
using
XML element
he XML element to associate with the text.
Name:
Type:
Description:
to
before, ater, at beginning, at end
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he location (in page coordinates) at which to place the incoming file.
[destination layer]
layer or layer name as string
he layer on which to place the incoming file.
[showing options]
boolean
If true, display the import options dialog box for the file type being placed.
[autoflowing]
boolean
If true, autoflow the incoming text.
[retaining formatting]
boolean
If true, retain the formatting of the incoming text. If false, place the text using the document’s default text formatting attributes.
[converting quotes]
boolean
If true, convert typewriter (“straight”) quotation marks to typographic (“curly”) quotation marks.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
object
Place a file.
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects text.
InDesign CS Scripting Guide AppleScript Reference 93
character style Properties Property:
Type:
Access:
Description:
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
based on
character style, character style name as string, or nothing
read/write
he character style this style is based on.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
id
integer
read only
A unique number identifying the object.
imported
boolean
read only
Whether this style was imported from another document
index
integer
read only
index of the character style within its parent document or application
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
label
string
read/write
A label that can be set to any string
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
name
string
read/write
he name of the character style
no break
boolean
read/write
If true, the no break attribute is applied to the text.
94
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
object reference
character style
read only
An object reference to the object.
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
InDesign CS Scripting Guide AppleScript Reference 95
Property:
Type:
Access:
Description:
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
character style
Create a new character style.
extract label
insert label
make
96
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
checkbox control Properties Property:
Type:
Access:
Description:
checked state
boolean
read/write
If true, the checkbox control is checked.
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the checkbox control within its parent dialog column, dialog row, enabling group or border panel
min width
fixed
read/write
he minimum width of the control.
object reference
checkbox control
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
static label
string
read/write
he static text label of the checkbox control.
Methods Method:
Parameters:
Return:
Description:
make
None
checkbox control
Create a new checkbox control.
InDesign CS Scripting Guide AppleScript Reference 97
clipboard preference Properties Property:
Type:
Access:
class
type
read only
he class descriptor type
copy PDF to clipboard
boolean
read/write
Whether to copy pdf to clipboard
object reference
clipboard preference
read only
An object reference for this clipboard preference
parent
object
read only
he clipboard preference’s parent
paste remembers layers
boolean
read/write
Whether objects cut or copied from different layers retain their layer assignment when pasted
prefer PDF when pasting
boolean
read/write
Whether to paste pdf if available
prefer styled text when pasting
boolean
read/write
Whether to include text attributes if available when pasting text
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
98
AppleScript Reference
InDesign CS Scripting Guide
Description:
clipping path settings Elements Element:
Refer to by:
path
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
alpha channel path names
list of strings
read only
A list of the path names of alpha channels associated with an imported graphic.
applied path name
string
read/write
he name of the currently-applied clipping path.
class
type
read only
he class of the object.
clipping type
none, detect edges, alpha channel, photoshop path, user modified path
read/write
he clipping path type.
include inside edges
boolean
read/write
If true, include inside edges of the clipping path.
inset frame
fixed or measurement string
read/write
he inset width of the frame.
invert path
boolean
read/write
If true, invert the path of the clipping path.
object reference
clipping path settings
read only
An object reference to the object.
parent
object
read only
he parent of the object.
photoshop path names
list of strings
read only
A list of path names of a Photoshop path.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
restrict to frame
boolean
read/write
If true, restrict the imported graphic to its frame.
threshold
integer
read/write
Sets the threshold for detect edges or alpha channel.
tolerance
integer
read/write
Sets the accuracy of the Find Edges method of generating a clipping path. Higher values produce a clipping path that’s closer to the shape of the objects in the imported graphic, but tend to be more jagged. Lower values produce smoother clipping paths, but tend to be less accurate.
use high resolution image
boolean
read/write
If true, use a high resolution version of the imported graphic when creating a clipping path using the Find Edges method.
Methods Method:
Parameters:
Return:
Description:
convert to frame
None
page item
Convert to Frame.
InDesign CS Scripting Guide AppleScript Reference 99
close window behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the close window behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
object reference
close window behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
close window behavior
Create a new close window behavior.
extract label
insert label
make
100
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
color Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
color value
list of fixed
read/write
he values of the color
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the color within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
model
spot, process, registration, mixedinkmodel
read/write
he color model of the color.
name
string
read/write
he name of the color.
object reference
color
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
space
RGB, CMYK, LAB, mixed ink
read/write
he color space of the color.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
color
Create a new color.
nothing
Merge one or more other swatches into this one.
extract label
insert label
make merge
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None Name:
Type:
Description:
with
color
he swatches to merge.
Description:
InDesign CS Scripting Guide AppleScript Reference 101
color setting Properties Property:
Type:
Access:
class
type
read only
he class of the object.
CMS settings
string
read/write
he name of the current color settings configuration.
CMS settings list
list of strings
read only
he list of available color settings configurations.
CMS settings path
file reference or file name as string
read/write
he path to the color settings file.
CMYK policy
color policy off, preserve embedded profiles, convert to working space
read/write
he policy for handling mismatched CMYK configurations.
enable color management
boolean
read/write
If true, enable color management.
engine
string
read/write
he name of the color engine to use.
engine list
list of strings
read only
he list of available color engines.
intent
use color settings, perceptual, saturation, relative colorimetric, absolute colorimetric
read/write
he rendering intent
mismatch ask when opening
boolean
read/write
If true, ask the user what to do when opening a file with a mismatched color configuration.
mismatch ask when pasting
boolean
read/write
If true, ask the user what to do when pasting an object with a mismatched color configuration.
missing ask when opening
boolean
read/write
If true, ask the user what to do when opening an object with a missing color configuration.
object reference
color setting
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
RGB policy
color policy off, preserve embedded profiles, convert to working space
read/write
he policy for handling mismatched rgb configurations.
use BPC
boolean
read/write
If true, compensate for differences in black point.
working space CMYK
string
read/write
he name of the current CMYK configuration.
working space CMYK list
list of strings
read only
he list of valid CMYK color profiles.
working space RGB
string
read/write
he name of the current rgb configuration.
working space RGB list
list of strings
read only
he list of valid RGB color profiles.
102
AppleScript Reference
InDesign CS Scripting Guide
Description:
column Elements Element:
Refer to by:
cell
index, name, range, relative, test, id
column
index, name, range, relative, test
row
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
auto grow
boolean
read/write
If true, the cell will expand to display its content.
bottom edge stroke color
swatch
read/write
he stroke color of the bottom edge of the cell.
bottom edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the bottom edge of the cell.
bottom edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the bottom edge of the cell.
bottom edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottom edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the bottom edge of the cell.
bottom edge stroke priority
integer
read/write
he stroke priority of the bottom edge
bottom edge stroke tint
fixed
read/write
he tint applied to the stroke of the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottom edge stroke type
stroke style
read/write
he type of stroke applied to the bottom edge of the cell.
bottom edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the bottom edge of the cell.
bottom inset
fixed or measurement string
read/write
he bottom inset the cell.
class
type
read only
he class of the object.
clip content to cell
boolean
read/write
If true, clip the content of the cell to the boundaries of the cell.
column span
integer
read only
he number of columns that this cell spans
contents
text or object
read/write
he text contents of the cell.
diagonal line in front
boolean
read/write
If true, the diagonal line will draw in front of the contents of the cell.
diagonal line stroke color
swatch
read/write
he stroke color of the diagonal line(s) applied to the cell.
diagonal line stroke gap color
swatch
read/write
he gap color of the diagonal line(s).
diagonal line stroke gap overprint
boolean
read/write
If true, overprint the color of the gap of the diagonal line(s).
diagonal line stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonal line stroke overprint
boolean
read/write
If true, overprint the diagonal line(s) applied to the cell.
InDesign CS Scripting Guide AppleScript Reference 103
Property:
Type:
Access:
Description:
diagonal line stroke tint
fixed
read/write
he tint applied to the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonal line stroke type
stroke style
read/write
he type of stroke applied to the diagonal line(s) of the cell.
diagonal line stroke weight
fixed or measurement string
read/write
he stroke weight of the diagonal line(s) of the cell.
fill color
swatch
read/write
he swatch, color, gradient, tint, or mixed ink applied to the fill of the cell.
fill tint
fixed
read/write
he tint percentage applied to the fill of the cell (-1 indicates 100%, or no tint override).
first baseline offset
ascent offset, cap height, leading offset, embox height, x height, fixed height
read/write
he method used to calculate the distance from the first baseline of text in the cell and the top inset of the cell.
gradient fill angle
fixed
read/write
Angle of a linear gradient on the fill
gradient fill length
fixed
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
gradient fill start
list of fixed or measurement strings {x, y}
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
height
fixed or measurement string
read/write
he height of the cell.
index
integer
read only
index of the cell within its parent table.
inner column stroke color
swatch
read/write
he stroke color of the inner column of the cell.
inner column stroke gap color
swatch
read/write
he gap color of the stroke applied to the inner column of the cell.
inner column stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the inner column of the cell.
inner column stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the inner column of the cell (-1 indicates 100%, or no tint override).
inner column stroke overprint
boolean
read/write
If true, overprint the stroke applied to the inner column of the cell.
inner column stroke tint
fixed
read/write
he tint applied to the stroke of the inner column of the cell (-1 indicates 100%, or no tint override).
inner column stroke type
stroke style
read/write
he type of stroke applied to the inner column of the cell.
inner column stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the inner column of the cell.
inner row stroke color
swatch
read/write
he stroke color of the inner row of the cell.
inner row stroke gap color
swatch
read/write
he gap color of the stroke applied to the inner row of the cell.
inner row stroke gap overprint
boolean
read/write
Whether to overprint the gap of the inner row
inner row stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the inner row of the cell (-1 indicates 100%, or no tint override).
inner row stroke overprint
boolean
read/write
If true, overprint the stroke applied to the inner row of the cell.
inner row stroke tint
fixed
read/write
he tint applied to the stroke of the inner row of the cell (-1 indicates 100%, or no tint override).
inner row stroke type
stroke style
read/write
he type of stroke applied to the inner row of the cell.
104
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
inner row stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the inner row of the cell.
keep with next row
boolean
read/write
If true, keep this row with the next row when the rows break between pages, text frames, or text columns.
let edge stroke color
swatch
read/write
he stroke color of the let edge of the cell.
let edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the let edge of the cell.
let edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the let edge of the cell.
let edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the let edge of the cell (-1 indicates 100%, or no tint override).
let edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the let edge of the cell.
let edge stroke priority
integer
read/write
he stroke priority of the let edge
let edge stroke tint
fixed
read/write
he tint of the color of the let edge
let edge stroke type
stroke style
read/write
he type of stroke applied to the let edge of the cell.
let edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the let edge of the cell.
let inset
fixed or measurement string
read/write
he let inset of the cell.
maximum height
fixed or measurement string
read/write
Specifies the maximum height of the row containing the cell.
minimum first baseline offset
fixed or measurement string
read/write
he minimum distance (in points) between the first baseline of the text in the cell and the top inset of the frame or cell.
minimum height
fixed or measurement string
read/write
Constrains the row height to an amount no smaller than this value. he row may be larger than this amount, however, as the row height will continue to grow automatically as text is added.
name
string
read only
he name of the cell, in the form row number; column number. he third cell of the fourth row, for example, would have the name “R4:C3”.
object reference
column
read only
An object reference to the object.
overflows
boolean
read only
If true, the cell contains overset (i.e., uncomposed) text.
overprint fill
boolean
read/write
If true, overprint the fill of the cell.
paragraph spacing limit
fixed or measurement string
read/write
When the vertical justification of the cell is set to justified, this is the maximum amount of space that will be added between paragraphs. Increase this value to encourage spacing between paragraphs of vertically justified text; decrease it to increase the leading between lines of text in vertically justified text.
parent
object
read only
he parent of the object.
parent column
column
read only
he parent column of the cell.
parent row
row
read only
he parent row of the cell.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right edge stroke color
swatch
read/write
he stroke color of the right edge of the cell.
InDesign CS Scripting Guide AppleScript Reference 105
Property:
Type:
Access:
Description:
right edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the right edge of the cell.
right edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the right edge of the cell.
right edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the right edge of the cell (-1 indicates 100%, or no tint override).
right edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the right edge of the cell.
right edge stroke priority
integer
read/write
he stroke priority of the right edge
right edge stroke tint
fixed
read/write
he tint applied to the stroke of the right edge of the cell (-1 indicates 100%, or no tint override).
right edge stroke type
stroke style
read/write
he type of stroke applied to the right edge of the cell.
right edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the right edge of the cell.
right inset
fixed or measurement string
read/write
he right inset the cell.
rotation angle
fixed
read/write
he rotation angle of the cell.
row span
integer
read only
he number of rows that this cell spans
row type
body row, header row, footer row, mixed state
read/write
he type of the row containing the cell.
start row
anywhere, next column, next frame, next page, next odd page, next even page
read/write
Where to start the row
text cell rotation follows story direction
boolean
read/write
Whether text cell direction matches the story direction
top edge stroke color
swatch
read/write
he stroke color of the top edge of the cell.
top edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the top edge of the cell.
top edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the top edge of the cell.
top edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the top edge of the cell (-1 indicates 100%, or no tint override).
top edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the top edge of the cell.
top edge stroke priority
integer
read/write
he stroke priority of the top edge
top edge stroke tint
fixed
read/write
he tint applied to the stroke of the top edge of the cell (-1 indicates 100%, or no tint override).
top edge stroke type
stroke style
read/write
he type of stroke applied to the right edge of the cell.
top edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the top edge of the cell.
top inset
fixed or measurement string
read/write
he top inset the cell.
top let diagonal line
boolean
read/write
If true, draw a diagonal line from the top let corner to the bottom right corner of the cell .
top right diagonal line
boolean
read/write
If true, draw a diagonal line from the top right corner to the bottom let corner of the cell .
vertical justification
top align, center align, bottom align, justify align
read/write
he vertical justification applied to the text in the cell.
width
fixed or measurement string
read/write
he width of the cell.
106
AppleScript Reference
InDesign CS Scripting Guide
Methods Method: create outlines
delete make
merge
redistribute
search
select
split
unmerge
Parameters: Name:
Type:
Description:
[delete original]
boolean
If true, delete the original object.
None Name:
Type:
Description:
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater an existing column or at the beginning/ end of a parent as column or table.
Name:
Type:
Description:
with
cell
he cell to merge with.
Name:
Type:
Description:
using
horizontal, vertical
which direction to redistribute.
[thru]
cell
redistribute till this object.
Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Name:
Type:
Description:
using
horizontal, vertical
Which direction to split.
None
Return:
Description:
objects
Create outlines from the text.
nothing
Deletes the object.
column
Create a new column.
cell
Merge cells together.
nothing
Redistribute columns or rows.
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Select this column.
nothing
Split the cell either horizontally or vertically.
objects
Unmerge the cells.
InDesign CS Scripting Guide AppleScript Reference 107
contour option Properties Property:
Type:
Access:
Description:
alpha channel path names
list of strings
read only
A list of the alpha channel path names in an imported graphic.
class
type
read only
he class of the object.
contour path name
string
read/write
he name of the current contour option applied to an imported graphic.
contour type
bounding box, photoshop path, detect edges, alpha channel, graphic frame, same as clipping
read/write
he contour options type applied to an imported graphic.
include inside edges
boolean
read/write
If true, include the inside edges of a contour path.
object reference
contour option
read only
An object reference to the object.
parent
text wrap preference
read only
he parent of the object.
photoshop path names
list of strings
read only
A list of the photoshop path names in an imported graphic.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
108
AppleScript Reference
InDesign CS Scripting Guide
cross reference Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
cross reference type
see or also bracket, see, see also, see herein, see also herein, custom cross reference, custom cross reference before, custom cross reference ater
read/write
he cross reference type.
custom type string
string
read/write
he string if a custom cross reference.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the cross reference within its parent topic
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
object reference
cross reference
read only
An object reference to the object.
parent
topic
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
referenced topic
topic
read/write
he index topic that the cross reference refers to.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
cross reference
Create a new cross reference.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
referenced topic
topic
he referenced topic.
cross reference type
lete, pitalize, me, rent, dex, btopics, oss references, ge references, see or also bracket, see, see also, see herein, see also herein, custom cross reference, custom cross reference before, custom cross reference ater
he type of reference.
[custom type string]
string
A custom reference as string.
Description:
InDesign CS Scripting Guide AppleScript Reference 109
dashed stroke style Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
dash array
list of fixed
read/write
he position of the dashes and gaps in the the dashed stroke style.
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of the end points of each dash.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dashed stroke style within its parent document or application
name
string
read/write
he name of the dashed stroke style.
object reference
dashed stroke style
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke style type
string
read only
he type of the dashed stroke style.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
make
None
dashed stroke style
Create a new dashed stroke style.
110
AppleScript Reference
InDesign CS Scripting Guide
Description:
dialog Elements Element:
Refer to by:
dialog column
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
can cancel
boolean
read/write
If true, the dialog contains a Cancel button.
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dialog within its parent application
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the dialog.
object reference
dialog
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
destroy
None
nothing
Destroy dialog
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
extract label
insert label
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Description:
make
None
dialog
Create a new dialog.
show
None
boolean
Show dialog.
InDesign CS Scripting Guide AppleScript Reference 111
dialog column Elements Element:
Refer to by:
angle combobox
index, name, range, relative, test, id
angle editbox
index, name, range, relative, test, id
border panel
index, name, range, relative, test, id
checkbox control
index, name, range, relative, test, id
dialog row
index, name, range, relative, test, id
dropdown
index, name, range, relative, test, id
enabling group
index, name, range, relative, test, id
integer combobox
index, name, range, relative, test, id
integer editbox
index, name, range, relative, test, id
measurement combobox
index, name, range, relative, test, id
measurement editbox
index, name, range, relative, test, id
percent combobox
index, name, range, relative, test, id
percent editbox
index, name, range, relative, test, id
radiobutton group
index, name, range, relative, test, id
real combobox
index, name, range, relative, test, id
real editbox
index, name, range, relative, test, id
static text
index, name, range, relative, test, id
text editbox
index, name, range, relative, test, id
widget
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dialog column within its parent dialog, dialog row, enabling group or border panel
object reference
dialog column
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
make
None
dialog column
Create a new dialog column.
112
AppleScript Reference
InDesign CS Scripting Guide
dialog row Elements Element:
Refer to by:
angle combobox
index, name, range, relative, test, id
angle editbox
index, name, range, relative, test, id
border panel
index, name, range, relative, test, id
checkbox control
index, name, range, relative, test, id
dialog column
index, name, range, relative, test, id
dropdown
index, name, range, relative, test, id
enabling group
index, name, range, relative, test, id
integer combobox
index, name, range, relative, test, id
integer editbox
index, name, range, relative, test, id
measurement combobox
index, name, range, relative, test, id
measurement editbox
index, name, range, relative, test, id
percent combobox
index, name, range, relative, test, id
percent editbox
index, name, range, relative, test, id
radiobutton group
index, name, range, relative, test, id
real combobox
index, name, range, relative, test, id
real editbox
index, name, range, relative, test, id
static text
index, name, range, relative, test, id
text editbox
index, name, range, relative, test, id
widget
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dialog row within its parent dialog column, enabling group or border panel
object reference
dialog row
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
make
None
dialog row
Create a new dialog row.
InDesign CS Scripting Guide AppleScript Reference 113
dictionary preference Properties Property:
Type:
Access:
class
type
read only
he class of the object.
composition
use user dictionary, use document, both
read/write
Tells the document which hyphenation source to use when composing text.
merge user dictionary
boolean
read/write
If true, merge the user dictionary files into the document.
object reference
dictionary preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
recompose
boolean
read/write
If true, recompose every time the composition source has changed.
114
AppleScript Reference
InDesign CS Scripting Guide
Description:
display performance preference Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
default display settings
high quality, typical, optimized
read/write
he default display setting for new windows.
ignore local settings
boolean
read/write
If true, ignore local settings for all windows.
object reference
display performance preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
persist local settings
boolean
read/write
Whether or not to local settings are saved to and read from the document
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
InDesign CS Scripting Guide AppleScript Reference 115
display setting Properties Property:
Type:
Access:
Description:
antialiasing
boolean
read/write
If true, anti-alias objects. (his setting affects the display only, and has no effect on printing.)
class
type
read only
he class of the object.
greek below
fixed
read/write
Display text below this size (in points) as a gray rectangle (“greeking”).
index
integer
read only
index of the display setting within its parent application
object reference
display setting
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
raster
gray out, proxy, high resolution, default
read/write
he method used to display raster images.
transparency
off, low quality, medium quality, high quality, default
read/write
he method used to display transparency.
vector
gray out, proxy, high resolution, default
read/write
he method used to display vector objects.
116
AppleScript Reference
InDesign CS Scripting Guide
document Elements Element:
Refer to by:
bookmark
index, name, range, relative, test, id
button
index, name, range, relative, test, id
character style
index, name, range, relative, test, id
color
index, name, range, relative, test, id
dashed stroke style
index, name, range, relative, test, id
dotted stroke style
index, name, range, relative, test, id
DTD
index, name, range, relative, test, id
font
index, name, range, relative, test
form field
index, name, range, relative, test, id
gradient
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
guide
index, name, range, relative, test, id
hyperlink
index, name, range, relative, test, id
hyperlink external page destination
index, name, range, relative, test, id
hyperlink page destination
index, name, range, relative, test, id
hyperlink page item source
index, name, range, relative, test, id
hyperlink text destination
index, name, range, relative, test, id
hyperlink text source
index, name, range, relative, test, id
hyperlink URL destination
index, name, range, relative, test, id
hyphenation exception
index, name, range, relative, test
index
index, name, range, relative, test, id
ink
index, name, range, relative, test, id
language
index, name, range, relative, test, id
layer
index, name, range, relative, test, id
layout window
index, name, range, relative, test
link
index, name, range, relative, test, id
master spread
index, name, range, relative, test, id
mixed ink
index, name, range, relative, test, id
mixed ink group
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph style
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
section
index, name, range, relative, test, id
spread
index, name, range, relative, test, id
story
index, name, range, relative, test, id
story window
index, name, range, relative, test
striped stroke style
index, name, range, relative, test, id
stroke style
index, name, range, relative, test, id
swatch
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
tint
index, name, range, relative, test, id
InDesign CS Scripting Guide AppleScript Reference 117
Element:
Refer to by:
TOC style
index, name, range, relative, test, id
trap preset
index, name, range, relative, test, id
validation error
index, name, range, relative, test
window
index, name, range, relative, test
XML comment
index, name, range, relative, test, id
XML element
index, name, range, relative, test, id
XML export map
index, name, range, relative, test
XML import map
index, name, range, relative, test
XML instruction
index, name, range, relative, test, id
XML item
index, name, range, relative, test, id
XML tag
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
ater blending intent
use color settings, perceptual, saturation, relative colorimetric, absolute colorimetric
read/write
he rendering intent for transparent objects. Corresponds to the Ater-Blending Intent pop-up menu in the Assign Profiles dialog box.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items on the document pages of the document, egardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associated XML element
XML element
read only
he XML element associated with the document.
button preferences
button preferences
read only
button preferences
class
type
read only
he class of the object.
CMYK profile
string
read/write
he name of the current CMYK profile.
CMYK profile list
list of strings
read only
A list of the names of the available CMYK profiles.
default image intent
use color settings, perceptual, saturation, relative colorimetric, absolute colorimetric
read/write
he default color management intent for bitmap images in the document. his property corresponds to the Default image Intent pop-up menu in the Assign Profiles dialog box.
dictionary preferences
dictionary preferences
read only
he user dictionary preferences for the document. his object corresponds to the Dictionary panel of the Preferences dialog box.
document preferences
document preferences
read only
he document preferences for the document. his object corresponds to the document panel of the Preferences dialog box.
file path
file reference or file name as string
read only
he file path to the folder containing the document (does not include the file name).
full name
file reference or file name as string
read only
he file path to the document file, including the file name.
galley preferences
galley preferences
read only
he story Editor preferences of the document. his object corresponds to the story Editor Display panel of the Preferences dialog box.
118
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
grid preferences
grid preferences
read only
he document grid preferences. his object corresponds to the Grids panel of the Preferences dialog box.
guide preferences
guide preferences
read only
he guide preferences for the document. his object corresponds to the guides and Pasteboard panel of the Preferences dialog box.
index
integer
read only
index of the document within its parent application
index generation options
index options
read only
he options controlling index generation for the document. his object corresponds to the Generate index dialog box (to display this dialog box, choose Generate index from the index palette menu).
label
string
read/write
A label that can be set to any string
layout adjustment preferences
layout adjustment preferences
read only
he document layout adjustment preferences. he properties in this object correspond to the options shown in the Layout Adjustment dialog box (choose Layout Adjustment from the Layout menu to display this dialog box).
margin preferences
margin preferences
read only
Margin preferences
metadata preferences
metadata preferences
read only
he document metadata preferences.
modified
boolean
read only
If true, the document has been modified since it was last saved.
name
string
read only
he name of the document.
object reference
document
read only
An object reference to the object.
package for GoLive preferences
package for GoLive preferences
read only
he default Package For GoLive preferences
parent
object
read only
he parent of the object.
pasteboard preferences
pasteboard preferences
read only
he pasteboard preferences for the document.
polygon preferences
polygon preferences
read only
he polygon preferences for the document.
print preferences
print preferences
read only
he print preferences of the document.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
redo name
string
read only
Name of the action on the top of the redo stack.
RGB profile
string
read/write
he name of the current RGB profile.
RGB profile list
list of string
read only
he list of the names of available RGB profiles.
saved
boolean
read only
If true, the document has been saved since it was opened.
selection
list
read/write
he current selection of the active window.
solid color intent
use color settings, perceptual, saturation, relative colorimetric, absolute colorimetric
read/write
he rendering intent to use for solid colors. his property corresponds to the Solid color Intent pop-up menu in the Assign Profiles dialog box.
story preferences
story preferences
read only
he document default story preferences.
text defaults
text default
read only
he document default text formatting. Changing the default text formatting sets the default formatting for all new text frames, but has no effect on the text in existing text frames.
InDesign CS Scripting Guide AppleScript Reference 119
Property:
Type:
Access:
Description:
text frame preferences
text frame preferences
read only
he document default text frame preferences. Changing the default text frame preferences sets the default formatting for all new text frames, but has no effect on existing text frames.
text preferences
text preferences
read only
he document’s text preferences. his object corresponds to the text panel of the Preferences dialog box.
transparency preferences
transparency preferences
read only
he document transparency preferences. his object corresponds to the setting of the Transparency Blend Space submenu of the Edit menu.
undo name
string
read only
he name of the action on the top of the undo stack.
unused swatches
list of swatch
read only
he unused swatches in the document.
view preferences
view preferences
read only
he view preferences of the document. he properties of this object correspond to the options in the Units and Increments panel of the Preferences dialog box.
visible
boolean
read only
If true, the document is visible.
XML export preferences
XML export preferences
read only
he XML export preferences of the document.
XML import preferences
XML import preferences
read only
he XML import preferences of the document.
XML view preferences
XML view preferences
read only
he XML view preferences of the document. he properties of this object correspond to the show/hide options on the Structure View menu.
zero point
list of numbers or measurement strings {x, y}
read/write
he current zero point. he default location of the zero point is set by the ruler origin property of the view preferences object. Setting the zero point to (0,0) returns the zero point to the default location.
Methods Method:
Parameters:
Return:
Description:
auto style
None
nothing
Auto style the document based on the tag to style map
auto tag
None
nothing
Auto tag the document based on the style to tag map
nothing
Close the document.
close
120
Name:
Type:
Description:
[saving]
no, ask, yes
If true, save changes before closing the document.
[saving in]
file reference or file name as string
he file in which to save the document.
AppleScript Reference
InDesign CS Scripting Guide
Method: create toc
delete unused tags export
extract label
import dtdd
import styles
import xml
insert label
load xml tags
Parameters: Name:
Type:
Description:
using
TOCStyle
he table of content style to create with.
[replacing]
boolean
If true, replace existing TOC.
[from book]
book
he book object where TOC is created from.
[place point]
list of numbers or measurement strings {x, y}
he point where to place the object.
[include overset]
boolean
If true, include TOC in overset.
[destination layer]
layer or layer name as string
he layer on which to place the TOC as layer.
None Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
from
string
What to import from.
Name:
Type:
Description:
format
character styles format, paragraph styles format, text styles format, toc styles format
the format.
from
string
an InDesign file to import from.
Name:
Type:
Description:
from
string
What to import from.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
from
string
What to import from.
Return:
Description:
text frame
Create table of Content for a document or book.
nothing
Delete unused XML markup tags
nothing
Exports the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Import a dtdd to use for validation.
nothing
Import styles or presets.
nothing
Import a XML file into an InDesign document.
nothing
Sets the string associated with the given key (label name).
nothing
Load a set of tags from an external file.
InDesign CS Scripting Guide AppleScript Reference 121
Method: make
package
package for go live
print out
redo
Name:
Type:
Description:
[showing window]
boolean
If true, open the document in a window.
[document preset]
document preset or document preset name as string
document preset to use as documentPreset.
Name:
Type:
Description:
to
string
A folder, alias or path as string in which to place the packaged files.
copying fonts
boolean
If true, copy required fonts.
copying linked graphics
boolean
If true, copy linked graphics file.
copying profiles
boolean
If true, copy profiles.
updating graphics
boolean
If true, update graphics links before packaging.
including hidden layers
boolean
If true, include objects on hidden layers.
ignore preflight errors
boolean
If true, ignore preflight errors and package anyways.
creating report
boolean
If true, create package report.
Name:
Type:
Description:
location
string
File location for package.
Name:
Type:
Description:
[print dialog]
boolean
If true, display the Print dialog box.
[using]
printer preset or printer preset name as string
he printer preset.
None
save
save xml tags
122
Parameters:
Name:
Type:
Description:
[to]
file reference or file name as string
Where to save the document. If the document is already saved, a copy is saved at this path, the original file is closed the new copy is opened.
[stationery]
boolean
If true, save the file as stationery.
Name:
Type:
Description:
to
string
he file to export to.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
document
Create a new document.
boolean
Packages the document.
boolean
Packages for GoLive.
nothing
Prints the document.
nothing
Redo the last action
nothing
Save the document.
nothing
Save a set of tags to an external file.
Method: search
select
undo
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
selectable items
object, list of objects, or nothing (to deselect all)
he object(s) to select.
[existing selection]
replace, add to, remove from
How to handle the existing selection.
None
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects an object or objects. If the object is a text object (e.g., characters, words, lines, paragraphs), any other selected objects are deselected (the AppendSelection parameter has no effect).
nothing
Undo the last action
InDesign CS Scripting Guide AppleScript Reference 123
document preference Properties Property:
Type:
Access:
Description:
allow page shuffle
boolean
read/write
If false, adding a page to a spread always adds it to that spread (up to a maximum of 10 pages). If true, pages added to the spread can be moved (“shuffled”) to a different spread.
class
type
read only
he class of the object.
column guide color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of column guides.
document bleed bottom offset
fixed or measurement string
read/write
he height of the bottom document bleed offset.
document bleed inside or let offset
fixed or measurement string
read/write
he width of the inside (or let) document bleed offset.
document bleed outside or right offset
fixed or measurement string
read/write
he width of the outside (or right) document bleed offset.
document bleed top offset
fixed or measurement string
read/write
he height of the top document bleed offset.
document bleed uniform size
boolean
read/write
he bleed uniform size flag
document slug uniform size
boolean
read/write
he slug uniform size flag
facing pages
boolean
read/write
If true, the document uses facing pages.
margin guide color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of margin guides.
object reference
document preference
read only
An object reference to the object.
overprint black
boolean
read/write
If true, overprint black when printing the document.
page height
fixed or measurement string
read/write
he height of the pages in the document.
page orientation
landscape, portrait
read/write
he orientation of the pages in the document.
page width
fixed or measurement string
read/write
he width of the pages in the document.
pages per document
integer
read/write
he number of pages in a document.
parent
object
read only
he parent of the object.
preserve layout when shuffling
boolean
read/write
If true, then when setting ‘allow page shuffle’ and the document has spreads with a number of pages greater than the default, this layout is preserved. If false then the pages on these spreads get shuffled.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
slug bottom offset
fixed or measurement string
read/write
he height of the bottom slug offset.
slug inside or let offset
fixed or measurement string
read/write
he width of the inside (or let) slug offset.
slug right or outside offset
fixed or measurement string
read/write
he width of the outside (or right) slug offset.
slug top offset
fixed or measurement string
read/write
he height of the top slug offset.
124
AppleScript Reference
InDesign CS Scripting Guide
document preset Properties Property:
Type:
Access:
Description:
bottom
fixed or measurement string
read/write
Bottom edge of the document preset
class
type
read only
he class descriptor type
column count
integer
read/write
he number of columns
column gutter
fixed or measurement string
read/write
he distance between columns in a text frame
document bleed bottom offset
fixed or measurement string
read/write
he bottom document bleed offset
document bleed inside or let offset
fixed or measurement string
read/write
he let or inside document bleed offset
document bleed outside or right offset
fixed or measurement string
read/write
he outside or right document bleed offset
document bleed top offset
fixed or measurement string
read/write
he top document bleed offset
facing pages
boolean
read/write
Whether the document has facing page.
id
integer
read only
he document preset’s unique id
index
integer
read only
index of the document preset within its parent application
label
string
read/write
A label that can be set to any string
let
fixed or measurement string
read/write
Let edge of the document preset
name
string
read/write
he name of the document preset
object reference
document preset or document preset name as string
read only
An object reference for this document preset
page height
fixed or measurement string
read/write
he height of the page
page orientation
landscape, portrait
read/write
he orientation of the page
page width
fixed or measurement string
read/write
he width of the page
pages per document
integer
read/write
he number of pages in a document
parent
object
read only
he document preset’s parent
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
right
fixed or measurement string
read/write
Right edge of the document preset
slug bottom offset
fixed or measurement string
read/write
he bottom slug offset
slug inside or let offset
fixed or measurement string
read/write
he inside or let slug offset
slug right or outside offset
fixed or measurement string
read/write
he right or outside slug offset
slug top offset
fixed or measurement string
read/write
he top slug offset
top
fixed or measurement string
read/write
Top edge of the document preset
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
document preset
Duplicates the object.
string
Gets the label value associated with the given key (label name).
extract label
Name:
Type:
Description:
key
string
he key.
Description:
InDesign CS Scripting Guide AppleScript Reference 125
Method: insert label
make
126
Parameters: Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Sets the string associated with the given key (label name).
document preset
Create a new document preset.
dotted stroke style Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
dot array
list of fixed
read/write
he position of the dots in the the dotted stroke style.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dotted stroke style within its parent document or application
name
string
read/write
he name of the XML tag
object reference
dotted stroke style
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke style type
string
read only
Stroke style type
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
make
None
dotted stroke style
Create a new dotted stroke style.
InDesign CS Scripting Guide AppleScript Reference 127
dropdown Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dropdown within its parent dialog column, dialog row, enabling group or border panel
min width
fixed
read/write
he minimum width of the control.
object reference
dropdown
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
selected index
integer
read/write
index of the selected string in the dropdown
string list
list of strings
read/write
A list of the strings that appear on the menu of the control.
Methods Method:
Parameters:
Return:
Description:
make
None
dropdown
Create a new dropdown.
128
AppleScript Reference
InDesign CS Scripting Guide
DTD Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
contents
fixed or measurement string
read only
he contents of the dtdd.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dtdd within its parent document, XML element or XML item
object reference
DTD
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
public id
string
read only
he public id of the dtdd’S DOCTYPE declaration. Only valid if the dtdd an an external subset.
root tag
XML tag
read/write
he XML tag of the document’s root object.
system id
string
read only
he system id of the dtdd’S DOCTYPE declaration. Only valid if the dtdd is an external subset.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
xml element
Move element before/ater another element or text object, or to beginning/end.
nothing
Select this dtdd.
move
select
Name:
Type:
Description:
to
before, ater, at beginning, at end
Location.
[reference]
object
Before/ater this object as xml item or text.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Description:
InDesign CS Scripting Guide AppleScript Reference 129
enabling group Elements Element:
Refer to by:
angle combobox
index, name, range, relative, test, id
angle editbox
index, name, range, relative, test, id
border panel
index, name, range, relative, test, id
checkbox control
index, name, range, relative, test, id
dialog column
index, name, range, relative, test, id
dialog row
index, name, range, relative, test, id
dropdown
index, name, range, relative, test, id
enabling group
index, name, range, relative, test, id
integer combobox
index, name, range, relative, test, id
integer editbox
index, name, range, relative, test, id
measurement combobox
index, name, range, relative, test, id
measurement editbox
index, name, range, relative, test, id
percent combobox
index, name, range, relative, test, id
percent editbox
index, name, range, relative, test, id
radiobutton group
index, name, range, relative, test, id
real combobox
index, name, range, relative, test, id
real editbox
index, name, range, relative, test, id
static text
index, name, range, relative, test, id
text editbox
index, name, range, relative, test, id
widget
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
checked state
boolean
read/write
True if this item is checked
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the enabling group within its parent dialog column, dialog row, enabling group or border panel
min width
fixed
read/write
he minimum width of the control.
object reference
enabling group
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
static label
string
read/write
static text label for the widget
Methods Method:
Parameters:
Return:
Description:
make
None
enabling group
Create a new enabling group.
130
AppleScript Reference
InDesign CS Scripting Guide
EPS Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
actual ppi
list of fixed
read only
he resolution of the native graphic file
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
clipping path
clipping path settings
read only
he clipping path settings
effective ppi
list of fixed
read only
he resolution of the graphic ater it has been resized
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
image type name
string
read only
he type of image
index
integer
read only
index of the epss within its parent XML element, page item, oval, rectangle, polygon, graphic line, state, group or button
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item link
link
read only
link to a placed file
InDesign CS Scripting Guide AppleScript Reference 131
Property:
Type:
Access:
Description:
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
nonprinting
boolean
read/write
Whether the page item is non-printing
object reference
EPS
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
space
string
read only
he color space
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
132
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
nothing
Export the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Markup layout content with XML preserving the existing content.
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
export
extract label
insert label
markup
move
Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
XML Element
he element to mark up.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current location.
InDesign CS Scripting Guide AppleScript Reference 133
Method: place
place xml
resize
134
Parameters: Name:
Type:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point at which to place the file.
[destination layer]
layer or layer name as string
he layer on which to place the file.
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
If true, convert straight quotes to typographer’s quotes.
Name:
Type:
Description:
using
XML element
he element to place into.
Name:
Type:
Description:
[horizontal scale]
fiuxed
he horizontal scaling percentage.
[vertical scale]
fixed
he vertical scaling percentage.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
AppleScript Reference
InDesign CS Scripting Guide
Description:
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Method: rotate
shear
store
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to rotate around.
[considering current rotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are rotated.
[considering parents rotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to shear around.
[considering current shear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are sheared.
[considering parents shear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Return:
Description:
nothing
Rotate the page item.
nothing
Shear the page item.
asset
Store a page item in a library.
InDesign CS Scripting Guide AppleScript Reference 135
Method: unlink
136
Parameters: Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
EPS export preference Properties Property:
Type:
Access:
Description:
applied flattener preset
flattener preset
read/write
he flattener preset
bleed bottom
fixed or measurement string
read/write
Bleed amount to add at the bottom of the page.
bleed inside
fixed or measurement string
read/write
Bleed amount to add at the inside of the page.
bleed outside
fixed or measurement string
read/write
Bleed amount to add at the outside of the page.
bleed top
fixed or measurement string
read/write
Bleed amount to add at the top of the page.
class
type
read only
he class of the object.
data format
ASCII, binary
read/write
he data format (binary or ASCII) to use when exporting an epss.
EPS color
RGB, CMYK, gray, unchanged color space
read/write
he color space to use when exporting the epss.
EPS spreads
boolean
read/write
If true, export the pages in the page range as spreads.
font embedding
none, complete, subset
read/write
he method used to embed fonts in the exported epss.
ignore spread overrides
boolean
read/write
If true, ignore flattener spread overrides for the exported epss.
image data
all image data, proxy image data
read/write
Control how much image data is exported to the epss
object reference
EPS export preference
read only
An object reference to the object.
omit bitmaps
boolean
read/write
If true, omit bitmap images from the exported epss. (If you choose to omit images, InDesign still includes OPI link information for the omitted images in the epss.)
omit EPS
boolean
read/write
If true, omit epss graphics from the exported epss. (If you choose to omit epsss, InDesign still includes OPI link information for the omitted graphics in the epss.)
omit PDF
boolean
read/write
If true, omit pdf graphics from the exported epss. (If you choose to omit pdfs, InDesign still includes OPI link information for the omitted graphics in the epss.)
OPI image replacement
boolean
read/write
If true, use OPI image replacement.
page range
string or ‘all’
read/write
he range of pages to export.
parent
object
read only
he parent of the object.
PostScript level
level 2, level 3
read/write
he level of PostScript to send to the printer.
preview
none, TIFF preview, PICT preview
read/write
he type of preview to save with the exported epss.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
InDesign CS Scripting Guide AppleScript Reference 137
EPS import preference Properties Property:
Type:
Access:
class
type
read only
he class of the object.
EPS frames
boolean
read/write
If true, create a frame from the epss clipping path as you import the epss.
EPS proxy
as needed, always
read/write
he type of proxy (preview image) created when importing an epss graphic.
object reference
EPS import preference
read only
An object reference to the object.
OPI comments
boolean
read/write
If true, read OPI image link information when importing an epss graphic.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
138
AppleScript Reference
InDesign CS Scripting Guide
Description:
excel import preference Properties Property:
Type:
Access:
Description:
alignment style
spreadsheet, let align, right align, center align
read/write
he alignment of text in the cells of the imported Excel spreadsheet.
class
type
read only
he class of the object.
decimal places
integer
read/write
he number of decimal places.
error code
integer
read/write
he error code associated with the Excel spreadsheet import. (0-Success 1-Empty Sheet 2-Invalid sheet 3-Invalid range 4-Invalid View 5-Misc. Error).
object reference
excel import preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
range name
string
read/write
he name of selected range.
sheet index
integer
read/write
index of the selected sheet.
sheet name
string
read/write
he name of the selected sheet.
show hidden cells
boolean
read/write
If true, show hidden cells in the imported spreadsheet.
table formatting
excel formatted table, excel unformatted table, excel unformatted tabbed text
read/write
Options for table Formatting
view name
string
read/write
he name of selected view.
InDesign CS Scripting Guide AppleScript Reference 139
find preference Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
applied character style
string
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
string
read/write
he paragraph style applied to the text.
auto leading
fixed
read/write
Percentage for calculating auto leading
balance ragged lines
boolean
read/write
Whether to balance ragged lines
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
case sensitive
boolean
read/write
If true, then search only for text that matches case
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
fill color
string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he text override of the fill’s tint percentage (-1 indicates no override)
find text
string
read/write
he text to find
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
140
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed or measurement string or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
find preference
read only
An object reference to the object.
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
InDesign CS Scripting Guide AppleScript Reference 141
Property:
Type:
Access:
Description:
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines with only one word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
Where to start the paragraph
strike through color
swatch or string
read/write
he color of the strike through. Can return: swatch or string.
strike through gap color
swatch or string
read/write
he gap color of the strike through. Can return: swatch or string.
strike through gap overprint
boolean
read/write
Whether to overprint the gap of the strike through
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through
strike through overprint
boolean
read/write
Whether to overprint the strike through
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strike through
strike through weight
fixed
read/write
he line weight of the strike through
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
string
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he text override of the stroke’s tint percentage (-1 indicates no override)
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color of the underline. Can return: swatch or string.
underline gap color
swatch or string
read/write
he gap color of the underline. Can return: swatch or string.
142
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underline gap overprint
boolean
read/write
Whether to overprint the gap of the underline
underline gap tint
fixed
read/write
he gap tint of the underline
underline offset
fixed or measurement string
read/write
he offset of the underline
underline overprint
boolean
read/write
Whether to overprint the underline
underline tint
fixed
read/write
he tint of the underline
underline type
stroke style
read/write
he stroke type of the underline
underline weight
fixed
read/write
he line weight of the underline
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
whole word
boolean
read/write
If true, then disregard text embedded within a larger word
InDesign CS Scripting Guide AppleScript Reference 143
flattener preference Properties Property:
Type:
Access:
class
type
read only
he class of the object.
clip complex regions
boolean
read/write
If true, clip rasterized areas of the page to the objects which are actually rasterized.
convert all strokes to outlines
boolean
read/write
Convert all strokes to outlines, not just those involved with transparency
convert all text to outlines
boolean
read/write
Convert all text to outlines, not just the text involved with transparency
gradient and mesh resolution
fixed
read/write
Resolution at which gradient and mesh are rasterized, when necessary
line art and text resolution
fixed
read/write
Resolution of transparency effects for line art and text (drop shadows and feathering)
object reference
flattener preference
read only
An object reference to the object.
parent
spread
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
raster vector balance
high, medium high, medium, medium low, or low
read/write
raster vector balance. Can return: low/medium low/medium/medium high/high or fixed.
144
AppleScript Reference
InDesign CS Scripting Guide
Description:
flattener preset Properties Property:
Type:
Access:
class
type
read only
Description: he class descriptor type
clip complex regions
boolean
read/write
Clip rasterized areas of the page to the objects which are actually rasterized
convert all strokes to outlines
boolean
read/write
Convert all strokes to outlines, not just those involved with transparency
convert all text to outlines
boolean
read/write
Convert all text to outlines, not just the text involved with transparency
gradient and mesh resolution
fixed
read/write
Resolution at which gradient and mesh are rasterized, when necessary
id
integer
read only
he flattener preset’s unique id
index
integer
read only
index of the flattener preset within its parent application
label
string
read/write
A label that can be set to any string
line art and text resolution
fixed
read/write
Resolution of transparency effects for line art and text (drop shadows and feathering)
name
string
read/write
he name of the flattener preset
object reference
flattener preset
read only
An object reference for this flattener preset
parent
object
read only
he flattener preset’s parent
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
raster vector balance
high, medium high, medium, medium low, or low
read/write
raster vector balance. Can return: low/medium low/medium/medium high/high or fixed.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
flattener preset
Create a new flattener preset.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 145
font Properties Property:
Type:
Access:
Description:
allow embedding
boolean
read only
If true, the font can be embedded.
allow outlines
boolean
read only
If true, the font allows the creation of outlines from its character data.
allow PDF embedding
boolean
read only
If true, the font can be embedded in an exported pdf.
allow printing
boolean
read only
If true, the font can be printed.
class
type
read only
he class of the object.
font family
string
read only
he name of the font family.
font style name
string
read only
he name of the font style.
font type
type 1, TrueType, CID, ATC, bitmap, OCF, OpenType CFF, OpenType CID, OpenType TT
read only
he type of the font (TrueType, Type1, etc.).
index
integer
read only
index of the font within its parent document or application
location
string
read only
he location of the font file on disk, including the file name.
name
string
read only
he name of the font.
object reference
font
read only
An object reference to the object.
parent
object
read only
he parent of the object.
PostScript name
string
read only
he PostScript name of the font.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
restricted printing
boolean
read only
If true, printing of the font is restricted.
status
installed, not available, fauxed, substituted, unknown
read only
he status of the font.
Methods Method: check open type feature
146
Parameters: Name:
Type:
Description:
using
low, discretionary ligatures feature, fractions feature, ordinal feature, swash feature, titling feature, contextual alternates feature, all small caps feature, superscript feature, subscript feature, numerator feature, denominator feature, tabular linin
Which OpenType feature to use.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
boolean
Check whether a font object supports a specific open type feature. Pass in either one of the OpenTypeFeature enumeration values or a string with the 4 character code of the feature.
form field Elements Element:
Refer to by:
behavior
index, name, range, relative, test, id
close window behavior
index, name, range, relative, test, id
goto anchor behavior
index, name, range, relative, test, id
goto first page behavior
index, name, range, relative, test, id
goto last page behavior
index, name, range, relative, test, id
goto next page behavior
index, name, range, relative, test, id
goto next view behavior
index, name, range, relative, test, id
goto previous page behavior
index, name, range, relative, test, id
goto previous view behavior
index, name, range, relative, test, id
goto URL behavior
index, name, range, relative, test, id
movie behavior
index, name, range, relative, test, id
open file behavior
index, name, range, relative, test, id
quit behavior
index, name, range, relative, test, id
show hide fields behavior
index, name, range, relative, test, id
sound behavior
index, name, range, relative, test, id
view zoom behavior
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
appearance name
string
read only
Name of any appearance of field
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
corner effect
none, rounded corner, inverse rounded corner, inset corner, bevel corner, fancy corner
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
InDesign CS Scripting Guide AppleScript Reference 147
Property:
Type:
Access:
Description:
corner radius
fixed
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
description
string
read/write
Description
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
end join
miter end join, round end join, bevel end join
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fill tint
fixed
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gap color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gap tint
fixed
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradient fill angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient fill length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradient stroke angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient stroke length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
148
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the form field within its parent spread, master spread, group, text frame, story, text, character, word, line, text column, paragraph, text style range, cell, table, page, document, layer or insertion point
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item layer
layer
read/write
he layer containing the page item.
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
let line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miter limit
fixed
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
name
string
read/write
he name of the behavior.
nonprinting
boolean
read/write
If true, the page item is non-printing.
object reference
form field
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overprint fill
boolean
read/write
If true, the fill of the page item will overprint.
overprint gap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprint stroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
InDesign CS Scripting Guide AppleScript Reference 149
Property:
Type:
Access:
Description:
overridden master page item
page item
read only
A reference to the master page item linked to the page item (if any).
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
stroke alignment
center alignment, inside alignment, outside alignment
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
stroke color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke dash and gap
list of fixed or measurement strings {dash, gap, ...}
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
150
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
stroke tint
fixed
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
stroke type
stroke style
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
stroke weight
fixed
read/write
he weight (in points) of the stroke applied to the page item.
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visibility in pdf
visible in pdf, hidden in pdf, visible but does not print in pdf, hidden but printable in pdf
read/write
visibility of the item in the output pdf
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: add path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Return:
Description:
page item
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
delete
None
nothing
Deletes the object.
duplicate
None
form field
Duplicates the object.
page item
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
nothing
Exports the object to file.
string
Gets the label value associated with the given key (label name).
exclude overlap path
Name:
Type:
Description:
with
list of objects
he objects to exclude.
export
Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
extract label
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
InDesign CS Scripting Guide AppleScript Reference 151
Method: fit
Parameters: Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
list of objects
he objects to intersect with.
make compound path
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
insert label
intersect path
minus back
move
override
152
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Fit content within a graphic frame.
nothing
Sets the string associated with the given key (label name).
page item
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
page item
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
page item
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
page item
Overrides an item from the master page and places it on the page.
Method: place
place xml
Parameters: Name:
Type:
file name
string
Description: he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Name:
Type:
Description:
using
XML element
he element to place into.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
release compound path
None
objects
release compound path.
remove override
None
nothing
Removes a locally overriden master page item
reset scaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
InDesign CS Scripting Guide AppleScript Reference 153
Method: resize
rotate
select
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to rotate around, either one of the enums or an x,y value.
[considering current rotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are rotated.
[considering parents rotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
nothing
Select this form field.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
154
AppleScript Reference
InDesign CS Scripting Guide
Method: shear
store
subtract path
unlink
Parameters: Name:
Type:
Description:
by
number
angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to shear around, either one of the enums or an x,y value.
[considering current shear]
boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are sheared.
[considering parents shear]
boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
page item
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide AppleScript Reference 155
galley preference Properties Property:
Type:
Access:
Description:
background color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he background color of the story Editor. his property corresponds to the Background pop-up menu in the story Editor Display panel of the Preferences dialog box.
blink cursor
boolean
read/write
If true, the story Editor cursor will blink. his property corresponds to the Blink option in the story Editor Display panel of the Preferences dialog box.
class
type
read only
he class of the object.
cursor type
standard cursor, thick cursor, barbell cursor, block cursor
read/write
Sets the type of cursor should be used in galley and story views.
object reference
galley preference
read only
An object reference to the object.
override preview font
string
read/write
he font to use for displaying text in the story Editor.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
smooth text
boolean
read/write
If true, antialias text displayed in the story Editor. this property corresponds to the Enable Anti-Aliasing option in the story Editor Display panel of the Preferences dialog box.
text color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of text displayed in the story Editor. his property corresponds to the text color pop-up menu in the story Editor Display panel of the Preferences dialog box.
use override preview font
boolean
read/write
If true, use the font specified in the override preview font property.
156
AppleScript Reference
InDesign CS Scripting Guide
general preference Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
complete font download glyph limit
integer
read/write
Complete font download glyph limit
include preview
boolean
read/write
Whether to include a preview when saving the document
object reference
general preference
read only
An object reference to the object.
page numbering
section, absolute
read/write
How to number pages
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
temporary folder
file reference or file name as string
read/write
Where temporary files should be stored
tool tips
normal, none, fast
read/write
Controls the appearance of tool tips
tools palette
single column, double column, single row
read/write
Controls the appearance of the tools palette
InDesign CS Scripting Guide AppleScript Reference 157
goto anchor behavior Properties Property:
Type:
Access:
Description:
anchor item
hyperlink
read/write
he anchor item
anchor name
string
read only
he anchor name
class
type
read only
he class descriptor type
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
file path
file reference or file name as string
read/write
he file path
id
integer
read only
he goto anchor behavior’s unique id
index
integer
read only
index of the goto anchor behavior within its parent form field or button
label
string
read/write
A label that can be set to any string
name
string
read only
he name of the goto anchor behavior
object reference
goto anchor behavior
read only
An object reference for this goto anchor behavior
parent
object
read only
he goto anchor behavior’s parent. Can return: form field or button.
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
zoom setting
inherit zoom, fit window, fit width, fit visible, actual size
read/write
he zoom setting
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
goto anchor behavior
Create a new goto anchor behavior.
extract label
insert label
make
158
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
goto first page behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the goto first page behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
object reference
goto first page behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
zoom setting
inherit zoom, fit window, fit width, fit visible, actual size
read/write
he zoom setting
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
goto first page behavior
Create a new goto first page behavior.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 159
goto last page behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the goto last page behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
object reference
goto last page behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
zoom setting
inherit zoom, fit window, fit width, fit visible, actual size
read/write
he zoom setting
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
goto last page behavior
Create a new goto last page behavior.
extract label
insert label
make
160
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
goto next page behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the goto next page behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
object reference
goto next page behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
zoom setting
inherit zoom, fit window, fit width, fit visible, actual size
read/write
he zoom setting
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
goto next page behavior
Create a new goto next page behavior.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 161
goto next view behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the goto next view behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
object reference
goto next view behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
zoom setting
inherit zoom, fit window, fit width, fit visible, actual size
read/write
he zoom setting
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
goto next view behavior
Create a new goto next view behavior.
extract label
insert label
make
162
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
goto previous page behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the goto previous page behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
object reference
goto previous page behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
zoom setting
inherit zoom, fit window, fit width, fit visible, actual size
read/write
he zoom setting
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
goto previous page behavior
Create a new goto previous page behavior.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 163
goto previous view behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the goto previous view behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
object reference
goto previous view behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
zoom setting
inherit zoom, fit window, fit width, fit visible, actual size
read/write
he zoom setting
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
goto previous view behavior
Create a new goto previous view behavior.
extract label
insert label
make
164
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
goto URL behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the goto URL behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the XML tag
object reference
goto URL behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
URL
string
read/write
he URL
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
goto url behavior
Create a new goto url behavior.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 165
gradient Elements Element:
Refer to by:
gradient stop
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the gradient within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the gradient swatch.
object reference
gradient
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
type
linear, radial
read/write
he type of the gradient.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
gradient
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
gradient
Create a new gradient.
nothing
Merge one or more other swatches into this one.
extract label
insert label
make merge
166
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None Name:
Type:
Description:
with
gradient
he swatches to merge.
AppleScript Reference
InDesign CS Scripting Guide
gradient stop Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
index
integer
read only
index of the gradient stop within its parent gradient
location
fixed
read/write
he location of the gradient stop, as a percentage of the length of the gradient ramp.
midpoint
fixed
read/write
he mid-point of the gradient stop, as a percentage of the distance from the gradient stop to the next gradient stop.
object reference
gradient stop
read only
An object reference to the object.
parent
gradient
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
stop color
color
read/write
he color of the gradient stop.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
make
None
gradient stop
Create a new gradient stop.
InDesign CS Scripting Guide AppleScript Reference 167
graphic Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scale of the page item relative to its containing page item
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item
absolute vertical scale
fixed
read/write
he vertical scale of the page item relative to its containing page item
class
type
read only
he class descriptor type
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right)
horizontal scale
fixed
read/write
he horizontal scaling percentage.
id
integer
read only
he graphic’s unique id
image type name
string
read only
he type of image
index
integer
read only
index of the graphic within its parent page item, oval, rectangle, polygon, graphic line, state, group or button
item link
link
read only
link to a placed file
label
string
read/write
A label that can be set to any string
local display setting
high quality, typical, optimized, default
read/write
he display settings for this page item
object reference
graphic
read only
An object reference for this graphic
parent
object
read only
he graphic’s parent. Can return: page item, oval, rectangle, polygon, graphic line, state, group or button.
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
rotation angle
fixed
read/write
Angle of rotation
shear angle
fixed
read/write
he shear angle of the page item relative to the spread
vertical scale
fixed
read/write
he vertical scaling percentage.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width, in the format (top, let, bottom, right)
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
168
AppleScript Reference
InDesign CS Scripting Guide
Method: export
extract label
insert label
move
place
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current location.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point at which to place the file.
[destination layer]
layer or layer name as string
he layer on which to place the file.
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
If true, convert straight quotes to typographer’s quotes.
Return:
Description:
nothing
Export the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
object
Place a file.
InDesign CS Scripting Guide AppleScript Reference 169
Method: resize
rotate
170
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he horizontal scaling percentage.
[vertical scale]
fixed
he vertical scaling percentage.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to rotate around.
[considering current rotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are rotated.
[considering parents rotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
Method: shear
unlink
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to shear around.
[considering current shear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are sheared.
[considering parents shear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
Return:
Description:
nothing
Shear the page item.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide AppleScript Reference 171
graphic line Elements Element:
Refer to by:
EPS
index, name, range, relative, test, id
graphic
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
image
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
path
index, name, range, relative, test
PDF
index, name, range, relative, test, id
PICT
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
text path
index, name, range, relative, test, id
WMF
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
content type
unassigned, graphic type, text type
read/write
he type of content
corner effect
none, rounded corner, inverse rounded corner, inset corner, bevel corner, fancy corner
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
corner radius
fixed
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
172
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
end join
miter end join, round end join, bevel end join
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fill tint
fixed
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gap color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gap tint
fixed
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradient fill angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient fill length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradient stroke angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient stroke length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
InDesign CS Scripting Guide AppleScript Reference 173
Property:
Type:
Access:
Description:
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the graphic line within its parent spread, master spread, page item, oval, rectangle, polygon, graphic line, group, state, document, layer, page, button, text frame, story, text, character, word, line, text column, paragraph, text style range,...
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item layer
layer
read/write
he layer containing the page item.
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
let line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miter limit
fixed
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
nonprinting
boolean
read/write
If true, the page item is non-printing.
object reference
graphic line
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overprint fill
boolean
read/write
If true, the fill of the page item will overprint.
overprint gap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprint stroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overridden master page item
page item
read only
A reference to the master page item linked to the page item (if any).
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
174
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
right line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
stroke alignment
center alignment, inside alignment, outside alignment
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
stroke color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke dash and gap
list of fixed or measurement strings {dash, gap, ...}
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
stroke tint
fixed
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
stroke type
stroke style
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
InDesign CS Scripting Guide AppleScript Reference 175
Property:
Type:
Access:
Description:
stroke weight
fixed
read/write
he weight (in points) of the stroke applied to the page item.
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: add path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Return:
Description:
page item
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
delete
None
nothing
Deletes the object.
duplicate
None
graphic line
Duplicates the object.
page item
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
nothing
Exports the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Fit content within a graphic frame.
nothing
Sets the string associated with the given key (label name).
exclude overlap path
Name:
Type:
Description:
with
list of objects
he objects to exclude.
export
Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
extract label
fit
insert label
176
AppleScript Reference
InDesign CS Scripting Guide
Method: intersect path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to intersect with.
Name:
Type:
Description:
[layer]
layer or layer name as string
he layer on which to create the graphicline as layer.
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater this graphicline or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
make compound path
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
make
minus back
move
override
Return:
Description:
page item
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
graphic line
Create a new graphic line.
page item
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
page item
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
page item
Overrides an item from the master page and places it on the page.
InDesign CS Scripting Guide AppleScript Reference 177
Method: place
place xml
Parameters: Name:
Type:
file name
string
Description: he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Name:
Type:
Description:
using
XML element
he element to place into.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
release compound path
None
objects
release compound path.
remove override
None
nothing
Removes a locally overriden master page item
reset scaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
178
AppleScript Reference
InDesign CS Scripting Guide
Method: resize
rotate
select
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to rotate around, either one of the enums or an x,y value.
[considering current rotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are rotated.
[considering parents rotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
nothing
Select this graphic line.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
InDesign CS Scripting Guide AppleScript Reference 179
Method: shear
store
subtract path
unlink
180
Parameters: Name:
Type:
Description:
by
number
angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to shear around, either one of the enums or an x,y value.
[considering current shear]
boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are sheared.
[considering parents shear]
boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
page item
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
grid preference Properties Property:
Type:
Access:
Description:
baseline color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of the baseline grid.
baseline division
fixed
read/write
he distance between baseline grid lines.
baseline grid shown
boolean
read/write
If true, display the baseline grid.
baseline start
fixed
read/write
he distance from the top of the page to the first increment of the baseline grid.
baseline view threshold
fixed
read/write
Sets the threshold (as a magnification percentage) at which the baseline grid will appear. If this property is set to 75%, the baseline grid will appear at all magnifications greater than or equal to 75% (100%, 200%, etc.), but will not be visible at magnifications less than 75%.
class
type
read only
he class of the object.
document grid shown
boolean
read/write
If true, display the document grid.
document grid snapto
boolean
read/write
If true, object edges snap to the nearest document grid intersection when drawing, moving or resizing objects on a page.
grid color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of the document grid.
grids in back
boolean
read/write
If true, to display grids behind all other objects.
horizontal grid subdivision
integer
read/write
he number of evenly spaced minor horizontal document grid lines between major horizontal document grid lines.
horizontal gridline division
fixed
read/write
A spacing value between major horizontal document grid lines.
object reference
grid preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
vertical grid subdivision
integer
read/write
he number of evenly spaced minor vertical document grid lines between major vertical document grid lines.
vertical gridline division
fixed
read/write
he distance between major vertical document grid lines.
InDesign CS Scripting Guide AppleScript Reference 181
group Elements Element:
Refer to by:
button
index, name, range, relative, test, id
EPS
index, name, range, relative, test, id
form field
index, name, range, relative, test, id
graphic
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
image
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
PDF
index, name, range, relative, test, id
PICT
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
WMF
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
corner effect
none, rounded corner, inverse rounded corner, inset corner, bevel corner, fancy corner
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
corner radius
fixed
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
182
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
end join
miter end join, round end join, bevel end join
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fill tint
fixed
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gap color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gap tint
fixed
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradient fill angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient fill length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradient stroke angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient stroke length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
InDesign CS Scripting Guide AppleScript Reference 183
Property:
Type:
Access:
Description:
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the group within its parent spread, master spread, page item, oval, rectangle, polygon, graphic line, group, state, document, layer, page, button, text frame, story, text, character, word, line, text column, paragraph, text style range, cell, ...
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item layer
layer
read/write
he layer containing the page item.
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
let line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miter limit
fixed
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
nonprinting
boolean
read/write
If true, the page item is non-printing.
object reference
group
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overprint fill
boolean
read/write
If true, the fill of the page item will overprint.
overprint gap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprint stroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overridden master page item
page item
read only
A reference to the master page item linked to the page item (if any).
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
184
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
right line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
stroke alignment
center alignment, inside alignment, outside alignment
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
stroke color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke dash and gap
list of fixed or measurement strings {dash, gap, ...}
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
stroke tint
fixed
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
stroke type
stroke style
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
InDesign CS Scripting Guide AppleScript Reference 185
Property:
Type:
Access:
Description:
stroke weight
fixed
read/write
he weight (in points) of the stroke applied to the page item.
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: add path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Return:
Description:
page item
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
page item
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
nothing
Exports the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Fit content within a graphic frame.
nothing
Sets the string associated with the given key (label name).
exclude overlap path
Name:
Type:
Description:
with
list of objects
he objects to exclude.
export
Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
extract label
fit
insert label
186
AppleScript Reference
InDesign CS Scripting Guide
Method: intersect path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to intersect with.
Name:
Type:
Description:
group items
list of objects
A list of page items to group.
[layer]
layer or layer name as string
he layer on which to create the group as layer.
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater this group or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
make compound path
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
make
minus back
move
override
Return:
Description:
page item
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
group
Create a new group. Group items are added in a “with properties” statement, as in (“myRectangle” and “myOval” are references to existing objects): set myGroup to make group with properties{group items:{myRectangle, myOval}}
page item
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
page item
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
page item
Overrides an item from the master page and places it on the page.
InDesign CS Scripting Guide AppleScript Reference 187
Method: place
place xml
Parameters: Name:
Type:
file name
string
Description: he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Name:
Type:
Description:
using
XML element
he element to place into.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
release compound path
None
objects
release compound path.
remove override
None
nothing
Removes a locally overriden master page item
reset scaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
188
AppleScript Reference
InDesign CS Scripting Guide
Method: resize
rotate
select
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to rotate around, either one of the enums or an x,y value.
[considering current rotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are rotated.
[considering parents rotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
nothing
Select this group.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
InDesign CS Scripting Guide AppleScript Reference 189
Method: shear
store
subtract path
Parameters: Name:
Type:
Description:
by
number
angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to shear around, either one of the enums or an x,y value.
[considering current shear]
boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are sheared.
[considering parents shear]
boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
page item
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
transform group contents
None
nothing
Move a group’s transform to its children
ungroup
None
nothing
Ungroups a grouped page item
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
unlink
190
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
guide Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
fit to page
boolean
read/write
If true, the guide is limited to the page, if false, the guide extends across the spread.
guide color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of the guide.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the guide within its parent spread, master spread, document, layer or page
item layer
layer
read/write
he layer containing the guide.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
location
fixed or measurement string
read/write
he location of the guide, in current page coordinates.
locked
boolean
read/write
If true, the guide is locked.
object reference
guide
read only
An object reference to the object.
orientation
horizontal, vertical
read/write
he orientation of the guide.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
view threshold
fixed
read/write
Sets the threshold (as a magnification percentage) at which the guide will appear. If this property is set to 75%, the guide will appear at all magnifications greater than or equal to 75% (100%, 200%, etc.), but will not be visible at magnifications less than 75%.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
guide
Create a new guide.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[layer]
layer or layer name as string
he layer on which to create the guide as layer.
Description:
InDesign CS Scripting Guide AppleScript Reference 191
Method: override
remove override select
192
Parameters: Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
None Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
page item
Overrides an item from the master page and places it on the page.
nothing
Removes a locally overriden master page item
nothing
Select this guide.
guide preference Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
guides in back
boolean
read/write
If true, display guides behind all other objects.
guides locked
boolean
read/write
If true, guides are locked.
guides shown
boolean
read/write
If true, all types of guides are displayed.
guides snapto
boolean
read/write
If true, object edges snap to the nearest guide when drawing, moving or resizing an object.
object reference
guide preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
ruler guides color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of ruler guides.
ruler guides view threshold
fixed
read/write
Sets the default threshold (as a magnification percentage) at which the guides will appear. If this property is set to 75%, the guides will appear at all magnifications greater than or equal to 75% (100%, 200%, etc.), but will not be visible at magnifications less than 75%. his property can be changed for individual guides.
InDesign CS Scripting Guide AppleScript Reference 193
hyperlink Properties Property:
Type:
Access:
Description:
border color
list of numbers {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he border color of the hyperlink.
border style
solid, dashed
read/write
he border style of the hyperlink.
class
type
read only
he class of the object.
destination
object
read/write
he destination of the hyperlink.
hidden
boolean
read only
If true, the hyperlink will be hidden in the exported version of the document.
highlight
none, invert, outline, inset
read/write
he appearance of the hyperlink’s highlight.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlink within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink.
object reference
hyperlink
read only
An object reference to the object.
parent
document
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
source
object
read/write
he source of this hyperlink.
visible
boolean
read/write
If true, the hyperlink is visible.
width
thin, medium, thick
read/write
he border width of the hyperlink.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
hyperlink
Create a new hyperlink.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
hyperlink source
hyperlink source
he hyperlink source.
[hyperlink destination]
hyperlink destination
he hyperlink destination.
show destination
None
nothing
Go to Hyperlink destination
show source
None
nothing
Go to Hyperlink source
194
AppleScript Reference
InDesign CS Scripting Guide
hyperlink external page destination Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
destination page index
integer
read/write
he index of the page this destination points to.
document path
string
read/write
he path to the document this destination points to.
hidden
boolean
read only
If true, the hyperlink external page destination will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlink external page destination within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the hyperlink external page destination.
object reference
hyperlink external page destination
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
view bounds
list of fixed or measurement strings {top, let, bottom, right}
read/write
he view rectangle (ignored unless view setting is fixed) of the hyperlink external page destination.
view percentage
fixed
read/write
he zoom percentage (ignored unless view setting is fixed).
view setting
fixed, fit view, fit window, fit width, fit height, fit visible, inherit zoom
read/write
he view setting for the target page.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
hyperlink external page destination
Create a new hyperlink external page destination.
nothing
Go to Hyperlink destination
extract label
insert label
make
show destination
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[destination]
hyperlink destination
he destination page as page.
None
InDesign CS Scripting Guide AppleScript Reference 195
hyperlink page destination Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
destination page
page
read/write
he page this destination points to.
hidden
boolean
read only
If true, the hyperlink page destination will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlink page destination within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink page destination.
name manually
boolean
read/write
If true, use a user supplied name for the destination.
object reference
hyperlink page destination
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
view bounds
list of fixed or measurement strings as {top, let, bottom, right}
read/write
he view rectangle (ignored unless view setting is fixed) of the hyperlink page destination.
view percentage
fixed
read/write
he zoom percentage (ignored unless view setting is fixed).
view setting
fixed, fit view, fit window, fit width, fit height, fit visible, inherit zoom
read/write
he view setting for the target page.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
hyperlink page destination
Create a new hyperlink page destination.
nothing
Go to Hyperlink destination
extract label
insert label
make
show destination
196
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[destination]
page
he destination page as page.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
hyperlink page item source Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
hidden
boolean
read only
If true, the hyperlink page item source will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlink page item source within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink page item source.
object reference
hyperlink page item source
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
source page item
page item
read/write
he page item this source resides on
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
hyperlink page item source
Create a new hyperlink page item source.
nothing
Go to Hyperlink source
extract label
insert label
make
show source
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
source
page item
he source page item.
None
InDesign CS Scripting Guide AppleScript Reference 197
hyperlink text destination Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
destination text
insertion point
read/write
he insertion point this destination points to.
hidden
boolean
read only
If true, the hyperlink text destination will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlink text destination within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink text destination.
object reference
hyperlink text destination
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
hyperlink text destination
Create a new hyperlink text destination.
nothing
Go to Hyperlink destination
extract label
insert label
make
show destination
198
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
destination
text
he destination text.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
hyperlink text source Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
hidden
boolean
read only
If true, the hyperlink text source will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlink text source within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink text source.
object reference
hyperlink text source
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
source text
text
read/write
he text in which this hyperlink text source is located.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
hyperlink text source
Create a new hyperlink text source.
nothing
Go to hyperlink source
extract label
insert label
make
show source
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
source
text
he source text.
None
InDesign CS Scripting Guide AppleScript Reference 199
hyperlink URL destination Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
destination URL
string
read/write
he URL this destination points to.
hidden
boolean
read only
If true, the hyperlink url destination will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlink URL destination within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink url destination.
object reference
hyperlink URL destination
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
hyperlink url destination
Create a new hyperlink text destination.
nothing
Go to Hyperlink destination
extract label
insert label
make
show destination
200
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[destination]
string
he destination URL as string.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
hyphenation exception Properties Property:
Type:
Access:
Description:
added exceptions
list of string
read/write
Hyphenation exceptions in the document.
class
type
read only
he class of the object.
index
integer
read only
index of the hyphenation exception within its parent document
name
string
read only
he name of the object.
object reference
hyphenation exception
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
removed exceptions
list of strings
read/write
Excluded words in the document.
Methods Method: add exception
remove exception
Parameters: Name:
Type:
Description:
added exceptions
list of strings
he list of exceptions to add to the document.
[removed list]
boolean
If true, modify the ‘removed exceptions’ list, the ‘added exceptions’ list is modified by default.
Name:
Type:
Description:
removed exceptions
list of strings
he list of exceptions to remove from document.
[removed list]
boolean
If true, modify the ‘removed exceptions’ list, the ‘added exceptions’ list is modified by default.
Return:
Description:
nothing
Add an exception to the document.
nothing
Remove an exception from the document.
InDesign CS Scripting Guide AppleScript Reference 201
image Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
actual ppi
list of fixed {horizontal ppi, vertical ppi}
read only
he resolution of the native graphic file
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
clipping path
clipping path settings
read only
he clipping path settings
effective ppi
list of fixed {horizontal ppi, vertical ppi}
read only
he resolution of the graphic ater it has been resized
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fill tint
fixed
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
image IO preferences
image IO preference
read only
image IO preferences
image rendering intent
use color settings, perceptual, saturation, relative colorimetric, absolute colorimetric
read/write
he rendering intent applied to the image
image type name
string
read only
he type of image
202
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
index
integer
read only
index of the image within its parent XML element, sound, movie, page item, oval, rectangle, polygon, graphic line, state, group or button
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item link
link
read only
link to a placed file
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
nonprinting
boolean
read/write
Whether the page item is non-printing
object reference
image
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overprint fill
boolean
read/write
If true, the fill of the page item will overprint.
parent
object
read only
he parent of the page item.
profile
string
read/write
he color profile to use. Either one the idProfile enumerations or a profile name
profile list
list of string
read only
he list of available RGB profiles
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
InDesign CS Scripting Guide AppleScript Reference 203
Property:
Type:
Access:
Description:
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
space
string
read only
he color space
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
nothing
Exports the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Markup layout content with XML preserving the existing content.
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
export
extract label
insert label
markup
move
204
Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
AppleScript Reference
InDesign CS Scripting Guide
Method: place
place xml
resize
Parameters: Name:
Type:
file name
string
Description: he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Name:
Type:
Description:
using
XML element
he element to place into.
Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
InDesign CS Scripting Guide AppleScript Reference 205
Method: rotate
shear
store
206
Parameters: Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to rotate around, either one of the enums or an x,y value.
[considering current rotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are rotated.
[considering parents rotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
by
number
angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to shear around, either one of the enums or an x,y value.
[considering current shear]
boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are sheared.
[considering parents shear]
boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Rotate the page item.
nothing
Shear the page item.
asset
Store a page item in a library.
Method: unlink
Parameters: Name:
Type:
Description:
from
page or master spread
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide AppleScript Reference 207
image IO preference Properties Property:
Type:
Access:
Description:
allow auto embedding
boolean
read/write
If true, allow automatic embedding.
alpha channel name
string
read/write
Alpha channel name.
class
type
read only
he class of the object.
create clipping frame
boolean
read/write
If true, create a frame from the image clipping path as you import the image.
object reference
image IO preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
preview resolution
integer
read only
he resolution of the image preview, in pixels per inch.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
208
AppleScript Reference
InDesign CS Scripting Guide
IME preference Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
inline input
boolean
read/write
If true, use the inline text input methods; if false, use the bottom window text input method.
object reference
IME preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
InDesign CS Scripting Guide AppleScript Reference 209
index Elements Element:
Refer to by:
topic
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the index within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the XML tag
object reference
index
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method: capitalize
extract label
generate
import topics
insert label
210
Parameters: Name:
Type:
Description:
[capitalization option]
selected entry, include subentries, all level1 entries, all entries
What to capitalize.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
[on]
spread or page
he spread or page on which to place the index story.
[place point]
list of fixed or measurement strings {x, y}
he location at which to place the index story.
[destination layer]
layer
he layer on which to place the index story.
[autoflowing]
boolean
If true, autoflow the placed index story.
[include overset]
boolean
If true, include index in overset.
Name:
Type:
Description:
from
string
he file to import topics from.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Applies capitalization options to the index entries.
string
Gets the label value associated with the given key (label name).
object
Generate a new index story.
nothing
Imports a list of topics.
nothing
Sets the string associated with the given key (label name).
Method:
Parameters:
Return:
Description:
remove unused topics
None
nothing
Removes all unused index entries
update
None
nothing
Update the page numbers in the index
InDesign CS Scripting Guide AppleScript Reference 211
index options Properties Property:
Type:
Access:
Description:
before cross reference separator
string
read/write
he string following each index topic.
between entries separator
string
read/write
he string between each index entry.
between page numbers separator
string
read/write
he string between page numbers or page ranges.
class
type
read only
he class of the object.
cross reference style
character style
read/write
he style to apply to cross references.
cross reference topic style
character style
read/write
he style to apply to cross reference topics.
entry end separator
string
read/write
he string to insert at the end of each index entry.
following topic separator
string
read/write
he string following each index topic.
include book documents
boolean
read/write
If true, include all documents of a book publication.
include empty index sections
boolean
read/write
If true, and if include index section headings is true, include headings for empty index sections.
include hidden entries
boolean
read/write
If true, include text on hidden layers.
include section headings
boolean
read/write
If true, include index section headings (“A,” “B,” etc.).
index format
runin format, nested format
read/write
he index format to use in the generated index.
level 1 style
paragraph style
read/write
he paragraph style to apply to level 1 topics of each page reference.
level 2 style
paragraph style
read/write
he paragraph style to apply to level 2 topics of each page reference.
level 3 style
paragraph style
read/write
he paragraph style to apply to level 3 topics of each page reference.
level 4 style
paragraph style
read/write
he paragraph style to apply to level 4 topics of each page reference.
object reference
index options
read only
An object reference to the object.
page number style
character style
read/write
he character style to apply to page numbers.
page range separator
string
read/write
he string entered between page numbers to indicate a page range.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
replace existing index
boolean
read/write
If true, replace the existing index instance.
section heading style
paragraph style
read/write
he paragraph style to apply to index section headings.
title
string
read/write
he title of the generated index.
title style
paragraph style
read/write
he paragraph style to apply to the index title.
212
AppleScript Reference
InDesign CS Scripting Guide
ink Properties Property:
Type:
Access:
Description:
alias ink name
string
read/write
he name of the alias ink.
angle
fixed
read/write
he screen angle at which to print the ink.
class
type
read only
he class of the object.
convert to process
boolean
read/write
If true, convert a spot ink to a process color simulation.
frequency
fixed
read/write
he haltone screen frequency at which to print the ink.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the ink within its parent application or document
ink type
normal, opaque, transparent, opaque ignore
read/write
he type of the ink.
is process ink
boolean
read only
If true, the ink is a process ink.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the ink.
neutral density
fixed
read/write
he neutral density of the ink. his value represents the relative darkness and/or opacity of the ink, and is used by the trapping system. ink neutral densities range from XXX (lightest/least opaque) to XXX (darkest/most opaque).
object reference
ink
read only
An object reference to the object.
parent
object
read only
he parent of the object.
print ink
boolean
read/write
If true, print the ink.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
solidity
fixed
read only
he solidity value of the ink.
trap order
integer
read/write
he trapping order of the ink.
Methods Method: extract label
insert label
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
InDesign CS Scripting Guide AppleScript Reference 213
insertion point Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
nested style
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
tab stop
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
214
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ascent
fixed
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associated XML elements
list of XML elements
read only
he XML elements associated with this text object (if any).
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
fixed
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
fixed
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
InDesign CS Scripting Guide AppleScript Reference 215
Property:
Type:
Access:
Description:
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradient stroke angle
fixed
read/write
he angle of the gradient applied to the stroke of the text.
gradient stroke length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal offset
fixed
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
216
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
index
integer
read only
index of the object within its parent object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
InDesign CS Scripting Guide AppleScript Reference 217
Property:
Type:
Access:
Description:
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
insertion point
read only
An object reference to the object.
open type features
list of long
read/write
open type features
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
parent story
story
read only
he story containing the text object.
parent text frame
text frame
read only
he text frame containing the text object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
218
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
InDesign CS Scripting Guide AppleScript Reference 219
Property:
Type:
Access:
Description:
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this insertion point. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
220
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method: apply style
changecase
convert to table
create outlines
delete
Parameters: Name:
Type:
Description:
using
character style, paragraph style, or string
he paragraph style or character style to apply.
[clearing overrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
uppercase, lowercase, titlecase, sentencecase
Case option to use.
Name:
Type:
Description:
[column separator]
string
he character to interpret as the column separator.
[row separator]
string
he character to interpret as the row separator.
[number of columns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original text.
None
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Deletes the object.
InDesign CS Scripting Guide AppleScript Reference 221
Method: export
markup
move
place
222
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he full path to the exported file.
[showing options]
boolean
If true, display the Export dialog box.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
using
XML element
he XML element to associate with the text.
Name:
Type:
Description:
to
before, ater, at beginning, at end
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he location (in page coordinates) at which to place the incoming file.
[destination layer]
layer or layer name as string
he layer on which to place the incoming file.
[showing options]
boolean
If true, display the import options dialog box for the file type being placed.
[autoflowing]
boolean
If true, autoflow the incoming text.
[retaining formatting]
boolean
If true, retain the formatting of the incoming text. If false, place the text using the document’s default text formatting attributes.
[converting quotes]
boolean
If true, convert typewriter (“straight”) quotation marks to typographic (“curly”) quotation marks.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
object
Place a file.
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects text.
InDesign CS Scripting Guide AppleScript Reference 223
integer combobox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit value
fixed
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the integer combobox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
integer combobox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
string list
list of strings
read/write
A list of the strings that appear on the menu of the control.
Methods Method:
Parameters:
Return:
Description:
make
None
integer combobox
Create a new integer combobox.
224
AppleScript Reference
InDesign CS Scripting Guide
integer editbox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit value
fixed
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the integer editbox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
integer editbox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
Methods Method:
Parameters:
Return:
Description:
make
None
integer editbox
Create a new integer editbox.
InDesign CS Scripting Guide AppleScript Reference 225
JPEG export preference Properties Property:
Type:
Access:
class
type
read only
he class of the object.
Exporting Selection
boolean
read/write
If true, export the selection.
Exporting Spread
boolean
read/write
If true, export the spread.
JPEG Quality
low, medium, high, maximum
read/write
Specifies the compression quality of output JPEG file.
JPEG Rendering style
baseline encoding, progressive encoding
read/write
Specifies the rendering style of output JPEG file.
object reference
JPEG export preference
read only
An object reference to the object.
Page String
string
read/write
he pages to export (if you are not exporting the selected object or object).
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
226
AppleScript Reference
InDesign CS Scripting Guide
Description:
language Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
double quotes
string
read/write
number quotes pair for the language.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the language within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the language.
object reference
language
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
single quotes
string
read/write
Single quotes pair for the language.
Methods Method: extract label
insert label
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
InDesign CS Scripting Guide AppleScript Reference 227
language with vendors Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
double quotes
string
read/write
number quotes pair for the language with vendors.
hyphenation vendor
string
read/write
Hyphenation vendor of the language.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the language with vendors within its parent application
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the language with vendors.
object reference
language with vendors
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
single quotes
string
read/write
Single quotes pair for the language with vendors.
spelling vendor
string
read/write
Spelling vendor of the language.
thesaurus vendor
string
read/write
hesaurus vendor of the language.
Methods Method: extract label
insert label
228
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
layer Elements Element:
Refer to by:
button
index, name, range, relative, test, id
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
guide
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items in the layer, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
ignore wrap
boolean
read/write
If true, the text wrap on any items on this layer will be ignored when the layer is hidden.
index
integer
read only
index of the layer within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
layer color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he layer highlight color.
lock guides
boolean
read/write
If true, lock the guides on the layer.
locked
boolean
read/write
If true, the layer is locked.
name
string
read/write
he name of the layer.
object reference
layer
read only
An object reference to the object.
parent
document
read only
he parent of the layer.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
show guides
boolean
read/write
If true, display the guides on this layer.
visible
boolean
read/write
If true, the layer is visible.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
layer
Duplicates the object.
InDesign CS Scripting Guide AppleScript Reference 229
Method: extract label
insert label
make merge
move
230
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None Name:
Type:
Description:
with
list of objects
hey layer(s) with which to merge.
Name:
Type:
Description:
to
before, ater, at beginning, at end
location.
[reference]
layer
Before/ater this layer.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
layer
Create a new layer.
layer
Merge with another layer.
layer
Move the layer before/ater another layer, or to beginning/end.
layout adjustment preference Properties Property:
Type:
Access:
Description:
allow graphics to resize
boolean
read/write
If true, allow graphics to resize in response to layout changes.
allow ruler guides to move
boolean
read/write
If true, allow ruler guides to move to adjust to layout changes.
class
type
read only
he class of the object.
enable layout adjustment
boolean
read/write
If true, enable layout adjustment. When layout adjustment is active, objects and guides can change position when page margins change, or when page size or page orientation changes.
ignore object or layer locks
boolean
read/write
If true, ignore object or layer locks when adjusting the layout.
ignore ruler guide alignments
boolean
read/write
If true, ignore ruler guide alignments when adjusting layout.
object reference
layout adjustment preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
snap zone
fixed
read/write
he range (distance, in current measurement units) within which an object snaps to a guide or margin during layout adjustment.
InDesign CS Scripting Guide AppleScript Reference 231
layout window Properties Property:
Type:
Access:
Description:
active layer
layer
read/write
he active layer
active page
page
read/write
he active page
active spread
spread
read/write
he active spread
bounds
list of numbers or measurement strings {top, let, bottom, right}
read/write
he bounds of the layout window, in the format (top, let, bottom, right)
class
type
read only
he class descriptor type
index
integer
read only
index of the layout window within its parent document or application
name
string
read only
he name of the layout window
object reference
layout window
read only
An object reference for this layout window
overprint preview
boolean
read/write
Whether to display a simulation of overprinting
parent
object
read only
he layout window’s parent. Can return: document or application.
proofing profile
string
read/write
he profile used for proofing
proofing type
proof off, document CMYK, working CMYK, custom
read/write
he method of proofing
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
selection
list
read/write
he selection of the front-most window. Can return: object, list of objects or nothing.
simulate ink black
boolean
read/write
Determine whether to adjust for the black point
simulate paper white
boolean
read/write
Determine whether to adjust for white point
transform reference point
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
read/write
he default anchor point to transform objects around. Can return: top let anchor/top center anchor/top right anchor/ let center anchor/center anchor/right center anchor/bottom let anchor/bottom center anchor/bottom right anchor or list of 2 numbers o...
view display setting
high quality, typical, optimized
read/write
he local Display Performance settings for this view
zoom percentage
fixed
read/write
he current zoom
Methods Method:
Parameters:
Return:
Description:
bring to front
None
nothing
Brings the object to the top
close
None
nothing
Close the LayoutWindow
maximize
None
nothing
Maximize the window
minimize
None
nothing
Minimize the window
restore
None
nothing
Restore the window
nothing
Select one or more objects.
select
232
Name:
Type:
Description:
selectable items
object or list of objects, or nothing to deselect all
he object or objects to select.
[existing selection]
replace, add to, remove from
How to handle the existing selection.
AppleScript Reference
InDesign CS Scripting Guide
Method: zoom
Parameters: Name:
Type:
Description:
given
zoom in, zoom out, fit spread, fit page, show pasteboard, actual size
Zoom size.
Return:
Description:
nothing
Zoom the window.
InDesign CS Scripting Guide AppleScript Reference 233
library Elements Element:
Refer to by:
asset
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
file path
file reference or file name as string
read only
he file path to the folder containing the library file (does not include the file name).
full name
file reference or file name as string
read only
he file path to the library file, including the file name.
index
integer
read only
index of the library within its parent application
name
string
read only
he name of the library file.
object reference
library
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
close
None
nothing
Close the library
library
Create a new libary.
asset
Store page item(s) in a library.
make
store
234
Name:
Type:
Description:
full name
string
he path and file name.
Name:
Type:
Description:
using
object or list of objects
he page item(s) to store.
AppleScript Reference
InDesign CS Scripting Guide
Description:
line Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
nested style
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
tab stop
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
InDesign CS Scripting Guide AppleScript Reference 235
Property:
Type:
Access:
Description:
ascent
fixed
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associated XML elements
list of XML elements
read only
he XML elements associated with this text object (if any).
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
fixed
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
fixed
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
236
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradient stroke angle
fixed
read/write
he angle of the gradient applied to the stroke of the text.
gradient stroke length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal offset
fixed
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
InDesign CS Scripting Guide AppleScript Reference 237
Property:
Type:
Access:
Description:
index
integer
read only
index of the object within its parent object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
238
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
line
read only
An object reference to the object.
open type features
list of long
read/write
open type features
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
parent story
story
read only
he story containing the text object.
parent text frame
text frame
read only
he text frame containing the text object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
fixed or measurement string
read/write
he gap color of the paragraph rule above.
InDesign CS Scripting Guide AppleScript Reference 239
Property:
Type:
Access:
Description:
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
240
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this line. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
InDesign CS Scripting Guide AppleScript Reference 241
Property:
Type:
Access:
Description:
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method: apply style
changecase
convert to table
create outlines
delete
242
Parameters: Name:
Type:
Description:
using
character style, paragraph style, or string
he paragraph style or character style to apply.
[clearing overrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
uppercase, lowercase, titlecase, sentencecase
Case option to use.
Name:
Type:
Description:
[column separator]
string
he character to interpret as the column separator.
[row separator]
string
he character to interpret as the row separator.
[number of columns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original text.
None
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Deletes the object.
Method: export
markup
move
place
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he full path to the exported file.
[showing options]
boolean
If true, display the Export dialog box.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
using
XML element
he XML element to associate with the text.
Name:
Type:
Description:
to
before, ater, at beginning, at end
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he location (in page coordinates) at which to place the incoming file.
[destination layer]
layer or layer name as string
he layer on which to place the incoming file.
[showing options]
boolean
If true, display the import options dialog box for the file type being placed.
[autoflowing]
boolean
If true, autoflow the incoming text.
[retaining formatting]
boolean
If true, retain the formatting of the incoming text. If false, place the text using the document’s default text formatting attributes.
[converting quotes]
boolean
If true, convert typewriter (“straight”) quotation marks to typographic (“curly”) quotation marks.
Return:
Description:
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
object
Place a file.
InDesign CS Scripting Guide AppleScript Reference 243
Method: search
select
244
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects text.
link Properties Property:
Type:
Access:
Description:
asset etag
string
read only
he asset etag of the link.
asset ID
list of strings or fixed
read only
he asset ID of the link.
asset URL
string
read only
he asset URL of the link.
class
type
read only
he class of the object.
date
date
read only
he date and time the link was created.
edited
boolean
read only
If true, the link file has been modified since it was last updated.
file path
file reference or file name as string
read only
he file path to the folder containing the link file (does not include the file name).
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the link within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
link type
string
read only
he type of the link.
name
string
read only
he name of the link file.
needed
boolean
read only
If true, the link is needed for printing or export.
object reference
link
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
size
integer
read only
he size of the link file on disk.
status
normal, link out of date, link missing, link embedded
read only
he status of the link.
Methods Method:
Parameters:
Return:
edit original
None
nothing
Edit original
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Set the link.
nothing
Show link
nothing
Unembed data and link to new file or link to original.
extract label
insert label
relink
show unembed
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
to
string
to.
None Name:
Type:
Description:
[to]
string
Folder where new files are created.
Description:
unlink
None
nothing
Unlink text or embed images
update
None
link
Update Link.
InDesign CS Scripting Guide AppleScript Reference 245
margin preference Properties Property:
Type:
Access:
Description:
bottom
fixed or measurement string
read/write
he height of the bottom margin.
class
type
read only
he class of the object.
column count
integer
read/write
he number of column guides on the page. Note that these column guides have no effect on the number of columns in a single text frame.
column gutter
fixed or measurement string
read/write
he distance between columns on the page.
let
fixed or measurement string
read/write
he width of the let margin.
object reference
margin preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right
fixed or measurement string
read/write
he width of the right margin.
top
fixed or measurement string
read/write
he height of the top margin.
246
AppleScript Reference
InDesign CS Scripting Guide
master spread Elements Element:
Refer to by:
button
index, name, range, relative, test, id
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
guide
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items on the master spread, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
applied master
master spread
read/write
he master spread applied to this master spread (if any).
base name
string
read/write
he base name of the master spread.
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the master spread within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the master spread.
name prefix
string
read/write
he name prefix of the master spread.
object reference
master spread
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
show master items
boolean
read/write
If true, show page items from the master spread applied to this master spread (if any).
InDesign CS Scripting Guide AppleScript Reference 247
Methods Method: create guides
Parameters: Name:
Type:
Description:
[number of rows]
integer
Number of rows of guides on a page.
[number of columns]
integer
Number of columns of guides on a page.
[row gutter]
fixed or measurement string
he amount of gutter between rows.
[column gutter]
fixed or measurement string
he amount of gutter between columns.
[guide color]
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
he guideÕs color.
[fit margins]
boolean
Whether the guides should fit to margins or fit to page.
[remove existing]
boolean
If true, remove existing guides.
[layer]
layer
he layer on which to create the master spread as layer.
Return:
Description:
nothing
Create multiple guides on all pages of a spread.
delete
None
nothing
Deletes the object.
duplicate
None
master spread
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
master spread
Create a new master spread.
extract label
insert label
make
248
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[pages per spread]
integer
Number of pages of the master spread as integer.
AppleScript Reference
InDesign CS Scripting Guide
Method: place
Parameters: Name:
Type:
file name
string
Description: he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Return:
Description:
object
Place a file.
InDesign CS Scripting Guide AppleScript Reference 249
measurement combobox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit units
points, picas, inches, inches decimal, millimeters, centimeters, ciceros
read/write
he measurement unit to use for the editbox or combobox
edit value
fixed
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the measurement combobox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
measurement combobox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
string list
list of strings
read/write
A list of the strings that appear on the menu of the control.
Methods Method:
Parameters:
Return:
Description:
make
None
measurement combobox
Create a new measurement combobox.
250
AppleScript Reference
InDesign CS Scripting Guide
measurement editbox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit units
points, picas, inches, inches decimal, millimeters, centimeters, ciceros
read/write
he measurement unit to use for the editbox or combobox
edit value
fixed
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the measurement editbox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
measurement editbox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
Methods Method:
Parameters:
Return:
Description:
make
None
measurement editbox
Create a new measurement editbox.
InDesign CS Scripting Guide AppleScript Reference 251
metadata preference Properties Property:
Type:
Access:
Description:
author
string
read/write
document author
class
type
read only
he class of the object.
copyright info URL
string
read/write
Copyright statement URL
copyright notice
string
read/write
Copyright text.
copyright status
unknown, yes, no
read/write
Copyright status of the document
creation date
date
read only
document creation date.
creator
string
read only
he application that created the document
description
string
read/write
A description of the document.
document title
string
read/write
he document title
format
string
read only
he document format
job name
string
read/write
Customer-assigned job name.
keywords
list of strings
read/write
he keywords associated with the document.
modification date
date
read only
he most recent document modification date.
object reference
metadata preference
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
server URL
string
read only
Location of the document on asset management server.
Methods Method: append
count container
create container item
252
Parameters: Name:
Type:
Description:
from
string
File from which to append.
[affect all]
boolean
If true, treat all properties as external (defaults to false).
Name:
Type:
Description:
namespace
string
he namespace.
path
string
he path.
Name:
Type:
Description:
namespace
string
he namespace.
path
string
he path.
[index]
integer
he index of the item (starts from 1, default is 0 meaning append to the end).
[container]
bag, seq, alt
he container type (only required if the new item is the first one in the container).
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Append information from external file.
integer
Count the number of items in the container.
nothing
Create an empty container item.
Method: get property
replace
save
set property
Parameters: Name:
Type:
Description:
namespace
string
he namespace.
path
string
he path.
Name:
Type:
Description:
from
string
File from which to replace.
[affect all]
boolean
If true, treat all properties as external (defaults to false).
Name:
Type:
Description:
to
string
Where to save.
Name:
Type:
Description:
namespace
string
he namespace.
path
string
he path.
value
string
he value of the property, pass an empty string to remove the property.
Return:
Description:
string
Get the XMP property value associated with the given path.
nothing
Read information from external file and replace current metadata.
nothing
Save information to file.
nothing
Set the XMP property associated with the given path.
InDesign CS Scripting Guide AppleScript Reference 253
mixed ink Properties Property:
Type:
Access:
Description:
base color
mixed ink group
read only
he mixed ink group that a mixed ink swatch is based on.
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the mixed ink within its parent application or document
ink list
list of ink
read only
he inks used in the mixed ink.
ink percentages
list of fixed
read/write
he list of tint percentages for the mixed ink.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
model
spot, process, registration, mixedinkmodel
read/write
he color model of the mixed ink.
name
string
read/write
he name of the mixed ink.
object reference
mixed ink
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
space
RGB, CMYK, LAB, mixed ink
read/write
he color space of the mixed ink.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
mixed ink
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
mixed ink
Create a new mixed ink.
nothing
Merge one or more other swatches into this one.
extract label
insert label
make
merge
254
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
ink list
list of inks
he list of ink items or the mixed ink base swatch.
ink percentages
list of fixed
he list of ink contributions for the ink items specified.
Name:
Type:
Description:
with
mixed ink
he swatches to merge.
AppleScript Reference
InDesign CS Scripting Guide
mixed ink group Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the mixed ink group within its parent application or document
ink list
list of inks
read only
he inks used in the mixed ink group.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
model
spot, process, registration, mixedinkmodel
read/write
he color model of the mixed ink group.
name
string
read/write
he name of the mixed ink group.
object reference
mixed ink group
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
mixed ink group
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
mixed ink group
Create a new mixed ink group.
nothing
Merge one or more other swatches into this one.
extract label
insert label
make
merge
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
ink list
list of inks
A list of ink items.
[ink percentages]
list of fixed
A list of initial percentages for each ink in the ink list.
[repeat values]
list of integers
A list specifying the repeat amount for each ink in the ink list.
[increment values]
list of fixed
A list specifying the increment percentages for each ink in the ink list.
Name:
Type:
Description:
with
mixed ink group
he swatches to merge.
Description:
InDesign CS Scripting Guide AppleScript Reference 255
movie Elements Element:
Refer to by:
image
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
class
type
read only
he class of the object.
description
string
read/write
Description
embed in PDF
boolean
read/write
Embed content in pdf
file path
file reference or file name as string
read/write
he file path
floating window
boolean
read/write
Floating window
floating window position
upper let, upper middle, upper right, center let, center, center right, lower let, lower middle, lower right
read/write
Floating window position
floating window size
one fith, one fourth, one half, full, double, triple, quadruple, max
read/write
Floating window size
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the movie within its parent page item, oval, rectangle or polygon
item layer
layer
read/write
he layer containing the page item.
item link
link
read only
link to a placed file
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
locked
boolean
read/write
If true, the page item is locked.
movie poster type
none, standard, from movie, proxy image
read/write
he current poster type (‘proxy image’ is read-only)
name
string
read/write
he name of the movie
object reference
movie
read only
An object reference to the object.
parent
object
read only
he parent of the page item.
play mode
once, stay open, repeat play
read/write
Play mode
play on page turn
boolean
read/write
Play on page turn
poster file
string
read/write
Poster file
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
show controls
boolean
read/write
Show controls
URL
string
read/write
he URL
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
256
AppleScript Reference
InDesign CS Scripting Guide
Methods Method:
Parameters:
Return:
Description:
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
delete
None
nothing
Deletes the object.
duplicate
None
movie
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Fit content within a graphic frame.
nothing
Sets the string associated with the given key (label name).
movie
Create a new movie.
nothing
Markup layout content with XML preserving the existing content.
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
nothing
Reset an item to 100% scaling, resizes to retain same appearance
extract label
fit
insert label
make
markup
move
reset scaling
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[layer]
layer or layer name as string
he layer on which to create the movie as layer.
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater this movie or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
Name:
Type:
Description:
using
xml element
he element to mark up.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
None
InDesign CS Scripting Guide AppleScript Reference 257
Method: resize
select
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Select this movie.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
boolean
Verify movie URL.
store
unlink
verify urll
258
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
None
AppleScript Reference
InDesign CS Scripting Guide
movie behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the movie behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
movie item
movie
read/write
he movie page item.
name
string
read only
he name of the behavior.
object reference
movie behavior
read only
An object reference to the object.
operation
play, stop, pause, resume
read/write
he movie operation to perform.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
movie behavior
Create a new movie behavior.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
InDesign CS Scripting Guide AppleScript Reference 259
nested style Properties Property:
Type:
Access:
Description:
applied character style
character style
read/write
he applied character style. Can also accept: string.
class
type
read only
delimiter
string or sentence, any word, any character, letters, digits, tabs, inline graphic, read/write dropcap, forced line break, end nested style, indent here tab, Em space, En space, nonbreaking space, auto page number, section marker
he delimiting expression. Can return: string or sentence/any word/any character/letters/digits/tabs/inline graphic/dropcap/forced line break/end nested style/indent here tab/Em space/En space/nonbreaking space/auto page number/section marker.
inclusive
boolean
read/write
Include the last delimiter
index
integer
read only
index of the nested style within its parent text default, paragraph, paragraph style, text, character, word, line, text column, text style range, insertion point or story
object reference
nested style
read only
An object reference for this nested style
parent
object
read only
he nested style’s parent. Can return: text default, paragraph, paragraph style, text, character, word, line, text column, text style range, insertion point or story.
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
repetition
integer
read/write
How many delimiters
he class descriptor type
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
make
None
nested style
Create a new nested style.
260
AppleScript Reference
InDesign CS Scripting Guide
open file behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
file path
file reference or file name as string
read/write
he file path to the file being opened.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the open file behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
object reference
open file behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
open file behavior
Create a new open file behavior.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 261
oval Elements Element:
Refer to by:
EPS
index, name, range, relative, test, id
graphic
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
image
index, name, range, relative, test, id
movie
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
path
index, name, range, relative, test
PDF
index, name, range, relative, test, id
PICT
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
sound
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
text path
index, name, range, relative, test, id
WMF
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
content type
unassigned, graphic type, text type
read/write
he type of content
corner effect
none, rounded corner, inverse rounded corner, inset corner, bevel corner, fancy corner
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
262
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
corner radius
fixed
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
end join
miter end join, round end join, bevel end join
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fill tint
fixed
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gap color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gap tint
fixed
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradient fill angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient fill length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradient stroke angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient stroke length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
InDesign CS Scripting Guide AppleScript Reference 263
Property:
Type:
Access:
Description:
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the oval within its parent spread, master spread, page item, oval, rectangle, polygon, graphic line, group, state, document, layer, page, button, text frame, story, text, character, word, line, text column, paragraph, text style range, cell, t...
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item layer
layer
read/write
he layer containing the page item.
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
let line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miter limit
fixed
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
nonprinting
boolean
read/write
If true, the page item is non-printing.
object reference
oval
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overprint fill
boolean
read/write
If true, the fill of the page item will overprint.
overprint gap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprint stroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
264
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
overridden master page item
page item
read only
A reference to the master page item linked to the page item (if any).
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
stroke alignment
center alignment, inside alignment, outside alignment
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
stroke color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke dash and gap
list of fixed or measurement strings {dash, gap, ...}
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
InDesign CS Scripting Guide AppleScript Reference 265
Property:
Type:
Access:
Description:
stroke tint
fixed
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
stroke type
stroke style
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
stroke weight
fixed
read/write
he weight (in points) of the stroke applied to the page item.
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: add path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Return:
Description:
page item
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
delete
None
nothing
Deletes the object.
duplicate
None
oval
Duplicates the object.
page item
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
nothing
Exports the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Fit content within a graphic frame.
exclude overlap path
Name:
Type:
Description:
with
list of objects
he objects to exclude.
export
Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
extract label
fit
266
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
AppleScript Reference
InDesign CS Scripting Guide
Method: insert label
Parameters: Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
list of objects
he objects to intersect with.
Name:
Type:
Description:
[layer]
layer or layer name as string
he layer on which to create the oval as layer.
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater this oval or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
make compound path
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
intersect path
make
minus back
move
override
Return:
Description:
nothing
Sets the string associated with the given key (label name).
page item
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
oval
Create a new oval.
page item
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
page item
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
page item
Overrides an item from the master page and places it on the page.
InDesign CS Scripting Guide AppleScript Reference 267
Method: place
place xml
Parameters: Name:
Type:
file name
string
Description: he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Name:
Type:
Description:
using
XML element
he element to place into.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
release compound path
None
objects
release compound path.
remove override
None
nothing
Removes a locally overriden master page item
reset scaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
268
AppleScript Reference
InDesign CS Scripting Guide
Method: resize
rotate
select
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to rotate around, either one of the enums or an x,y value.
[considering current rotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are rotated.
[considering parents rotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
nothing
Select this oval.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
InDesign CS Scripting Guide AppleScript Reference 269
Method: shear
store
subtract path
unlink
270
Parameters: Name:
Type:
Description:
by
number
angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to shear around, either one of the enums or an x,y value.
[considering current shear]
boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are sheared.
[considering parents shear]
boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
page item
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
package for GoLive preference Properties Property:
Type:
Access:
class
type
read only
Description: he class descriptor type
copy formatted images
boolean
read/write
Whether to copy formatted images to images sub folder
copy optimized images
boolean
read/write
Whether to copy optimized images to images sub folder
copy original images
boolean
read/write
Whether to copy original images to images sub folder
exclude dtd
boolean
read/write
Whether to exclude the dtdd from the exported XML
export from selected
boolean
read/write
Whether to export from a selected element (otherwise export the entire document)
file encoding
UTF8, UTF16, shit JIS
read/write
File encoding to be used when exporting
GIF options interlaced
boolean
read/write
Generate interlaced GIFs
GIF options palette
adaptive palette, macintosh palette, web palette, windows palette
read/write
color palette to use for GIF conversion
image conversion
automatic, JPEG, GIF
read/write
Type of image to generate for optimized and formatted images
JPEG options format
baseline encoding, progressive encoding
read/write
Format of converted JPEG image
JPEG options quality
low, medium, high, maximum
read/write
Quality of converted JPEG image
object reference
package for GoLive preference
read only
An object reference for this package for GoLive preference
parent
object
read only
he package for GoLive preference’s parent. Can return: application or document.
preferred browser
file reference or file name as string
read/write
he preferred browser for viewing XML
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
ruby
boolean
read/write
Whether to include Ruby in the exported XML
view ater export
boolean
read/write
Whether to view exported XML in a default viewer
InDesign CS Scripting Guide AppleScript Reference 271
page Elements Element:
Refer to by:
button
index, name, range, relative, test, id
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
guide
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items on the page, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
applied master
master spread
read/write
he master spread applied to the page.
applied section
section
read only
he section associated with this page.
applied trap preset
trap preset
read/write
he trap preset associated with this page. Can also accept: string.
bounds
list of fixed or measurement strings {top, let, bottom, right}
read only
he bounds of the page.
class
type
read only
he class of the object.
document offset
integer
read only
Offset of the page in the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the object within its parent spread.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
margin preferences
margin preference
read only
he margin preferences for the page.
master page items
list of page items
read only
All items on the applied master spread(s) that have not been overridden.
name
string
read only
he name of the page.
object reference
page
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
tab order
list of form fields
read/write
he order of tabbing among the form fields on the page.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
page
Duplicates the object.
272
AppleScript Reference
InDesign CS Scripting Guide
Method: extract label
insert label
make
move
place
remove override
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater an existing page or at the beginning/end of a parent as page, spread, master spread or document.
Name:
Type:
Description:
[to]
before, ater, at beginning, at end
Location.
[reference]
object
A page or spread. Before/ater the page or at the beginning/end of the spread.
[binding]
before, ater, at end, at beginning, unknown, right align, let align, default
Binding options.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
page
Create a new page.
page
Move page.
object
Place a file.
nothing
Removes a locally overriden master page item
InDesign CS Scripting Guide AppleScript Reference 273
page item Elements Element:
Refer to by:
EPS
index, name, range, relative, test, id
graphic
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
image
index, name, range, relative, test, id
movie
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
path
index, name, range, relative, test
PDF
index, name, range, relative, test, id
PICT
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
sound
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
text path
index, name, range, relative, test, id
WMF
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
corner effect
none, rounded corner, inverse rounded corner, inset corner, bevel corner, fancy corner
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
274
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
corner radius
fixed
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
end join
miter end join, round end join, bevel end join
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fill tint
fixed
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gap color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gap tint
fixed
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradient fill angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient fill length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradient stroke angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient stroke length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
InDesign CS Scripting Guide AppleScript Reference 275
Property:
Type:
Access:
Description:
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the page item within its parent XML element, spread, master spread, page item, oval, rectangle, polygon, graphic line, group, state, text frame, story, text, character, word, line, text column, paragraph, text style range, cell, table, documen...
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item layer
layer
read/write
he layer containing the page item.
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
let line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miter limit
fixed
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
nonprinting
boolean
read/write
If true, the page item is non-printing.
object reference
page item
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overprint fill
boolean
read/write
If true, the fill of the page item will overprint.
overprint gap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprint stroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
276
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
overridden master page item
page item
read only
A reference to the master page item linked to the page item (if any).
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
stroke alignment
center alignment, inside alignment, outside alignment
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
stroke color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke dash and gap
list of fixed or measurement strings {dash, gap, ...}
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
InDesign CS Scripting Guide AppleScript Reference 277
Property:
Type:
Access:
Description:
stroke tint
fixed
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
stroke type
stroke style
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
stroke weight
fixed
read/write
he weight (in points) of the stroke applied to the page item.
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: add path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Return:
Description:
page item
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
page item
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
nothing
Exports the object to a file.
string
Gets the label value associated with the given key (label name).
exclude overlap path
Name:
Type:
Description:
with
list of objects
he objects to exclude.
export
Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he file type to export to.
to
string
he file path to the exported file, including the file name.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
extract label
278
AppleScript Reference
InDesign CS Scripting Guide
Method: fit
Parameters: Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
list of objects
he objects to intersect with.
make compound path
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
insert label
intersect path
minus back
move
override
Return:
Description:
nothing
Fit content within a graphic frame.
nothing
Sets the string associated with the given key (label name).
page item
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
page item
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
page item
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
page item
Overrides an item from the master page and places it on the page.
InDesign CS Scripting Guide AppleScript Reference 279
Method: place
place xml
Parameters: Name:
Type:
file name
string
Description: he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Name:
Type:
Description:
using
XML element
he element in which to insert the incoming XML elements.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
release compound path
None
objects
release compound path.
remove override
None
nothing
Removes a locally overriden master page item
reset scaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
280
AppleScript Reference
InDesign CS Scripting Guide
Method: resize
rotate
select
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to rotate around, either one of the enums or an x,y value.
[considering current rotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are rotated.
[considering parents rotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
nothing
Select this page item.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
InDesign CS Scripting Guide AppleScript Reference 281
Method: shear
store
subtract path
unlink
282
Parameters: Name:
Type:
Description:
by
number
angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to shear around, either one of the enums or an x,y value.
[considering current shear]
boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are sheared.
[considering parents shear]
boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
page item
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
page reference Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the page reference within its parent topic
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
object reference
page reference
read only
An object reference to the object.
page number style override
character style
read/write
he style override replacing the standard generation option.
page reference limit
paragraph style or integer
read/write
he page reference limit.
page reference type
current page, to next style change, to next use of style, to end of story, to end of document, to end of section, for next n paragraphs, for next n pages, suppress page numbers
read/write
he page reference type.
parent
topic
read only
he parent of the object.
parent story
story
read only
he story containing the page reference.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
story offset
integer
read only
he location of the page reference from the beginning of the story.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
page reference
Create a new page reference.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
parent story
story
he parent story.
story offset
insertion point or integer
Offset within the story.
[page reference type]
current page, to next style change, to next use of style, to end of story, to end of document, to end of section, for next n paragraphs, for next n pages, suppress page numbers
he type of page reference.
[page reference limit]
paragraph style or integer.
he page range limit.
[page number style override]
character style
he style override for the page number.
Description:
InDesign CS Scripting Guide AppleScript Reference 283
paragraph Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
nested style
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
tab stop
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
284
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ascent
fixed
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associated XML elements
list of XML elements
read only
he XML elements associated with this text object (if any).
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
fixed
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
fixed
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
InDesign CS Scripting Guide AppleScript Reference 285
Property:
Type:
Access:
Description:
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradient stroke angle
fixed
read/write
he angle of the gradient applied to the stroke of the text.
gradient stroke length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal offset
fixed
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
286
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
index
integer
read only
index of the object within its parent object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
InDesign CS Scripting Guide AppleScript Reference 287
Property:
Type:
Access:
Description:
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
paragraph
read only
An object reference to the object.
open type features
list of long
read/write
open type features
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
parent story
story
read only
he story containing the text object.
parent text frame
text frame
read only
he text frame containing the text object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
288
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
InDesign CS Scripting Guide AppleScript Reference 289
Property:
Type:
Access:
Description:
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this paragraph. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
290
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method: apply style
changecase
convert to table
create outlines
delete
Parameters: Name:
Type:
Description:
using
character style, paragraph style, or string
he paragraph style or character style to apply.
[clearing overrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
uppercase, lowercase, titlecase, sentencecase
Case option to use.
Name:
Type:
Description:
[column separator]
string
he character to interpret as the column separator.
[row separator]
string
he character to interpret as the row separator.
[number of columns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original text.
None
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Deletes the object.
InDesign CS Scripting Guide AppleScript Reference 291
Method: export
markup
move
place
292
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he full path to the exported file.
[showing options]
boolean
If true, display the Export dialog box.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
using
XML element
he XML element to associate with the text.
Name:
Type:
Description:
to
before, ater, at beginning, at end
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he location (in page coordinates) at which to place the incoming file.
[destination layer]
layer or layer name as string
he layer on which to place the incoming file.
[showing options]
boolean
If true, display the import options dialog box for the file type being placed.
[autoflowing]
boolean
If true, autoflow the incoming text.
[retaining formatting]
boolean
If true, retain the formatting of the incoming text. If false, place the text using the document’s default text formatting attributes.
[converting quotes]
boolean
If true, convert typewriter (“straight”) quotation marks to typographic (“curly”) quotation marks.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
object
Place a file.
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects text.
InDesign CS Scripting Guide AppleScript Reference 293
paragraph style Elements Element:
Refer to by:
nested style
index, name, range, relative, test
tab stop
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
based on
paragraph style or nothing
read/write
he paragraph style this style is based on.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
294
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
id
integer
read only
A unique number identifying the object.
imported
boolean
read only
Whether this style was imported from another document
index
integer
read only
index of the paragraph style within its parent document or application
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
InDesign CS Scripting Guide AppleScript Reference 295
Property:
Type:
Access:
Description:
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
label
string
read/write
A label that can be set to any string
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
name
string
read/write
he name of the paragraph style.
296
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
next style
paragraph style
read/write
he style of the next paragraph. Note that this property only applies when you are entering text--if you are not entering text, setting this property to a given paragraph style will not affect the style applied to the next paragraph.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
paragraph style
read only
An object reference to the object.
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
InDesign CS Scripting Guide AppleScript Reference 297
Property:
Type:
Access:
Description:
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
298
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this paragraph style. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
InDesign CS Scripting Guide AppleScript Reference 299
Property:
Type:
Access:
Description:
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
paragraph style
Create a new paragraph style.
extract label
insert label
make
300
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
pasteboard preference Properties Property:
Type:
Access:
Description:
bleed guide color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of bleed guides. Can return: list of 3 fixed or light blue/red/green/blue/yellow/magenta/cyan/gray/black/orange/ dark green/teal/tan/brown/violet/gold/ dark blue/pink/lavender/brick red/olive green/peach/burgundy/grass green/ochre/ purple/light ...
class
type
read only
he class of the object.
minimum space above and below
fixed or measurement string
read/write
he minimum space above and below a page.
object reference
pasteboard preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
pasteboard color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of the pasteboard.
preview background color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of the preview background. Can return: list of 3 fixed or light blue/red/ green/blue/yellow/magenta/cyan/gray/ black/orange/dark green/teal/tan/brown/ violet/gold/dark blue/pink/lavender/brick red/olive green/peach/burgundy/grass green/ochre/pur...
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
slug guide color
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of slug guides. Can return: list of 3 fixed or light blue/red/green/blue/yellow/magenta/cyan/gray/black/orange/ dark green/teal/tan/brown/violet/gold/ dark blue/pink/lavender/brick red/olive green/peach/burgundy/grass green/ochre/ purple/light g...
InDesign CS Scripting Guide AppleScript Reference 301
path Elements Element:
Refer to by:
path point
index, name, range, relative, test
Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
entire path
list of fixed or measurement strings
read/write
he positions of all of the anchor points on the path.
index
integer
read only
index of the path within its parent page item, oval, rectangle, graphic line, text frame, polygon, clipping path settings or text wrap preference
object reference
path
read only
An object reference to the object.
parent
object
read only
he parent of the object.
path type
open path, closed path
read/write
he path type (open or closed).
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
make
None
path
Create a new path.
reverse
None
nothing
Reverse the path
302
AppleScript Reference
InDesign CS Scripting Guide
path point Properties Property:
Type:
Access:
Description:
anchor
list of fixed or measurement strings {x, y}
read/write
he location of the anchor point, in page coordinates.
class
type
read only
he class of the object.
index
integer
read only
index of the path point within its parent path
let direction
list of fixed or measurement strings {x, y}
read/write
he location of the incoming (let) direction point (or “control handle”).
object reference
path point
read only
An object reference to the object.
parent
path
read only
he parent of the object.
point type
line type, smooth, corner
read/write
he type of the point (corner/smooth).
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right direction
list of fixed or measurement strings {x, y}
read/write
he location of the outgoing (right) direction point (or “control handle”).
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
make
None
path point
Create a new path point.
InDesign CS Scripting Guide AppleScript Reference 303
PDF Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
clipping path
clipping path settings
read only
he clipping path settings
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
image type name
string
read only
he type of image
index
integer
read only
index of the pdf within its parent XML element, page item, oval, rectangle, polygon, graphic line, state, group or button
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item link
link
read only
link to a placed file
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
304
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
nonprinting
boolean
read/write
Whether the page item is non-printing
object reference
PDF
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
InDesign CS Scripting Guide AppleScript Reference 305
Method: export
extract label
insert label
markup
move
place
place xml
306
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current location.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point at which to place the file.
[destination layer]
layer or layer name as string
he layer on which to place the file.
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
If true, convert straight quotes to typographer’s quotes.
Name:
Type:
Description:
using
XML element
he element to place into.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Export the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Markup layout content with XML preserving the existing content.
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
Method: resize
rotate
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he horizontal scaling percentage.
[vertical scale]
fixed
he vertical scaling percentage.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to rotate around.
[considering current rotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are rotated.
[considering parents rotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
InDesign CS Scripting Guide AppleScript Reference 307
Method: shear
store
unlink
308
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to shear around.
[considering current shear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are sheared.
[considering parents shear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
PDF export preference Properties Property:
Type:
Access:
Description:
acrobat compatibility
acrobat 4, acrobat 5, acrobat 6
read/write
he version of Acrobat to use for the exported pdf.
applied flattener preset
flattener preset
read/write
he flattener preset
bleed bottom
fixed or measurement string
read/write
Bleed amount to add at the bottom of the page.
bleed inside
fixed or measurement string
read/write
Bleed amount to add at the inside of the page.
bleed marks
boolean
read/write
Adds fine rules that define the bleed area outside the page size.
bleed outside
fixed or measurement string
read/write
Bleed amount to add at the outside of the page.
bleed top
fixed or measurement string
read/write
Bleed amount to add at the top of the page.
change security password
string
read/write
he password required to change the security settings of the exported pdf. You can only set this value. Getting the value will always fail.
class
type
read only
he class of the object.
color bars
boolean
read/write
If true, print small squares of filled with CMYK inks and tints of gray outside the page area (in the bleed area).
color bitmap compression
none, auto compression, JPEG, zip, JPEG 2000
read/write
he type of compression (if any) to apply to color bitimap images in the exported pdf.
color bitmap quality
minimum, low, medium, high, maximum, four bit, eight bit
read/write
he quality of the color bitmap images in the exported pdf.
color bitmap sampling
none, downsample, subsample, bicubic downsample
read/write
he type of resampling to apply to color bitmap images (if any).
color bitmap sampling DPI
integer
read/write
he resolution for resampling color bitmap images, in dots (pixels) per inch.
color tile size
integer
read/write
color tile size for JPEG 2000 compression.
compress text and line art
boolean
read/write
If true, compress text and line art using ZIP compression.
compression type
Compress None, Compress Structure, Compress Objects
read/write
he type of compression to apply to the pdf file.
content to embed
Use Object Settings, Link All, Embed All
read/write
he interactive content to embed in the pdf file.
crop images to frames
boolean
read/write
Export only image data that falls within the visible portion of the frame.
crop marks
boolean
read/write
Adds fine horizontal and vertical rules that define where the page should be trimmed.
disallow changing
boolean
read/write
If true, the exported pdf will not be editable.
disallow copying
boolean
read/write
If true, objects in the exported pdf cannot be copied.
disallow document assembly
boolean
read/write
If true, disallow document assembly in the exported pdf.
disallow extraction for accessibility
boolean
read/write
If true, the user will not be able to extract content for accessiblity in the exported pdf.
disallow form fill in
boolean
read/write
If true, do not allow the user to change form fields in the exported pdf.
InDesign CS Scripting Guide AppleScript Reference 309
Property:
Type:
Access:
Description:
disallow hi res printing
boolean
read/write
If true, disable high resolution printing in the exported pdf.
disallow notes
boolean
read/write
If true, the user will not be allowed to add annotations to the exported pdf.
disallow plaintext metadata
boolean
read/write
If true, the user will not be able to add plain text metadata to the exported pdf.
disallow printing
boolean
read/write
If true, the user will not be able to print the exported pdf.
export guides and grids
boolean
read/write
If true, export the guides and grids to to the pdf.
export layers
boolean
read/write
If true, export layers to the pdf.
export nonprinting objects
boolean
read/write
If true, export non-printing objects to the pdf.
export reader spreads
boolean
read/write
If true, export pages together as if they were bound on the same sheet.
generate thumbnails
boolean
read/write
If true, generate thumbnails for each page or spread.
Gray tile size
integer
read/write
Gray tile size for JPEG 2000 compression.
grayscale bitmap compression
none, auto compression, JPEG, zip, JPEG 2000
read/write
he type of compression applied to grayscale bitmap images.
grayscale bitmap quality
minimum, low, medium, high, maximum, four bit, eight bit
read/write
he quality setting for grayscale bitmap quality.
grayscale bitmap sampling
none, downsample, subsample, bicubic downsample
read/write
he type of resampling to apply to grayscale bitmap images (if any).
grayscale bitmap sampling DPI
integer
read/write
he resolution for resampling grayscale bitmap images, in dots (pixels) per inch.
ignore spread overrides
boolean
read/write
If true, ignore flattener spread overrides.
include bookmarks
boolean
read/write
If true, to include bookmarks in the pdf.
include hyperlinks
boolean
read/write
If true, include hyperlinks in the pdf.
include ICC profiles
boolean
read/write
If true, embed ICC profiles in the pdf.
include slug with PDF
boolean
read/write
If true, include the slug area in the pdf.
include structure
boolean
read/write
If true, include the XML structure in the pdf.
interactive elements
boolean
read/write
If true, include interactive elements (movies, sounds, push buttons) in the pdf.
monochrome bitmap compression
none, CCIT3, CCIT4, zip, run length
read/write
he type of compression to apply to monochrome bitmap images.
monochrome bitmap sampling
none, downsample, subsample, bicubic downsample
read/write
he type of resampling to apply to monochrome bitmap images.
monochrome bitmap sampling DPI
integer
read/write
he resampling resolution to use for monochrome bitmap images, in dots (pixels) per inch.
object reference
PDF export preference
read only
An object reference to the object.
omit bitmaps
boolean
read/write
If true, omit bitmap images in the pdf (but include OPI link information for the omitted images).
omit EPS
boolean
read/write
If true, omit epss graphics in the pdf (but include OPI link information for the omitted graphics).
omit PDF
boolean
read/write
If true, omit pdf graphics in the pdf (but include OPI link information for the omitted graphics).
310
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
open document password
string
read/write
he password requested when the user opens the exported pdf. You can only set this value. Getting the value will always fail.
optimize PDF
boolean
read/write
If true, optimize the exported pdf.
output condition
custom, CGATSTR001, or string
read/write
pdf/X output condition.
page information marks
boolean
read/write
Prints the filename, page number, current date and time and color separation name in the bleed area of the pdf.
page marks offset
fixed or measurement string
read/write
he distance from the edge of the page at which InDesign draws page marks.
page range
string or ‘all’
read/write
he range of pages to export.
parent
object
read only
he parent of the object.
PDF color space
RGB, CMYK, unchanged color space
read/write
Specifies how to represent the color information in the exported pdf.
PDF destination profile
string
read/write
Destination color profile.
PDF mark type
default
read/write
he type of pdf printer’s mark to use.
PDF X profile
string
read/write
pdf X color profile, either idpdfProfileSelector or a string.
printer mark weight
p125pt, p25pt, p50pt, p10mm, p15mm, p20mm, p30mm
read/write
he weight of the printer marks.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
registration marks
boolean
read/write
If true, add small ‘targets’ outside the page area for aligning separations.
simulate overprint
boolean
read/write
If true, simulate overprinting in the pdf.
standards compliance
none, PDFX1a2001 standard, PDFX32002 standard
read/write
pdf/X Standards compliance.
subset fonts below
integer
read/write
he threshold at which InDesign embeds all characters of a font (0% downloads all of the characters in the font; 100% downloads only the characters actually used in the document).
threshold to compress color
integer
read/write
Dots (pixels) per inch threshold at which color bitmap images will be compressed.
threshold to compress gray
integer
read/write
Dots (pixels) per inch threshold at which grayscale bitmap images will be compressed.
threshold to compress monochrome
integer
read/write
Dots (pixels) per inch threshold at which monochrome bitmap images will be compressed.
use document bleed with PDF
boolean
read/write
If true, use the document bleed area in the pdf.
use security
boolean
read/write
If true, use the security settings when exporting a pdf.
view PDF
boolean
read/write
If true, open the pdf file ater exporting.
InDesign CS Scripting Guide AppleScript Reference 311
PDF export preset Properties Property:
Type:
Access:
Description:
acrobat compatibility
acrobat 4, acrobat 5, acrobat 6
read/write
What version of Acrobat the pdf is compatible with
applied flattener preset
flattener preset
read/write
he flattener preset
bleed bottom
fixed or measurement string
read/write
Amount to image below the defined page size
bleed inside
fixed or measurement string
read/write
Amount to image inside the defined page size
bleed marks
boolean
read/write
Adds fine rules that define the amount of extra area to image outside the define page size
bleed outside
fixed or measurement string
read/write
Amount to image outside the defined page size
bleed top
fixed or measurement string
read/write
Amount to image above the defined page size
class
type
read only
he class descriptor type
color bars
boolean
read/write
Adds small squares of color representing the CMYK inks and tints of gray in 10% increments
color bitmap compression
none, auto compression, JPEG, zip, JPEG 2000
read/write
color bitmap compression
color bitmap quality
minimum, low, medium, high, maximum, four bit, eight bit
read/write
color bitmap quality
color bitmap sampling
none, downsample, subsample, bicubic downsample
read/write
he kind of resampling to apply to color bitmap images
color bitmap sampling DPI
integer
read/write
he resolution for resampling
color tile size
integer
read/write
color tile size for JPEG 2000 compression.
compress text and line art
boolean
read/write
Whether to compress text and line art using ZIP compression
compression type
Compress None, Compress Structure, Compress Objects
read/write
he type of compression to apply to the pdf file.
content to embed
Use Object Settings, Link All, Embed All
read/write
he interactive content to embed in the pdf file.
crop images to frames
boolean
read/write
Export only image data that falls within the visible portion of the frame
crop marks
boolean
read/write
Adds fine horizontal and vertical rules that define where the page should be trimmed
export guides and grids
boolean
read/write
Whether to include visible guides and baseline grids in the pdf
export layers
boolean
read/write
Whether to include layers in the pdf.
export nonprinting objects
boolean
read/write
Whether to include non-printing objects in the pdf
export reader spreads
boolean
read/write
Whether to export pages together as if they were bound on the same sheet
generate thumbnails
boolean
read/write
Generate thumbnails for each page or spread
Gray tile size
integer
read/write
Gray tile size for JPEG 2000 compression.
grayscale bitmap compression
none, auto compression, JPEG, zip, JPEG 2000
read/write
Grayscale bitmap compression
312
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
grayscale bitmap quality
minimum, low, medium, high, maximum, four bit, eight bit
read/write
Grayscale bitmap quality
grayscale bitmap sampling
none, downsample, subsample, bicubic downsample
read/write
he kind of resampling to apply to grayscale bitmap images
grayscale bitmap sampling DPI
integer
read/write
he resolution for resampling
ignore spread overrides
boolean
read/write
Whether to ignore flattener spread overrides
include bookmarks
boolean
read/write
Whether to include bookmarks in the pdf
include hyperlinks
boolean
read/write
Whether to include hyperlinks in the pdf
include ICC profiles
boolean
read/write
Whether to embed ICC profiles in the exported pdf
include slug with PDF
boolean
read/write
Whether to include the slug area in the pdf.
include structure
boolean
read/write
Whether to include structure in the pdf
index
integer
read only
index of the pdf export preset within its parent application
interactive elements
boolean
read/write
Whether to include interactive elements in the pdf
monochrome bitmap compression
none, CCIT3, CCIT4, zip, run length
read/write
Monochrome bitmap compression
monochrome bitmap sampling
none, downsample, subsample, bicubic downsample
read/write
he kind of resampling to apply to monochrome bitmap images
monochrome bitmap sampling DPI
integer
read/write
he resolution for resampling
name
string
read/write
he name of the pdf export preset
object reference
PDF export preset
read only
An object reference for this pdf export preset
omit bitmaps
boolean
read/write
Replace bitmap images with OPI links
omit EPS
boolean
read/write
Replace epss images with OPI links
omit PDF
boolean
read/write
Replace pdf images with OPI links
optimize PDF
boolean
read/write
Whether to optimize the exported pdf
output condition
custom, CGATSTR001 or string
read/write
pdf/X output condition. Can return: custom/CGATSTR001 or string.
page information marks
boolean
read/write
Prints the filename, page number, current date and time and color separation name
page marks offset
fixed or measurement string
read/write
How far from the edge of the page InDesign will draw page marks
parent
object
read only
he pdf export preset’s parent
PDF color space
RGB, CMYK, unchanged color space
read/write
Specifies how to represent the color information in the exported pdf
PDF destination profile
string
read/write
Destination color profile
PDF mark type
default
read/write
he type of pdf printer’s mark to use
PDF X profile
string
read/write
pdf X color profile. Can return: use no profile/use monitor profile/use composite profile/use separation profile or string.
printer mark weight
p125pt, p25pt, p50pt, p10mm, p15mm, p20mm, p30mm
read/write
he weight of the printer mark
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
registration marks
boolean
read/write
Adds small ‘targets’ outside the page area for aligning the different separations
simulate overprint
boolean
read/write
Whether to simulate overprint
InDesign CS Scripting Guide AppleScript Reference 313
Property:
Type:
Access:
Description:
standards compliance
none, PDFX1a2001 standard, PDFX32002 standard
read/write
pdf/X Standards compliance
subset fonts below
integer
read/write
he threshold point at which InDesign embeds all characters of a font
threshold to compress color
integer
read/write
Dots per inch threshold which causes color image compression.
threshold to compress gray
integer
read/write
Dots per inch threshold which causes gray image compression.
threshold to compress monochrome
integer
read/write
Dots per inch threshold which causes monochrome image compression.
use document bleed with PDF
boolean
read/write
Whether to use the document bleed area in the pdf.
view PDF
boolean
read/write
Whether to open the pdf file ater exporting
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
make
None
pdf export preset
Create a new pdf export preset.
314
AppleScript Reference
InDesign CS Scripting Guide
Description:
PDF place preference Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
object reference
PDF place preference
read only
An object reference to the object.
open document password
string
read/write
he password required to open the pdf.
page number
integer
read/write
he page of the pdf to place.
parent
object
read only
he parent of the object.
PDF crop
crop content, crop art, crop PDF, crop trim, crop bleed, crop media
read/write
Specifies the bounding box of the pdf to use when importing the pdf page.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
transparent background
boolean
read/write
If true, the background of the pdf is transparent.
InDesign CS Scripting Guide AppleScript Reference 315
percent combobox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit value
fixed
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the percent combobox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
percent combobox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
string list
list of strings
read/write
A list of the strings that appear on the menu of the control.
Methods Method:
Parameters:
Return:
Description:
make
None
percent combobox
Create a new percent combobox.
316
AppleScript Reference
InDesign CS Scripting Guide
percent editbox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit value
fixed
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the percent editbox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
percent editbox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
Methods Method:
Parameters:
Return:
Description:
make
None
percent editbox
Create a new percent editbox.
InDesign CS Scripting Guide AppleScript Reference 317
PICT Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
clipping path
clipping path settings
read only
he clipping path settings
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
image type name
string
read only
he type of image
index
integer
read only
index of the pictt within its parent XML element, page item, oval, rectangle, polygon, graphic line, state, group or button
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item link
link
read only
link to a placed file
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
318
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
nonprinting
boolean
read/write
Whether the page item is non-printing
object reference
PICT
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
InDesign CS Scripting Guide AppleScript Reference 319
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
nothing
Export the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
object
Place a file.
export
extract label
insert label
move
place
320
Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current location.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point at which to place the file.
[destination layer]
layer or layer name as string
he layer on which to place the file.
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
If true, convert straight quotes to typographer’s quotes.
AppleScript Reference
InDesign CS Scripting Guide
Method: resize
rotate
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he horizontal scaling percentage.
[vertical scale]
fixed
he vertical scaling percentage.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to rotate around.
[considering current rotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are rotated.
[considering parents rotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
InDesign CS Scripting Guide AppleScript Reference 321
Method: shear
store
unlink
322
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to shear around.
[considering current shear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are sheared.
[considering parents shear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
Library
he library in which to store.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
polygon Elements Element:
Refer to by:
EPS
index, name, range, relative, test, id
graphic
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
image
index, name, range, relative, test, id
movie
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
path
index, name, range, relative, test
PDF
index, name, range, relative, test, id
PICT
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
sound
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
text path
index, name, range, relative, test, id
WMF
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
content type
unassigned, graphic type, text type
read/write
he type of content
corner effect
none, rounded corner, inverse rounded corner, inset corner, bevel corner, fancy corner
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
InDesign CS Scripting Guide AppleScript Reference 323
Property:
Type:
Access:
Description:
corner radius
fixed
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
end join
miter end join, round end join, bevel end join
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fill tint
fixed
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gap color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gap tint
fixed
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradient fill angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient fill length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradient stroke angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient stroke length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
324
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the polygon within its parent spread, master spread, page item, oval, rectangle, polygon, graphic line, group, state, document, layer, page, button, text frame, story, text, character, word, line, text column, paragraph, text style range, cell...
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item layer
layer
read/write
he layer containing the page item.
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
let line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miter limit
fixed
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
nonprinting
boolean
read/write
If true, the page item is non-printing.
object reference
polygon
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overprint fill
boolean
read/write
If true, the fill of the page item will overprint.
overprint gap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprint stroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
InDesign CS Scripting Guide AppleScript Reference 325
Property:
Type:
Access:
Description:
overridden master page item
page item
read only
A reference to the master page item linked to the page item (if any).
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
stroke alignment
center alignment, inside alignment, outside alignment
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
stroke color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke dash and gap
list of fixed or measurement strings {dash, gap, ...}
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
326
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
stroke tint
fixed
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
stroke type
stroke style
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
stroke weight
fixed
read/write
he weight (in points) of the stroke applied to the page item.
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: add path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Return:
Description:
page item
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
page item
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
nothing
Exports the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Fit content within a graphic frame.
exclude overlap path
Name:
Type:
Description:
with
list of objects
he objects to exclude.
export
Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
extract label
fit
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
InDesign CS Scripting Guide AppleScript Reference 327
Method: insert label
Parameters: Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
list of objects
he objects to intersect with.
Name:
Type:
Description:
[layer]
layer or layer name as string
he layer on which to create the polygon as layer.
[number of sides]
integer
he number of sides for the polygon as integer.
[inset percentage]
fixed
he star inset percentage for the polygon as integer.
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater this polygon or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
make compound path
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
intersect path
make
minus back
move
328
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Sets the string associated with the given key (label name).
page item
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
polygon
Create a new polygon.
page item
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
page item
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
Method: override
place
place xml
Parameters: Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Name:
Type:
Description:
using
XML element
he element to place into.
Return:
Description:
page item
Overrides an item from the master page and places it on the page.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
release compound path
None
objects
release compound path.
remove override
None
nothing
Removes a locally overriden master page item
reset scaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
InDesign CS Scripting Guide AppleScript Reference 329
Method: resize
rotate
select
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to rotate around, either one of the enums or an x,y value.
[considering current rotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are rotated.
[considering parents rotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
nothing
Select this polygon.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
330
AppleScript Reference
InDesign CS Scripting Guide
Method: shear
store
subtract path
unlink
Parameters: Name:
Type:
Description:
by
number
angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to shear around, either one of the enums or an x,y value.
[considering current shear]
boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are sheared.
[considering parents shear]
boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
page item
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide AppleScript Reference 331
polygon preference Properties Property:
Type:
Access:
class
type
read only
he class of the object.
inset percentage
integer
read/write
he default star inset percentage for new polygons.
number of sides
integer
read/write
he default number of sides for new polygons.
object reference
polygon preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
332
AppleScript Reference
InDesign CS Scripting Guide
Description:
print preference Properties Property:
Type:
Access:
Description:
active printer preset
printer preset or printer preset name as string
read/write
Current preset. Can return: default/custom or printer preset.
all printer marks
boolean
read/write
If true, print all types of printer’s marks.
black angle
fixed
read/write
he haltone screen angle used to prin black ink.
black frequency
fixed
read/write
he haltone screen frequency of the black ink.
bleed bottom
fixed or measurement string
read/write
Bleed amount to add at the bottom of the page.
bleed inside
fixed or measurement string
read/write
Bleed amount to add at the inside of the page.
bleed marks
boolean
read/write
If true, add fine rules that define the bleed area outside the page size.
bleed outside
fixed or measurement string
read/write
Bleed amount to add at the outside of the page.
bleed top
fixed or measurement string
read/write
Bleed amount to add at the top of the page.
class
type
read only
he class of the object.
collating
boolean
read/write
If true, printed copies will be collated.
color bars
boolean
read/write
If true, print small squares of filled with CMYK inks and tints of gray outside the page area (in the bleed area).
color output
composite leave unchanged, composite gray, composite RGB, composite CMYK, separations, inRIP separations
read/write
he color output mode used to print.
composite angle
fixed
read/write
he haltone screen angle used to print composite gray ink.
composite frequency
fixed
read/write
he haltone screen frequency used to print composite gray ink.
copies
integer
read/write
he number of copies to print.
CRD
string
read/write
he color-rendering dictionary to use. Either one the CRD constants or a CRD name.
crop marks
boolean
read/write
If true, InDesign prints fine horizontal and vertical rules that indicate where the page should be trimmed.
cyan angle
fixed
read/write
he haltone screen angle used to print cyan ink.
cyan frequency
fixed
read/write
he haltone screen frequency of the cyan ink.
data format
ASCII, binary
read/write
he format of data sent to the printer (binary or ASCII).
download PPD fonts
boolean
read/write
If true, download fonts listed in the selected PPD.
flattener preset name
string
read/write
he transparency flattener preset name
flip
none, horizontal, vertical, horizontal and vertical
read/write
he type of flip.
font downloading
none, complete, subset, subset large
read/write
he method used to download fonts to the printer.
ignore spread overrides
boolean
read/write
If true, ignore flattener spread overrides.
include slug to print
boolean
read/write
If true, print the slug area.
InDesign CS Scripting Guide AppleScript Reference 333
Property:
Type:
Access:
Description:
intent
use color settings, perceptual, saturation, relative colorimetric, absolute colorimetric
read/write
he rendering intent.
magenta angle
fixed
read/write
he haltone screen angle used to print magenta ink.
magenta frequency
fixed
read/write
he haltone screen frequency of the magenta ink.
mark line weight
p125pt, p25pt, p50pt, p05mm, p07mm, p10mm, p15mm, p20mm, p30mm
read/write
line weight of the printer’s marks.
mark offset
fixed
read/write
Amount to offset the page marks from the edge of the defined page size.
mark type
default
read/write
he type of printer’s mark to use.
negative
boolean
read/write
If true, print as negative.
object reference
print preference
read only
An object reference to the object.
omit bitmaps
boolean
read/write
If true, omit bitmap images in the pdf (but include OPI link information for the omitted images).
omit EPS
boolean
read/write
If true, omit epss graphics in the pdf (but include OPI link information for the omitted graphics).
omit PDF
boolean
read/write
If true, omit pdf graphics in the pdf (but include OPI link information for the omitted graphics).
OPI image replacement
boolean
read/write
If true, use OPI comments to print linked graphics.
page information marks
boolean
read/write
If true, print the filename, page number, current date and time and color separation name in the bleed area.
page position
upper let, center horizontally, center vertically, centered
read/write
Where to position the page relative to the paper dimensions.
page range
string or ‘all’
read/write
he range of pages to print.
paper gap
fixed
read/write
he amount of custom paper gap.
paper height
defined by driver or custom (constants) or fixed or measurement string
read/write
he custom paper height. Either one of the paper size constants or a value.
paper offset
fixed
read/write
he amount of custom paper offset.
paper size
defined by driver or custom (constants) or ‘auto’ or name of page size as string read/write
he paper size. Either one of the paper size constants or a paper size name.
paper size list
list of string
read only
A list of the names of the available paper sizes.
paper transverse
boolean
read/write
If true, rotate the image of the page 90 degrees when printing.
paper width
defined by driver or custom (constants) or fixed or measurement string
read/write
he custom paper width. Either one of the paper size constants or a value (in points).
parent
object
read only
he parent of the object.
PostScript level
level 2, level 3
read/write
he level of PostScript to send to the printer.
PPD
string
read/write
Current PPD. Either one the PPD constants or a PPD model name.
PPD list
list of strings
read only
A list of the names of the available PPDs.
print black
boolean
read/write
If true, print the black ink.
print blank pages
boolean
read/write
If true, print blank pages.
print cyan
boolean
read/write
If true, print the cyan ink.
print file
file reference or file name as string
read/write
he path to the file used when printing to disk.
print guides grids
boolean
read/write
If true, print visible guides and baseline grids.
print magenta
boolean
read/write
If true, print the magenta ink.
334
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
print master pages
boolean
read/write
If true, print master pages.
print nonprinting
boolean
read/write
If true, print non-printing objects.
print page orientation
portrait, landscape, reverse portrait, reverse landscape
read/write
he orientation of the printed page.
print spreads
boolean
read/write
If true, print spreads.
print yellow
boolean
read/write
If true, print the yellow ink.
printer
string
read/write
he current printer. Either to file or a printer name.
printer list
list of strings
read only
A list of the names of available printers.
profile
string
read/write
he color profile to use. Either one the idProfile constants or a profile name.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
registration marks
boolean
read/write
If true, add small ‘targets’ outside the page area for aligning separations.
reverse order
boolean
read/write
If true, print in reverse order.
scale height
fixed
read/write
he vertical scaling percentage to apply when printing.
scale mode
scale width height, scale to fit
read/write
he method used to scale the page.
scale proportional
boolean
read/write
If true, scale the width and height proportionally when printing.
scale width
fixed
read/write
he horizontal scaling percentage to apply when printing.
screening
string
read/write
he ink screening to use.
screening list
list of strings
read only
A list of the names of the available ink screenings in the PPD.
send image data
all image data, optimized subsampling, proxy image data, none
read/write
Sets the method used to transmit image data to the printer.
sequence
all, odd, even
read/write
Whether to print odd pages, even pages or both.
simulate overprint
boolean
read/write
If true, simulate overprinting in the printed document.
source space
use document, proof space
read/write
he CMS source.
text as black
boolean
read/write
If true, print all text in black.
thumbnails
boolean
read/write
If true, print thumbnails.
thumbnails per page
k1x2, k2x2, k3x3, k4x4, k5x5, k6x6, k7x7
read/write
humbnails per page: 1x2, 2x2, 3x3, 4x4, 5x5, 6x6 or 7x7.
tile
boolean
read/write
If true, tile pages when printing.
tiling overlap
fixed
read/write
he amount of tiling overlap for Auto or Auto Justified tiling.
tiling type
auto, auto justified, manual
read/write
he type of tiling to use when printing.
trapping
off, application builtin, Adobe inRIP
read/write
he type of trapping to use.
use document bleed to print
boolean
read/write
If true, print the document bleed area.
yellow angle
fixed
read/write
he haltone screen angle used to print yellow ink.
yellow frequency
fixed
read/write
he frequency of the yellow ink
InDesign CS Scripting Guide AppleScript Reference 335
printer preset Properties Property:
Type:
Access:
Description:
all printer marks
boolean
read/write
Whether to print all types of printer’s marks
black angle
fixed
read/write
he angle of the black ink
black frequency
fixed
read/write
he frequency of the black ink
bleed bottom
fixed or measurement string
read/write
Amount to image below the defined page size
bleed inside
fixed or measurement string
read/write
Amount to image inside the defined page size
bleed marks
boolean
read/write
Adds fine rules that define the amount of extra area to image outside the define page size
bleed outside
fixed or measurement string
read/write
Amount to image outside the defined page size
bleed top
fixed or measurement string
read/write
Amount to image above the defined page size
class
type
read only
he class descriptor type
collating
boolean
read/write
Should printed copies be collated?
color bars
boolean
read/write
Adds small squares of color representing the CMYK inks and tints of gray in 10% increments
color output
composite leave unchanged, composite gray, composite RGB, composite CMYK, separations, inRIP separations
read/write
he color output mode used to print
composite angle
fixed
read/write
he angle of the composite gray ink
composite frequency
fixed
read/write
he frequency of the composite gray ink
copies
integer
read/write
he number of copies of a document to be printed
CRD
string
read/write
he color-rendering dictionary to use. Either one the CRD enumerations or a CRD name. Can return: default/use document/ working or string.
crop marks
boolean
read/write
Adds fine horizontal and vertical rules that define where the page should be trimmed
cyan angle
fixed
read/write
he angle of the cyan ink
cyan frequency
fixed
read/write
he frequency of the cyan ink
data format
ASCII, binary
read/write
he format of data sent to the printer
download PPD fonts
boolean
read/write
Whether to download PPD fonts
flattener preset name
string
read/write
he transparency flattener preset name
flip
none, horizontal, vertical, horizontal and vertical
read/write
he type of flip
font downloading
none, complete, subset, subset large
read/write
Control how fonts are downloaded to the printer
ignore spread overrides
boolean
read/write
Whether to ignore flattener spread overrides
include slug to print
boolean
read/write
Whether to include the slug area to print.
index
integer
read only
index of the printer preset within its parent application
intent
use color settings, perceptual, saturation, relative colorimetric, absolute colorimetric
read/write
he rendering intent
336
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
magenta angle
fixed
read/write
he angle of the magenta ink
magenta frequency
fixed
read/write
he frequency of the magenta ink
mark line weight
p125pt, p25pt, p50pt, p05mm, p07mm, p10mm, p15mm, p20mm, p30mm
read/write
line weight of the printer’s mark
mark offset
fixed
read/write
Amount to offset the page marks from the edge of the defined page size
mark type
default
read/write
he type of printer’s mark to use
name
string
read/write
he name of the printer preset
negative
boolean
read/write
Whether to print as negative
object reference
printer preset
read only
An object reference for this printer preset
omit bitmaps
boolean
read/write
Replace bitmap images with OPI links
omit EPS
boolean
read/write
Replace epss images with OPI links
omit PDF
boolean
read/write
Replace pdf images with OPI links
OPI image replacement
boolean
read/write
Whether to print graphics that are either linked using OPI comments or OPI comments stored in imported epss files
page information marks
boolean
read/write
Prints the filename, page number, current date and time and color separation name
page position
upper let, center horizontally, center vertically, centered
read/write
Where to position the page
paper gap
fixed
read/write
he amount of custom paper gap
paper height
defined by driver or custom (constants) or fixed or measurement string
read/write
he custom paper height. Either one of the paper size enumerations or a value. Can return: auto or string.
paper offset
fixed
read/write
he amount of custom paper offset
paper size
defined by driver or custom (constants) or ‘auto’ or name of page size as string read/write
he paper size. Either one of the paper size enumerations or a paper size name. Can return: defined by driver/custom or string.
paper size list
list of strings
read only
All available paper sizes
paper transverse
boolean
read/write
Whether to transverse the paper
paper width
defined by driver or custom (constants) or fixed or measurement string
read/write
he custom paper width. Either one of the paper size enumerations or a value. Can return: auto or fixed.
parent
object
read only
he printer preset’s parent
PostScript level
level 2, level 3
read/write
he level of PostScript to send to the printer
PPD
string
read/write
Current PPD. Either one the PPD enumerations or a PPD model name. Can return: device independent or string.
PPD list
list of strings
read only
All available PPDs
print black
boolean
read/write
Whether to print the black ink
print blank pages
boolean
read/write
Whether to print blank pages
print cyan
boolean
read/write
Whether to print the cyan ink
print file
file reference or file name as string
read/write
he path to the file used when printing to disk
print guides grids
boolean
read/write
Whether to print visible guides and baseline grids
print magenta
boolean
read/write
Whether to print the magenta ink
print master pages
boolean
read/write
Whether to print master pages
print nonprinting
boolean
read/write
Whether to print nonprinting objects
print page orientation
portrait, landscape, reverse portrait, reverse landscape
read/write
he orientation of the printed page
print spreads
boolean
read/write
Whether to print spreads
print yellow
boolean
read/write
Whether to print the yellow ink
printer
string
read/write
Current printer. Either to file or a printer name. Can return: postscript file or string.
InDesign CS Scripting Guide AppleScript Reference 337
Property:
Type:
Access:
Description:
printer list
list of strings
read only
All available printers
profile
string
read/write
he color profile to use. Either one the idProfile enumerations or a profile name. Can return: PostScript CMS/use document/working or string.
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
registration marks
boolean
read/write
Adds small ‘targets’ outside the page area for aligning the different separations
reverse order
boolean
read/write
Whether to print in reverse order
scale height
fixed
read/write
he percentage of scale to apply to the height of a page when printing
scale mode
scale width height, scale to fit
read/write
How to scale the page
scale proportional
boolean
read/write
Whether to scale the width and height proportionally
scale width
fixed
read/write
he percentage of scale to apply to the width of a page when printing
screening
string
read/write
he ink screening to use. Can return: default/custom or string.
screening list
list of strings
read only
All available ink screenings in the PPD
send image data
all image data, optimized subsampling, proxy image data, none
read/write
Controls how much image data to send to the printer
sequence
all, odd, even
read/write
Whether to print odd pages, even pages or both
simulate overprint
boolean
read/write
Whether to simulate overprint
source space
use document, proof space
read/write
he CMS source
text as black
boolean
read/write
Whether to print text as black
thumbnails
boolean
read/write
Whether to print thumbnails
thumbnails per page
k1x2, k2x2, k3x3, k4x4, k5x5, k6x6, k7x7
read/write
humbnails per page: 1x2, 2x2, 3x3, 4x4, 5x5, 6x6 or 7x7
tile
boolean
read/write
Whether to tile pages
tiling overlap
fixed
read/write
he amount of tiling overlap for Auto or Auto Justified tiling
tiling type
auto, auto justified, manual
read/write
he type of tiling
trapping
off, application builtin, Adobe inRIP
read/write
he type of trapping
use document bleed to print
boolean
read/write
Whether to use the document bleed area to print.
yellow angle
fixed
read/write
he angle of the yellow ink
yellow frequency
fixed
read/write
he frequency of the yellow ink
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
make
None
printer preset
Create a new printer preset.
338
AppleScript Reference
InDesign CS Scripting Guide
quit behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the quit behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the quit behavior.
object reference
quit behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
quit behavior
Create a new quit behavior.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 339
radiobutton control Properties Property:
Type:
Access:
Description:
checked state
boolean
read/write
If true, the radiobutton control is checked.
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the radiobutton control within its parent radiobutton group
min width
fixed
read/write
he minimum width of the control.
object reference
radiobutton control
read only
An object reference to the object.
parent
radiobutton group
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
static label
string
read/write
he static text label of the radiobutton control.
Methods Method:
Parameters:
Return:
Description:
make
None
radiobutton control
Create a new radiobutton control.
340
AppleScript Reference
InDesign CS Scripting Guide
radiobutton group Elements Element:
Refer to by:
radiobutton control
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the radiobutton group within its parent dialog column, dialog row, enabling group or border panel
min width
fixed
read/write
he minimum width of the control.
object reference
radiobutton group
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
selected button
integer
read/write
he index of the selected radiobutton control in the group.
Methods Method:
Parameters:
Return:
Description:
make
None
radiobutton group
Create a new radiobutton group.
InDesign CS Scripting Guide AppleScript Reference 341
real combobox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit value
fixed
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the real combobox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
real combobox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
string list
list of strings
read/write
A list of the strings that appear on the menu of the control.
Methods Method:
Parameters:
Return:
Description:
make
None
real combobox
Create a new real combobox.
342
AppleScript Reference
InDesign CS Scripting Guide
real editbox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
edit value
fixed
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the real editbox within its parent dialog column, dialog row, enabling group or border panel
large nudge
fixed
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximum value
fixed
read/write
he maximum value for this control.
min width
fixed
read/write
he minimum width of the control.
minimum value
fixed
read/write
he minimum value for this control.
object reference
real editbox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
small nudge
fixed
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
Methods Method:
Parameters:
Return:
Description:
make
None
real editbox
Create a new real editbox.
InDesign CS Scripting Guide AppleScript Reference 343
rectangle Elements Element:
Refer to by:
EPS
index, name, range, relative, test, id
graphic
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
image
index, name, range, relative, test, id
movie
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
path
index, name, range, relative, test
PDF
index, name, range, relative, test, id
PICT
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
sound
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
text path
index, name, range, relative, test, id
WMF
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
content type
unassigned, graphic type, text type
read/write
he type of content
corner effect
none, rounded corner, inverse rounded corner, inset corner, bevel corner, fancy corner
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
344
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
corner radius
fixed
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
end join
miter end join, round end join, bevel end join
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fill tint
fixed
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gap color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gap tint
fixed
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradient fill angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient fill length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradient stroke angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient stroke length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
InDesign CS Scripting Guide AppleScript Reference 345
Property:
Type:
Access:
Description:
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the rectangle within its parent spread, master spread, page item, oval, rectangle, polygon, graphic line, group, state, document, layer, page, button, text frame, story, text, character, word, line, text column, paragraph, text style range, ce...
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item layer
layer
read/write
he layer containing the page item.
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
let line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miter limit
fixed
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
nonprinting
boolean
read/write
If true, the page item is non-printing.
object reference
rectangle
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overprint fill
boolean
read/write
If true, the fill of the page item will overprint.
overprint gap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprint stroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
346
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
overridden master page item
page item
read only
A reference to the master page item linked to the page item (if any).
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
stroke alignment
center alignment, inside alignment, outside alignment
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
stroke color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke dash and gap
list of fixed or measurement strings {dash, gap, ...}
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
InDesign CS Scripting Guide AppleScript Reference 347
Property:
Type:
Access:
Description:
stroke tint
fixed
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
stroke type
stroke style
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
stroke weight
fixed
read/write
he weight (in points) of the stroke applied to the page item.
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: add path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Return:
Description:
page item
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
delete
None
nothing
Deletes the object.
duplicate
None
rectangle
Duplicates the object.
page item
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
nothing
Exports the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Fit content within a graphic frame.
exclude overlap path
Name:
Type:
Description:
with
list of objects
he objects to exclude.
export
Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
extract label
fit
348
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
AppleScript Reference
InDesign CS Scripting Guide
Method: insert label
Parameters: Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
list of objects
he objects to intersect with.
Name:
Type:
Description:
[layer]
layer or layer name as string
he layer on which to create the rectangle as layer.
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater this rectangle or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
make compound path
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
XML element
he element to mark up.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
intersect path
make
minus back
move
override
Return:
Description:
nothing
Sets the string associated with the given key (label name).
page item
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
rectangle
Create a new rectangle.
page item
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
page item
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
page item
Overrides an item from the master page and places it on the page.
InDesign CS Scripting Guide AppleScript Reference 349
Method: place
place xml
Parameters: Name:
Type:
file name
string
Description: he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Name:
Type:
Description:
using
XML element
he element to place into.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
release compound path
None
objects
release compound path.
remove override
None
nothing
Removes a locally overriden master page item
reset scaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
350
AppleScript Reference
InDesign CS Scripting Guide
Method: resize
rotate
select
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to rotate around, either one of the enums or an x,y value.
[considering current rotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are rotated.
[considering parents rotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
nothing
Select this rectangle.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
InDesign CS Scripting Guide AppleScript Reference 351
Method: shear
store
subtract path
unlink
352
Parameters: Name:
Type:
Description:
by
number
angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to shear around, either one of the enums or an x,y value.
[considering current shear]
boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are sheared.
[considering parents shear]
boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
page item
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
row Elements Element:
Refer to by:
cell
index, name, range, relative, test, id
column
index, name, range, relative, test
row
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
auto grow
boolean
read/write
If true, the cell will expand to display its content.
bottom edge stroke color
swatch
read/write
he stroke color of the bottom edge of the cell.
bottom edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the bottom edge of the cell.
bottom edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the bottom edge of the cell.
bottom edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottom edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the bottom edge of the cell.
bottom edge stroke priority
integer
read/write
he stroke priority of the bottom edge
bottom edge stroke tint
fixed
read/write
he tint applied to the stroke of the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottom edge stroke type
stroke style
read/write
he type of stroke applied to the bottom edge of the cell.
bottom edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the bottom edge of the cell.
bottom inset
fixed or measurement string
read/write
he bottom inset the cell.
class
type
read only
he class of the object.
clip content to cell
boolean
read/write
If true, clip the content of the cell to the boundaries of the cell.
column span
integer
read only
he number of columns that this cell spans
contents
objects
read/write
he text contents of the cell.
diagonal line in front
boolean
read/write
If true, the diagonal line will draw in front of the contents of the cell.
diagonal line stroke color
swatch
read/write
he stroke color of the diagonal line(s) applied to the cell.
diagonal line stroke gap color
swatch
read/write
he gap color of the diagonal line(s).
diagonal line stroke gap overprint
boolean
read/write
If true, overprint the color of the gap of the diagonal line(s).
diagonal line stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonal line stroke overprint
boolean
read/write
If true, overprint the diagonal line(s) applied to the cell.
InDesign CS Scripting Guide AppleScript Reference 353
Property:
Type:
Access:
Description:
diagonal line stroke tint
fixed
read/write
he tint applied to the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonal line stroke type
stroke style
read/write
he type of stroke applied to the diagonal line(s) of the cell.
diagonal line stroke weight
fixed or measurement string
read/write
he stroke weight of the diagonal line(s) of the cell.
fill color
swatch
read/write
he swatch, color, gradient, tint, or mixed ink applied to the fill of the cell.
fill tint
fixed
read/write
he tint percentage applied to the fill of the cell (-1 indicates 100%, or no tint override).
first baseline offset
ascent offset, cap height, leading offset, embox height, x height, fixed height
read/write
he method used to calculate the distance from the first baseline of text in the cell and the top inset of the cell.
gradient fill angle
fixed
read/write
Angle of a linear gradient on the fill
gradient fill length
fixed
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
gradient fill start
list of fixed or measurement strings {x, y}
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
height
fixed or measurement string
read/write
he height of the cell.
index
integer
read only
index of the cell within its parent table.
inner column stroke color
swatch
read/write
he stroke color of the inner column of the cell.
inner column stroke gap color
swatch
read/write
he gap color of the stroke applied to the inner column of the cell.
inner column stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the inner column of the cell.
inner column stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the inner column of the cell (-1 indicates 100%, or no tint override).
inner column stroke overprint
boolean
read/write
If true, overprint the stroke applied to the inner column of the cell.
inner column stroke tint
fixed
read/write
he tint applied to the stroke of the inner column of the cell (-1 indicates 100%, or no tint override).
inner column stroke type
stroke style
read/write
he type of stroke applied to the inner column of the cell.
inner column stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the inner column of the cell.
inner row stroke color
swatch
read/write
he stroke color of the inner row of the cell.
inner row stroke gap color
swatch
read/write
he gap color of the stroke applied to the inner row of the cell.
inner row stroke gap overprint
boolean
read/write
Whether to overprint the gap of the inner row
inner row stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the inner row of the cell (-1 indicates 100%, or no tint override).
inner row stroke overprint
boolean
read/write
If true, overprint the stroke applied to the inner row of the cell.
inner row stroke tint
fixed
read/write
he tint applied to the stroke of the inner row of the cell (-1 indicates 100%, or no tint override).
inner row stroke type
stroke style
read/write
he type of stroke applied to the inner row of the cell.
354
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
inner row stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the inner row of the cell.
keep with next row
boolean
read/write
If true, keep this row with the next row when the rows break between pages, text frames, or text columns.
let edge stroke color
swatch
read/write
he stroke color of the let edge of the cell.
let edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the let edge of the cell.
let edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the let edge of the cell.
let edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the let edge of the cell (-1 indicates 100%, or no tint override).
let edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the let edge of the cell.
let edge stroke priority
integer
read/write
he stroke priority of the let edge
let edge stroke tint
fixed
read/write
he tint of the color of the let edge
let edge stroke type
stroke style
read/write
he type of stroke applied to the let edge of the cell.
let edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the let edge of the cell.
let inset
fixed or measurement string
read/write
he let inset of the cell.
maximum height
fixed or measurement string
read/write
Specifies the maximum height of the row containing the cell.
minimum first baseline offset
fixed or measurement string
read/write
he minimum distance (in points) between the first baseline of the text in the cell and the top inset of the frame or cell.
minimum height
fixed or measurement string
read/write
Constrains the row height to an amount no smaller than this value. he row may be larger than this amount, however, as the row height will continue to grow automatically as text is added.
name
string
read only
he name of the cell, in the form row number; column number. he third cell of the fourth row, for example, would have the name “R4:C3”.
object reference
row
read only
An object reference to the object.
overflows
boolean
read only
If true, the cell contains overset (i.e., uncomposed) text.
overprint fill
boolean
read/write
If true, overprint the fill of the cell.
paragraph spacing limit
fixed or measurement string
read/write
When the vertical justification of the cell is set to justified, this is the maximum amount of space that will be added between paragraphs. Increase this value to encourage spacing between paragraphs of vertically justified text; decrease it to increase the leading between lines of text in vertically justified text.
parent
object
read only
he parent of the object.
parent column
column
read only
he parent column of the cell.
parent row
row
read only
he parent row of the cell.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right edge stroke color
swatch
read/write
he stroke color of the right edge of the cell.
InDesign CS Scripting Guide AppleScript Reference 355
Property:
Type:
Access:
Description:
right edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the right edge of the cell.
right edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the right edge of the cell.
right edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the right edge of the cell (-1 indicates 100%, or no tint override).
right edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the right edge of the cell.
right edge stroke priority
integer
read/write
he stroke priority of the right edge
right edge stroke tint
fixed
read/write
he tint applied to the stroke of the right edge of the cell (-1 indicates 100%, or no tint override).
right edge stroke type
stroke style
read/write
he type of stroke applied to the right edge of the cell.
right edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the right edge of the cell.
right inset
fixed or measurement string
read/write
he right inset the cell.
rotation angle
fixed
read/write
he rotation angle of the cell.
row span
integer
read only
he number of rows that this cell spans
row type
body row, header row, footer row, mixed state
read/write
he type of the row containing the cell.
start row
anywhere, next column, next frame, next page, next odd page, next even page
read/write
Where to start the row
text cell rotation follows story direction
boolean
read/write
Whether text cell direction matches the story direction
top edge stroke color
swatch
read/write
he stroke color of the top edge of the cell.
top edge stroke gap color
swatch
read/write
he gap color of the stroke applied to the top edge of the cell.
top edge stroke gap overprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the top edge of the cell.
top edge stroke gap tint
fixed
read/write
he tint applied to the gap color of the stroke applied to the top edge of the cell (-1 indicates 100%, or no tint override).
top edge stroke overprint
boolean
read/write
If true, overprint the stroke applied to the top edge of the cell.
top edge stroke priority
integer
read/write
he stroke priority of the top edge
top edge stroke tint
fixed
read/write
he tint applied to the stroke of the top edge of the cell (-1 indicates 100%, or no tint override).
top edge stroke type
stroke style
read/write
he type of stroke applied to the right edge of the cell.
top edge stroke weight
fixed or measurement string
read/write
he width of the stroke applied to the the top edge of the cell.
top inset
fixed or measurement string
read/write
he top inset the cell.
top let diagonal line
boolean
read/write
If true, draw a diagonal line from the top let corner to the bottom right corner of the cell .
top right diagonal line
boolean
read/write
If true, draw a diagonal line from the top right corner to the bottom let corner of the cell .
vertical justification
top align, center align, bottom align, justify align
read/write
he vertical justification applied to the text in the cell.
width
fixed or measurement string
read/write
he width of the cell.
356
AppleScript Reference
InDesign CS Scripting Guide
Methods Method: create outlines
delete make
merge
redistribute
search
select
split
unmerge
Parameters: Name:
Type:
Description:
[delete original]
boolean
If true, delete the original object.
None Name:
Type:
Description:
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater an existing row or at the beginning/end of a parent as row or table.
Name:
Type:
Description:
with
row
he cell to merge with.
Name:
Type:
Description:
using
horizontal, vertical
which direction to redistribute.
[thru]
row
redistribute till this object.
Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Name:
Type:
Description:
using
horizontal, vertical
Which direction to split.
None
Return:
Description:
objects
Create outlines from the text.
nothing
Deletes the object.
row
Create a new row.
row
Merge cells together.
nothing
Redistribute columns or rows.
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Select this row.
nothing
Split the cell either horizontally or vertically.
objects
Unmerge the cells.
InDesign CS Scripting Guide AppleScript Reference 357
section Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
continue numbering
boolean
read/write
If true, continue page numbering from the previous section.
id
integer
read only
A unique number identifying the object.
include section prefix
boolean
read/write
If true, include the section prefix as part of the page number.
index
integer
read only
index of the section within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
length
integer
read only
he number of pages in this section
marker
string
read/write
he section marker.
name
string
read/write
he name of the section.
object reference
section
read only
An object reference to the object.
page number start
integer
read/write
he number at which to start numbering pages (active when continue numbering property is set to false).
page number style
upper roman, lower roman, upper letters, lower letters, arabic
read/write
he type of numbering to use for page numbers in the section.
page start
page
read/write
he first page in the section.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
section
Create a new section.
extract label
insert label
make
358
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater an existing section or at the beginning/end of a parent as section or document.
AppleScript Reference
InDesign CS Scripting Guide
show hide fields behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
fields to hide
list of form fields
read/write
he fields to hide.
fields to show
list of form fields
read/write
he fields to show.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the show hide fields behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the show hide fields behavior.
object reference
show hide fields behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
show hide fields behavior
Create a new show hide fields behavior.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
InDesign CS Scripting Guide AppleScript Reference 359
sound Elements Element:
Refer to by:
image
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
class
type
read only
he class of the object.
description
string
read/write
Description
do not print poster
boolean
read/write
Does not print the sound poster
embed in PDF
boolean
read/write
Embed content in pdf
file path
file reference or file name as string
read/write
he file path
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the sound within its parent page item, oval, rectangle or polygon
item layer
layer
read/write
he layer containing the page item.
item link
link
read only
link to a placed file
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
locked
boolean
read/write
If true, the page item is locked.
name
string
read/write
he name of the sound.
object reference
sound
read only
An object reference to the object.
parent
object
read only
he parent of the page item.
play on page turn
boolean
read/write
Play on page turn
poster file
string
read/write
Poster file
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
sound poster type
none, standard, proxy image
read/write
Current poster type (‘proxy image’ is read-only)
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method:
Parameters:
Return:
Description:
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
360
AppleScript Reference
InDesign CS Scripting Guide
Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
sound
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Fit content within a graphic frame.
nothing
Sets the string associated with the given key (label name).
sound
Create a new sound.
nothing
Markup layout content with XML preserving the existing content.
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
nothing
Reset an item to 100% scaling, resizes to retain same appearance
extract label
fit
insert label
make
markup
move
reset scaling
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[layer]
layer or layer name as string
he layer on which to create the sound as layer.
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater this sound or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
Name:
Type:
Description:
using
xml element
he element to mark up.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
None
InDesign CS Scripting Guide AppleScript Reference 361
Method: resize
select
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Select this sound.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
store
unlink
362
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
sound behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the sound behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the sound behavior.
object reference
sound behavior
read only
An object reference to the object.
operation
play, stop, pause, resume
read/write
he operation to perform when the sound behavior is activated.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
sound item
sound
read/write
he sound page item.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
sound behavior
Create a new sound behavior.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 363
spell preference Properties Property:
Type:
Access:
Description:
check capitalized sentences
boolean
read/write
If true, check the spelling of capitalized sentences.
check capitalized words
boolean
read/write
If true, check the spelling of capitalized words.
check misspelled words
boolean
read/write
If true, check misspelled words.
check repeated words
boolean
read/write
If true, check for repeated words.
class
type
read only
he class of the object.
object reference
spell preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
364
AppleScript Reference
InDesign CS Scripting Guide
spread Elements Element:
Refer to by:
button
index, name, range, relative, test, id
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
guide
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items on the spread, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
applied master
master spread
read/write
he master spread applied to the spread.
class
type
read only
he class of the object.
flattener override
default, none, custom
read/write
he transparency flattener override applied to the spread (if any).
flattener preferences
flattener preference
read only
he transparency flattener preferences for the spread.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the spread within the document.
keep together
boolean
read/write
If true, the pages of the spread should stay together when pages are added or removed before the spread.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
object reference
spread
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
show master items
boolean
read/write
If true, display items on the master spread.
InDesign CS Scripting Guide AppleScript Reference 365
Methods Method: create guides
Parameters: Name:
Type:
Description:
[number of rows]
integer
Number of rows of guides on a page.
[number of columns]
integer
Number of columns of guides on a page.
[row gutter]
fixed or measurement string
he amount of gutter between rows.
[column gutter]
fixed or measurement string
he amount of gutter between columns.
[guide color]
list of fixed {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
he guideÕs color.
[fit margins]
boolean
Whether the guides should fit to margins or fit to page.
[remove existing]
boolean
If true, remove existing guides.
[layer]
layer or layer name as string
he layer on which to create the spread as layer.
Return:
Description:
nothing
Create multiple guides on all pages of a spread.
delete
None
nothing
Deletes the object.
duplicate
None
spread
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
spread
Create a new spread.
spread
Move the spread before/ater another spread or page, or to the beginning/end of a document.
extract label
insert label
make
move
366
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater an existing spread or at the beginning/end of a parent as spread or document.
Name:
Type:
Description:
[to]
before, ater, at beginning, at end
Location.
[reference]
spread or page
A spread, page or document. Before/ater the spread/page or at the beginning/end of the document.
AppleScript Reference
InDesign CS Scripting Guide
Method: place
remove override
Parameters: Name:
Type:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
None
Description:
Return:
Description:
object
Place a file.
nothing
Removes a locally overriden master page item
InDesign CS Scripting Guide AppleScript Reference 367
state Elements Element:
Refer to by:
EPS
index, name, range, relative, test, id
graphic
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
image
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
PDF
index, name, range, relative, test, id
PICT
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
text frame
index, name, range, relative, test, id
WMF
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
active
boolean
read/write
If true, the state is the active state.
class
type
read only
he class of the object.
enabled
boolean
read/write
If true, the state is enabled for pdf generation.
id
integer
read only
he state’s unique id
index
integer
read only
index of the state within its parent button
name
string
read only
he name of the state.
object reference
state
read only
An object reference to the object.
parent
button
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
statetype
up, rollover, down
read/write
he state type of the state.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
make
None
state
Create a new state.
368
AppleScript Reference
InDesign CS Scripting Guide
Description:
static text Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the static text within its parent dialog column, dialog row, enabling group or border panel
min width
fixed
read/write
he minimum width of the control.
object reference
static text
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
static label
string
read/write
he text in the static label control.
Methods Method:
Parameters:
Return:
Description:
make
None
static text
Create a new static text.
InDesign CS Scripting Guide AppleScript Reference 369
story Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
nested style
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
tab stop
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
associated XML elements
list of XML elements
read only
he XML elements associated with this text object (if any).
370
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
InDesign CS Scripting Guide AppleScript Reference 371
Property:
Type:
Access:
Description:
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradient stroke angle
fixed
read/write
he angle of the gradient applied to the stroke of the text.
gradient stroke length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the story within its parent XML element or document
item link
link
read only
link to a placed file
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
372
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
label
string
read/write
A label that can be set to any string
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
story
read only
An object reference to the object.
open type features
list of integers
read/write
open type features
InDesign CS Scripting Guide AppleScript Reference 373
Property:
Type:
Access:
Description:
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
374
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
story preferences
story preference
read only
he story preferences for the story. he properties of this object correspond to the options in the story palette.
strike through color
swatch or string
read/write
he stroke color of the strike through.
InDesign CS Scripting Guide AppleScript Reference 375
Property:
Type:
Access:
Description:
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this story. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
376
AppleScript Reference
InDesign CS Scripting Guide
Methods Method: changecase
create outlines
delete export
extract label
insert label
markup
move
place xml
Parameters: Name:
Type:
Description:
using
uppercase, lowercase, titlecase, sentencecase
Case option to use.
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original text.
None Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he full path to the exported file.
[showing options]
boolean
If true, display the Export dialog box.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
XML element
he XML element to associate with the text.
Name:
Type:
Description:
to
before, ater, at end, at beginning, unknown
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
using
XML element
he element to place into.
Return:
Description:
nothing
Change the case of text.
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Deletes the object.
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
nothing
Places XML content from the specified element replacing the existing content.
InDesign CS Scripting Guide AppleScript Reference 377
Method: search
story edit
378
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
None
AppleScript Reference
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
InDesign CS Scripting Guide
Edit the story in a story editor window
story preference Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
object reference
story preference
read only
An object reference to the object.
optical margin alignment
boolean
read/write
If true, adjust the position of characters at the edges of text columns. In general, the edges of punctuation characters will “hang” beyond the edges of the text column, but other characters are also adjusted.
optical margin size
fixed
read/write
A point size used as a base for calculating how far characters should hang outside the margins when optical margin alginment is on.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
InDesign CS Scripting Guide AppleScript Reference 379
story window Properties Property:
Type:
Access:
Description:
bounds
list of numbers or measurement strings {top, let, bottom, right}
read/write
he bounds of the story window, in the format (top, let, bottom, right)
class
type
read only
he class descriptor type
index
integer
read only
index of the story window within its parent document or application
name
string
read only
he name of the story window
object reference
story window
read only
An object reference for this story window
parent
object
read only
he story window’s parent. Can return: document or application.
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
selection
list
read/write
he selection of the front-most window. Can return: object, list of objects or nothing.
Methods Method:
Parameters:
Return:
Description:
bring to front
None
nothing
Brings the object to the top
close
None
nothing
Close the StoryWindow
maximize
None
nothing
Maximize the window
minimize
None
nothing
Minimize the window
restore
None
nothing
Restore the window
nothing
Select one or more objects.
select
380
Name:
Type:
Description:
selectable items
object or list of objects, or nothing to deselect all
he objects to select.
[existing selection]
replace, add to, remove from
How to handle the existing selection.
AppleScript Reference
InDesign CS Scripting Guide
striped stroke style Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the striped stroke style within its parent document or application
name
string
read/write
he name of the striped stroke style.
object reference
striped stroke style
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
stripe array
list of fixed
read/write
A list defining the stripe and gap of the striped stroke style.
stroke style type
string
read only
he stroke style type.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
make
None
striped stroke style
Create a new striped stroke style.
InDesign CS Scripting Guide AppleScript Reference 381
stroke style Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the stroke style within its parent document or application
name
string
read/write
he name of the stroke style.
object reference
stroke style
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
stroke style type
string
read only
he type of the stroke style.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
382
AppleScript Reference
InDesign CS Scripting Guide
subtopic Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
index
integer
read only
index of the subtopic within its parent topic
name
string
read/write
he name of the subtopic.
object reference
subtopic
read only
An object reference to the object.
parent
topic
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
sort order
string
read/write
he sort order text of the subtopic.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
subtopic
Create a new subtopic.
subtopic
Move the subtopic to another index location in the subtopics collection.
make
move
Name:
Type:
Description:
name
string
subtopic name.
[sort order]
string
sort order as string.
Name:
Type:
Description:
to
integer
the location to insert.
Description:
InDesign CS Scripting Guide AppleScript Reference 383
SVG export preference Properties Property:
Type:
Access:
Description:
applied flattener preset
flattener preset
read/write
he flattener preset
class
type
read only
he class of the object.
embed images
boolean
read/write
If true, embed bitmap images in the exported SVG file.
file encoding
ASCII, UTF8, UTF16
read/write
he file encoding to use.
font subsetting
none, subset glyphs, subset english, subset glyphs and english, subset roman, subset glyphs and roman, subset entire
read/write
he method used to subset fonts saved in the exported SVG file.
ignore spread overrides
boolean
read/write
If true, ignore flattener spread overrides when exporting the SVG file.
object reference
SVG export preference
read only
An object reference to the object.
page range
string or ‘all’
read/write
he range of pages to export.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
readers spreads
boolean
read/write
If true, export reader’s spreads.
real precision
integer
read/write
Number of digits of precision for real numbers.
rendering style
progressive, batch
read/write
he rendering style to use in the exported SVG file.
style format
inline, entity, css, presentation attributes
read/write
he format used to specify SVG object styles.
384
AppleScript Reference
InDesign CS Scripting Guide
swatch Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the swatch within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the swatch.
object reference
swatch
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
swatch
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Merge one or more other swatches into this one.
extract label
insert label
merge
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
swatch
he swatches to merge.
Description:
InDesign CS Scripting Guide AppleScript Reference 385
synchronize option Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
group name
string
read only
he name of the group this book synchronize option style appears in.
index
integer
read only
index of the synchronize option within its parent book
name
string
read only
he name of the XML tag
object reference
synchronize option
read only
An object reference to the object.
parent
book
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
use style
boolean
read/write
If true, use the book synchronize option style during a synchronize.
386
AppleScript Reference
InDesign CS Scripting Guide
tab stop Properties Property:
Type:
Access:
Description:
alignment
let align, center align, right align, character align
read/write
he alignment of the tab stop.
alignment character
string
read/write
he tab stop alignment character.
class
type
read only
he class of the object.
index
integer
read only
index of the tab stop within its parent text default, paragraph, paragraph style, text, character, word, line, text column, text style range, insertion point or story
leader
string
read/write
he tab stop leader
object reference
tab stop
read only
An object reference to the object.
parent
object
read only
he parent of the object.
position
fixed or measurement string
read/write
he position of the tab stop on the text ruler.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
make
None
tab stop
Create a new tab stop.
InDesign CS Scripting Guide AppleScript Reference 387
table Elements Element:
Refer to by:
button
index, name, range, relative, test, id
cell
index, name, range, relative, test, id
column
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
row
index, name, range, relative, test
text frame
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items contained by this object, regardless of their location in the object hierarchy (i.e., including objects nested within other objects, such as groups).
alternating fills
no alternating pattern, alternating rows, alternating columns
read/write
What alternating fills pattern we use
body row count
integer
read/write
Number of table body rows
bottom border stroke color
swatch
read/write
he color of the table’s bottom border
bottom border stroke gap color
swatch
read/write
he gap color of the table’s bottom border
bottom border stroke gap overprint
boolean
read/write
Whether to overprint the gap of the table’s bottom border
bottom border stroke gap tint
fixed
read/write
he gap tint of the gap color of the table’s bottom border
bottom border stroke overprint
boolean
read/write
Whether to overprint the table’s bottom border
bottom border stroke tint
fixed
read/write
he tint of the color of the table’s bottom border
bottom border stroke type
stroke style
read/write
he stroke type of the table’s bottom border
bottom border stroke weight
fixed or measurement string
read/write
he stroke weight of the table’s bottom border
break footers
in all text columns, once per text frame, once per page
read/write
Where to put the footers
break headers
in all text columns, once per text frame, once per page
read/write
Where to put the headers
class
type
read only
he class of the object.
column count
integer
read/write
he number of columns
column fills priority
boolean
read/write
Whether to disaply column alternating fills or row alternating fills
contents
objects
read/write
he text contents of the cell.
388
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
end column fill color
swatch
read/write
he fill color of columns in the second alternating fill group
end column fill count
integer
read/write
he number of columns in the second alternating fills group
end column fill overprint
boolean
read/write
Whether to overprint the columns in the second alternating fills group
end column fill tint
fixed
read/write
he tint of the color of columns in the second alternating fills group
end column line style
stroke style
read/write
he stroke type of columns in the second alternating strokes group
end column stroke color
swatch
read/write
he stroke color of columns in the second alternating strokes group
end column stroke count
integer
read/write
he number of columns in the second alternating strokes group
end column stroke gap color
swatch
read/write
he stroke gap color of columns in the second alternating strokes group
end column stroke gap overprint
boolean
read/write
Whether to overprint the gap of the columns in the second alternating strokes group
end column stroke gap tint
fixed
read/write
he gap tint of the gap color of columns in the second alternating strokes group
end column stroke overprint
boolean
read/write
Whether to overprint the columns in the second alternating strokes group
end column stroke tint
fixed
read/write
he tint of the color of columns in the second alternating strokes group
end column stroke weight
fixed or measurement string
read/write
he stroke weight of columns in the second alternating strokes group
end row fill color
swatch
read/write
he fill color of rows in the second alternating fills group
end row fill count
integer
read/write
he number of rows in the second alternating fills group
end row fill overprint
boolean
read/write
Whether to overprint the rows in the second alternating fills group
end row fill tint
fixed
read/write
he tint of the color of rows in the second alternating fills group
end row stroke color
swatch
read/write
he stroke color of rows in the second alternating strokes group
end row stroke count
integer
read/write
he number of rows in the second alternating strokes group
end row stroke gap color
swatch
read/write
he stroke gap color of rows in the second alternating strokes group
end row stroke gap overprint
boolean
read/write
Whether to overprint the gap of the rows in the second alternating strokes group
end row stroke gap tint
fixed or measurement string
read/write
he gap tint of the gap color of rows in the second alternating strokes group
end row stroke overprint
boolean
read/write
Whether to overprint the rows in the second alternating strokes group
end row stroke tint
fixed or measurement string
read/write
he tint of the color of rows in the second alternating strokes group
end row stroke type
stroke style
read/write
he stroke type of rows in the second alternating strokes group
end row stroke weight
fixed or measurement string
read/write
he stroke weight of rows in the second alternating strokes group
footer row count
integer
read/write
Number of table footer rows
header row count
integer
read/write
Number of table header rows
height
fixed or measurement string
read/write
he height of the cell.
InDesign CS Scripting Guide AppleScript Reference 389
Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the cell within its parent table.
label
string
read/write
A label that can be set to any string
let border stroke color
swatch
read/write
he color of the table’s let border
let border stroke gap color
swatch
read/write
he gap color of the table’s let border
let border stroke gap overprint
boolean
read/write
Whether to overprint the gap of the table’s let border
let border stroke gap tint
fixed
read/write
he gap tint of the gap color of the table’s let border
let border stroke overprint
boolean
read/write
Whether to overprint the table’s let border
let border stroke tint
fixed
read/write
he tint of the color of the table’s let border
let border stroke type
stroke style
read/write
he stroke type of the table’s let border
let border stroke weight
fixed or measurement string
read/write
he stroke weight of the table’s let border
object reference
table
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right border stroke color
swatch
read/write
he color of the table’s right border
right border stroke gap color
swatch
read/write
he gap color of the table’s right border
right border stroke gap overprint
boolean
read/write
Whether to overprint the gap of the table’s right border
right border stroke gap tint
fixed
read/write
he gap tint of the color of the table’s right border
right border stroke overprint
boolean
read/write
Whether to overprint the table’s right border
right border stroke tint
fixed
read/write
he tint of the color of the table’s right border
right border stroke type
stroke style
read/write
he stroke type of the table’s right border
right border stroke weight
fixed or measurement string
read/write
he stroke weight of the table’s right border
skip first alternating fill columns
integer
read/write
he number of first columns to skip when alternating fills
skip first alternating fill rows
integer
read/write
he number of first rows to skip when alternating fills
skip first alternating stroke columns
integer
read/write
he number of first columns to skip when alternating strokes
skip first alternating stroke rows
integer
read/write
he number of first rows to skip when alternating strokes
skip first header
boolean
read/write
Whether to skip the first occurrence of the headers
skip last alternating fill columns
integer
read/write
he number of last columns to skip when alternating fills
skip last alternating fill rows
integer
read/write
he number of last rows to skip when alternating fills
skip last alternating stroke columns
integer
read/write
he number of last columns to skip when alternating strokes
390
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
skip last alternating stroke rows
integer
read/write
he number of last rows to skip when alternating strokes
skip last footer
boolean
read/write
Whether to skip the last occurrence of the footers
space ater
fixed or measurement string
read/write
Space ater
space before
fixed or measurement string
read/write
Space before
start column fill color
swatch
read/write
he fill color of columns in the first alternating fills group
start column fill count
integer
read/write
he number of columns in the first alternating fills group
start column fill overprint
boolean
read/write
Whether to overprint the columns in the first alternating fills group
start column fill tint
fixed
read/write
he tint of the color of columns in the first alternating fills group
start column stroke color
swatch
read/write
he stroke color of columns in the first alternating strokes group
start column stroke count
integer
read/write
he number of columns in the first alternating strokes group
start column stroke gap color
swatch
read/write
he stroke gap color of columns in the first alternating strokes group
start column stroke gap overprint
boolean
read/write
Whether to overprint the gap of the columns in the first alternating strokes group
start column stroke gap tint
fixed
read/write
he gap tint of the gap color of columns in the first alternating strokes group
start column stroke overprint
boolean
read/write
Whether to overprint the columns in the first alternating strokes group
start column stroke tint
fixed
read/write
he tint of the color of columns in the first alternating strokes group
start column stroke type
stroke style
read/write
he stroke type of columns in the first alternating strokes group
start column stroke weight
fixed or measurement string
read/write
he stroke weight of columns in the first alternating strokes group
start row fill color
swatch
read/write
he fill color of rows in the first alternating fills group
start row fill count
integer
read/write
he number of rows in the first alternating fills group
start row fill overprint
boolean
read/write
Whether to overprint the rows in the first alternating fills group
start row fill tint
fixed
read/write
he tint of the color of rows in the first alternating fills group
start row stroke color
swatch
read/write
he stroke color of rows in the first alternating strokes group
start row stroke count
integer
read/write
he number of rows in the first alternating strokes group
start row stroke gap color
swatch
read/write
he stroke gap color of rows in the first alternating strokes group
start row stroke gap overprint
boolean
read/write
Whether to overprint the gap of the rows in the first alternating strokes group
start row stroke gap tint
fixed
read/write
he gap tint of the gap color of rows in the first alternating strokes group
start row stroke overprint
boolean
read/write
Whether to overprint the rows in the first alternating strokes group
start row stroke tint
fixed
read/write
he tint of the color of rows in the first alternating strokes group
start row stroke type
stroke style
read/write
he stroke type of rows in the first alternating strokes group
InDesign CS Scripting Guide AppleScript Reference 391
Property:
Type:
Access:
Description:
start row stroke weight
fixed or measurement string
read/write
he stroke weight of rows in the first alternating strokes group
story offset
integer
read only
he location of the object from the beginning of the story
stroke order
row on top, column on top, best joins, indesign 2 compatibility
read/write
Whether to draw columns on top if true or rows on top if false
top border stroke color
swatch
read/write
he color of the table’s top border
top border stroke gap color
swatch
read/write
he gap color of the table’s top border
top border stroke gap overprint
boolean
read/write
Whether to overprint the gap of the table’s top border
top border stroke gap tint
fixed
read/write
he gap tint of the gap color of the table’s top border
top border stroke overprint
boolean
read/write
Whether to overprint the table’s top border
top border stroke tint
fixed
read/write
he tint of the color of the table’s top border
top border stroke type
stroke style
read/write
he stroke type of the table’s top border
top border stroke weight
fixed or measurement string
read/write
he stroke weight of the top border of the table
width
fixed or measurement string
read/write
he width of the cell.
Methods Method: convert to text
create outlines
delete make
392
Parameters: Name:
Type:
Description:
[column separator]
string
he character to interpret as the column separator.
[row separator]
string
he character to interpret as the row separator.
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original object.
None Name:
Type:
Description:
[to]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater an existing table or at the beginning/end of a parent as table, textFrame, text, character, word, line, paragraph, textcolumn, insertion point, story, cell or textStyleRange.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
text
Convert to text.
objects
Create outlines from the text.
nothing
Deletes the object.
table
Create a new table.
Method: search
select
unmerge
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
None
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Select this table.
objects
Unmerge the cells.
InDesign CS Scripting Guide AppleScript Reference 393
tagged text export preference Properties Property:
Type:
Access:
Description:
character set
ASCII, ansi, unicode, shit JIS
read/write
he character set to use when exporting tagged text.
class
type
read only
he class of the object.
object reference
tagged text export preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
tag form
verbose, abbreviated
read/write
he tag form to use when exporting tagged text.
394
AppleScript Reference
InDesign CS Scripting Guide
tagged text import preference Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
object reference
tagged text import preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Remove Text Formatting
boolean
read/write
Whether to remove text formatting or not
style conflict
publication definition, tag file definition
read/write
What to do when style definitions in the incoming tagged text file conflict with definitions of styles having the same names in the current publication.
Use Typographers Quotes
boolean
read/write
Whether to use Typographer’s quotes or not
InDesign CS Scripting Guide AppleScript Reference 395
text Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
nested style
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
tab stop
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
396
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ascent
fixed
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associated XML elements
list of XML elements
read only
he XML elements associated with this text object (if any).
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
fixed
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
fixed
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
InDesign CS Scripting Guide AppleScript Reference 397
Property:
Type:
Access:
Description:
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradient stroke angle
fixed
read/write
he angle of the gradient applied to the stroke of the text.
gradient stroke length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal offset
fixed
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
398
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
index
integer
read only
index of the object within its parent object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
InDesign CS Scripting Guide AppleScript Reference 399
Property:
Type:
Access:
Description:
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
text
read only
An object reference to the object.
open type features
list of long
read/write
open type features
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
parent story
story
read only
he story containing the text object.
parent text frame
text frame
read only
he text frame containing the text object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
400
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
InDesign CS Scripting Guide AppleScript Reference 401
Property:
Type:
Access:
Description:
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this text. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
402
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method: apply style
changecase
convert to table
create outlines
delete
Parameters: Name:
Type:
Description:
using
character style, paragraph style, or string
he paragraph style or character style to apply.
[clearing overrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
uppercase, lowercase, titlecase, sentencecase
Case option to use.
Name:
Type:
Description:
[column separator]
string
he character to interpret as the column separator.
[row separator]
string
he character to interpret as the row separator.
[number of columns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original text.
None
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Deletes the object.
InDesign CS Scripting Guide AppleScript Reference 403
Method: export
markup
move
place
404
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he full path to the exported file.
[showing options]
boolean
If true, display the Export dialog box.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
using
XML element
he XML element to associate with the text.
Name:
Type:
Description:
to
before, ater, at end, at beginning, unknown
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he location (in page coordinates) at which to place the incoming file.
[destination layer]
layer or layer name as string
he layer on which to place the incoming file.
[showing options]
boolean
If true, display the import options dialog box for the file type being placed.
[autoflowing]
boolean
If true, autoflow the incoming text.
[retaining formatting]
boolean
If true, retain the formatting of the incoming text. If false, place the text using the document’s default text formatting attributes.
[converting quotes]
boolean
If true, convert typewriter (“straight”) quotation marks to typographic (“curly”) quotation marks.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
object
Place a file.
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects text.
InDesign CS Scripting Guide AppleScript Reference 405
text column Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
nested style
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
tab stop
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
406
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ascent
fixed
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associated XML elements
list of XML elements
read only
he XML elements associated with this text object (if any).
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
fixed
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
fixed
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
InDesign CS Scripting Guide AppleScript Reference 407
Property:
Type:
Access:
Description:
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradient stroke angle
fixed
read/write
he angle of the gradient applied to the stroke of the text.
gradient stroke length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal offset
fixed
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
408
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
index
integer
read only
index of the object within its parent object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
InDesign CS Scripting Guide AppleScript Reference 409
Property:
Type:
Access:
Description:
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
text column
read only
An object reference to the object.
open type features
list of integers
read/write
open type features
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
parent story
story
read only
he story containing the text object.
parent text frame
text frame
read only
he text frame containing the text object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
410
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
InDesign CS Scripting Guide AppleScript Reference 411
Property:
Type:
Access:
Description:
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this text column. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
412
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method: apply style
changecase
convert to table
create outlines
delete
Parameters: Name:
Type:
Description:
using
character style, paragraph style, or string
he paragraph style or character style to apply.
[clearing overrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
uppercase, lowercase, titlecase, sentencecase
Case option to use.
Name:
Type:
Description:
[column separator]
string
he character to interpret as the column separator.
[row separator]
string
he character to interpret as the row separator.
[number of columns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original text.
None
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Deletes the object.
InDesign CS Scripting Guide AppleScript Reference 413
Method: export
markup
move
place
414
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he full path to the exported file.
[showing options]
boolean
If true, display the Export dialog box.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
using
XML element
he XML element to associate with the text.
Name:
Type:
Description:
to
before, ater, at end, at beginning
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he location (in page coordinates) at which to place the incoming file.
[destination layer]
layer or layer name as string
he layer on which to place the incoming file.
[showing options]
boolean
If true, display the import options dialog box for the file type being placed.
[autoflowing]
boolean
If true, autoflow the incoming text.
[retaining formatting]
boolean
If true, retain the formatting of the incoming text. If false, place the text using the document’s default text formatting attributes.
[converting quotes]
boolean
If true, convert typewriter (“straight”) quotation marks to typographic (“curly”) quotation marks.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
object
Place a file.
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects text.
InDesign CS Scripting Guide AppleScript Reference 415
text default Elements Element:
Refer to by:
nested style
index, name, range, relative, test
tab stop
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
416
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
InDesign CS Scripting Guide AppleScript Reference 417
Property:
Type:
Access:
Description:
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
418
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
text default
read only
An object reference to the object.
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
InDesign CS Scripting Guide AppleScript Reference 419
Property:
Type:
Access:
Description:
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
420
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list
read/write
A list of all of the properties of all of the tab stops on this text default. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
InDesign CS Scripting Guide AppleScript Reference 421
Property:
Type:
Access:
Description:
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
422
AppleScript Reference
InDesign CS Scripting Guide
text editbox Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
edit contents
string
read/write
he text in the text edit field of the control.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the text editbox within its parent dialog column, dialog row, enabling group or border panel
min width
fixed
read/write
he minimum width of the control.
object reference
text editbox
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
make
None
text editbox
Create a new text editbox.
InDesign CS Scripting Guide AppleScript Reference 423
text export preference Properties Property:
Type:
Access:
Description:
character set
unicode, default platform
read/write
he character set to use when exporting plain text.
class
type
read only
he class of the object.
object reference
text export preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
platform
macintosh, PC
read/write
he platform character set to use when exporting plain text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
424
AppleScript Reference
InDesign CS Scripting Guide
text frame Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
path
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text path
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associated XML element
list of XML elements
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
content type
unassigned, graphic type, text type
read/write
he type of content
contents
string
read/write
he text frame’s contents
InDesign CS Scripting Guide AppleScript Reference 425
Property:
Type:
Access:
Description:
corner effect
none, rounded corner, inverse rounded corner, inset corner, bevel corner, fancy corner
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
corner radius
fixed
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
end cap
butt end cap, round end cap, projecting end cap
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
end join
miter end join, round end join, bevel end join
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
end text frame
object
read only
he last text frame in the thread
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fill tint
fixed
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gap color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gap tint
fixed
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradient fill angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
gradient fill length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradient stroke angle
fixed
read/write
he angle of a linear gradient applied to the fill of the page item.
426
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradient stroke length
fixed
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the text frame within its parent
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item layer
layer
read/write
he layer containing the page item.
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
let line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miter limit
fixed
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
next text frame
object
read/write
he next text frame in the thread
nonprinting
boolean
read/write
If true, the page item is non-printing.
object reference
text frame
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overflows
boolean
read only
Whether the frame has overset text. When true, there is more text in the story but no remaining text frames in which to place it
overprint fill
boolean
read/write
If true, the fill of the page item will overprint.
overprint gap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprint stroke
boolean
read/write
If true, overprint the stroke of the page item.
InDesign CS Scripting Guide AppleScript Reference 427
Property:
Type:
Access:
Description:
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overridden master page item
page item
read only
A reference to the master page item linked to the page item (if any).
parent
object
read only
he parent of the page item.
parent story
story
read only
he related story
previous text frame
object
read/write
he previous text frame in the thread
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right line end
none, simple arrow head, simple wide arrow head, triangle arrow head, triangle wide arrow head, barbed arrow head, curved arrow head, circle arrow head, circle solid arrow head, square arrow head, square solid arrow head, bar arrow head
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
start text frame
object
read only
he first text frame in the thread
stroke alignment
center alignment, inside alignment, outside alignment
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
stroke color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
428
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
stroke corner adjustment
none, dashes, gaps, dashes and gaps
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
stroke dash and gap
list of fixed or measurement strings {dash, gap, ...}
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
stroke tint
fixed
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
stroke type
stroke style
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
stroke weight
fixed
read/write
he weight (in points) of the stroke applied to the page item.
text frame index
integer
read only
index of the text frame in its thread of linked frames
text frame preferences
text frame preference
read only
text frame preferences
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: add path
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Return:
Description:
page item
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
bring forward
None
nothing
Brings the object forward.
bring to front
None
nothing
Brings the object to the top
objects
Create outlines from the text.
Deletes the object.
create outlines
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original objects.
delete
None
nothing
duplicate
None
object
Duplicates the object.
page item
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
exclude overlap path
Name:
Type:
Description:
with
list of objects
he objects to exclude.
InDesign CS Scripting Guide AppleScript Reference 429
Method: export
Parameters: Name:
Type:
Description:
format
string (name of export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
content to frame, frame to content, center content, proportionally
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
list of objects
he objects to intersect with.
Name:
Type:
Description:
[layer]
layer or layer name as string
he layer on which to create the textFrame as layer.
[at]
before, ater, at end, at beginning, unknown
Location.
[reference]
object
Before/ater this textFrame or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
make compound path
Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
XML element
he element to mark up.
extract label
fit
insert label
intersect path
make
430
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Exports the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Fit content within a graphic frame.
nothing
Sets the string associated with the given key (label name).
page item
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
text frame
Create a new text frame.
page item
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
Method: minus back
move
override
place
place xml
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destination page
page
he page on which to override the master page item.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point where to place the object (only applicable if you are telling a page or spread to place).
[destination layer]
layer or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
Any settable property of the placed object.
Name:
Type:
Description:
using
XML element
he element to place into.
Return:
Description:
page item
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
page item
Overrides an item from the master page and places it on the page.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
release compound path
None
objects
release compound path.
remove override
None
nothing
Removes a locally overriden master page item
reset scaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
InDesign CS Scripting Guide AppleScript Reference 431
Method: resize
rotate
scale text attributes
432
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he percentage of horizontal scale.
[vertical scale]
fixed
he percentage of vertical scale.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around, either one of the enums or an x,y value.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to rotate around, either one of the enums or an x,y value.
[considering current rotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are rotated.
[considering parents rotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
None
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
nothing
Move a text frame’s scaling into the text attributes
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Select this text frame.
send backward
None
nothing
Sends the object backward.
send to back
None
nothing
Send object to the back
nothing
Shear the page item.
asset
Store a page item in a library.
shear
store
Name:
Type:
Description:
by
number
angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
the point to shear around, either one of the enums or an x,y value.
[considering current shear]
boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
if true then both the object and items within it are sheared.
[considering parents shear]
boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
InDesign CS Scripting Guide AppleScript Reference 433
Method: subtract path
unlink
434
Parameters: Name:
Type:
Description:
with
list of objects
he objects to merge with this object.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
page item
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
text frame preference Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
first baseline offset
ascent offset, cap height, leading offset, embox height, x height, fixed height
read/write
he method used to calculate the distance between the first baseline of text in the text frame and the top inset of the text frame.
ignore wrap
boolean
read/write
If true, the text in the text frame ignores the text wrap of other objects.
inset spacing
list or fixed or measurement strings
read/write
he text inset of the text frame. For rectangular text frames, this property contains a four-item list; for non-rectangular text frames, the property contains a single value.
minimum first baseline offset
fixed or measurement string
read/write
he minimum distance in points between the baseline of the first line of text in the text frame and the top inset of the text frame.
object reference
text frame preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
text column count
integer
read/write
he number of columns in the text frame.
text column fixed width
fixed or measurement string
read/write
he fixed column width of the text frame.
text column gutter
fixed or measurement string
read/write
he distance between the columns of the text frame.
use fixed column width
boolean
read/write
If true, the columns of the text frame are a fixed width.
vertical justification
top align, center align, bottom align, justify align
read/write
he type of vertical justification applied to the text frame.
vertical threshold
fixed or measurement string
read/write
he maximum amount of vertical space between two paragraphs.
InDesign CS Scripting Guide AppleScript Reference 435
text import preference Properties Property:
Type:
Access:
Description:
character set
ansi, ASCII, unicode, RecommendShitJIS83pv, ShitJIS90pv, ShitJIS90ms, GB2312, chinese big 5, macintosh CE, macintosh cyrillic, macintosh greek, macintosh turkish, windows cyrillic, windows EE, windows greek, windows turkish, DOS latin 2
read/write
he character set to use.
class
type
read only
he class of the object.
convert spaces into tabs
boolean
read/write
If true, convert sequentially repeating spaces to tabs.
dictionary
string
read/write
language to use.
object reference
text import preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
platform
macintosh, PC
read/write
he platform character set to use when exporting plain text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
spaces into tabs count
integer
read/write
he number of sequential spaces to convert to a tab.
strip returns between lines
boolean
read/write
If true, remove extra carriage returns at the ends of lines.
strip returns between paragraphs
boolean
read/write
If true, remove extra carriage returns between paragraphs.
436
AppleScript Reference
InDesign CS Scripting Guide
text path Elements Element:
Refer to by:
character
index, name, range, relative, test
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
paragraph
index, name, range, relative, test
text
index, name, range, relative, test
text column
index, name, range, relative, test
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
center bracket
fixed
read only
he center bracket.
class
type
read only
he class of the object.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
end bracket
fixed
read/write
he end bracket.
end text frame
object
read only
he last text frame in the thread.
flip path effect
not flipped, flipped, undefined flip value
read/write
he flip path effect.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the object within its parent object.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
next text frame
object
read/write
he next text frame in the thread.
object reference
text path
read only
An object reference to the object.
overflows
boolean
read only
If true, the text path contains overset text.
parent
object
read only
he parent of the object.
parent story
story
read only
he related story
path alignment
top path alignment, bottom path alignment, center path alignment
read/write
he path alignment.
path effect
rainbow path effect, skew path effect, ribbon path effect, stair step path effect, gravity path effect
read/write
he path effect.
path spacing
integer
read/write
he path spacing.
previous text frame
object
read/write
he previous text frame in the thread.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
start bracket
fixed
read/write
he start bracket.
start text frame
object
read only
he first text frame in the thread.
text alignment
ascender text alignment, descender text alignment, center text alignment, baseline text alignment, above right em box text alignment, below let em box text alignment, above right icf box text alignment, below let icf box text alignment
read/write
he text alignment.
text frame index
integer
read only
index of the text frame in its thread of linked frames.
InDesign CS Scripting Guide AppleScript Reference 437
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
text path
Create a new text path.
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
extract label
insert label
make search
438
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
AppleScript Reference
InDesign CS Scripting Guide
You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
text preference Properties Property:
Type:
Access:
Description:
abut text to text wrap
boolean
read/write
If true, text will abut the bottom of a text wrap object.
baseline shit key increment
fixed
read/write
he amount of baseline shit each press of the shit-option/alt-up arrow or shit-option/alt-down arrow increases or decreases.
class
type
read only
he class of the object.
highlight custom spacing
boolean
read/write
If true, use on-screen highlighting to identify custom spacing.
highlight hj violations
boolean
read/write
If true, use on-screen highlighting to identify hyphenation and justification violations.
highlight keeps
boolean
read/write
If true, use on-screen highlighting to identify paragraphs that violate keep options.
highlight substituted fonts
boolean
read/write
If true, to highlight text formatted using missing fonts.
highlight substituted glyphs
boolean
read/write
If true, use on-screen highlighting to identify substituted glyphs.
justify text wraps
boolean
read/write
If true, to justify text where it wraps around other objects.
kerning key increment
fixed
read/write
he amount of kerning each press of the option/alt-right arrow or option/alt-let arrow increases or decreases.
leading key increment
fixed
read/write
he amount of leading each press of the option/alt-up arrow or option/alt-down arrow increases or decreases.
link text files when importing
boolean
read/write
Whether text files should be linked when importing
object reference
text preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
scaling adjusts text
boolean
read/write
If true, scaling adjusts text attributes.
show invisibles
boolean
read/write
If true, show hidden characters.
small cap
fixed
read/write
he percentage of the font size for text formatted as small caps. his setting has no effect on true small caps from an OpenType font.
subscript position
fixed
read/write
he percentage of the leading that subscripted text will move.
subscript size
fixed
read/write
he percentage of the font size for subscripted text.
superscript position
fixed
read/write
he percentage of the leading that the superscripted text will move.
superscript size
fixed
read/write
he percentage of the font size for superscripted text.
typographers quotes
boolean
read/write
If true, typed straight quotes will be converted to typographic quotes.
use optical size
boolean
read/write
If true, use a multiple master’s optical size axis.
use paragraph leading
boolean
read/write
If true, apply leading changes to entire paragraphs.
InDesign CS Scripting Guide AppleScript Reference 439
Property:
Type:
Access:
Description:
z order text wrap
boolean
read/write
Whether text wrap only affects text beneath it in the z order.
440
AppleScript Reference
InDesign CS Scripting Guide
text style range Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
nested style
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
tab stop
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
InDesign CS Scripting Guide AppleScript Reference 441
Property:
Type:
Access:
Description:
ascent
fixed
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associated XML elements
list of XML elements
read only
he XML elements associated with this text object (if any).
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
fixed
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
fixed
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
442
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradient stroke angle
fixed
read/write
he angle of the gradient applied to the stroke of the text.
gradient stroke length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal offset
fixed
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
InDesign CS Scripting Guide AppleScript Reference 443
Property:
Type:
Access:
Description:
index
integer
read only
index of the object within its parent object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
444
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
text style range
read only
An object reference to the object.
open type features
list of long
read/write
open type features
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
parent story
story
read only
he story containing the text object.
parent text frame
text frame
read only
he text frame containing the text object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
InDesign CS Scripting Guide AppleScript Reference 445
Property:
Type:
Access:
Description:
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
446
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this text style range. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
InDesign CS Scripting Guide AppleScript Reference 447
Property:
Type:
Access:
Description:
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method: apply style
changecase
convert to table
create outlines
delete
448
Parameters: Name:
Type:
Description:
using
character style, paragraph style, or string
he paragraph style or character style to apply.
[clearing overrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
uppercase, lowercase, titlecase, sentencecase
Case option to use.
Name:
Type:
Description:
[column separator]
string
he character to interpret as the column separator.
[row separator]
string
he character to interpret as the row separator.
[number of columns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original text.
None
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Deletes the object.
Method: export
markup
move
place
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he full path to the exported file.
[showing options]
boolean
If true, display the Export dialog box.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
using
XML element
he XML element to associate with the text.
Name:
Type:
Description:
to
ater, at beginning, at end, before
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he location (in page coordinates) at which to place the incoming file.
[destination layer]
layer
he layer on which to place the incoming file.
[showing options]
boolean
If true, display the import options dialog box for the file type being placed.
[autoflowing]
boolean
If true, autoflow the incoming text.
[retaining formatting]
boolean
If true, retain the formatting of the incoming text. If false, place the text using the document’s default text formatting attributes.
[converting quotes]
boolean
If true, convert typewriter (“straight”) quotation marks to typographic (“curly”) quotation marks.
Return:
Description:
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
object
Place a file.
InDesign CS Scripting Guide AppleScript Reference 449
Method: search
select
450
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects text.
text wrap preference Elements Element:
Refer to by:
path
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
contour options
contour option
read only
he contour options.
inverse
boolean
read/write
If true, invert the text wrap (creating an inside-out wrap).
object reference
text wrap preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
text wrap offset
list of fixed or measurement strings
read/write
he amount of offset to move the wrap away from the edges of the frame. Can return: number or string, list of numbers or strings or nothing.
text wrap type
none, jump object text wrap, next column text wrap, bounding box text wrap, contour, user modified
read/write
he type of text wrap applied to the object.
InDesign CS Scripting Guide AppleScript Reference 451
tint Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
color value
list of fixed
read/write
he color values of the tint
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the tint within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
model
spot, process, registration, mixedinkmodel
read/write
he color model of the tint.
name
string
read/write
he name of the tint.
object reference
tint
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
space
RGB, CMYK, LAB, mixed ink
read/write
he color space of the tint.
tint value
fixed
read/write
he percentage tint of the base color.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
tint
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
tint
Create a new tint.
nothing
Merge one or more other swatches into this one.
extract label
insert label
make
merge
452
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[color]
object
he base color as color.
Name:
Type:
Description:
with
object
he swatches to merge.
AppleScript Reference
InDesign CS Scripting Guide
TOC style Elements Element:
Refer to by:
TOC style entry
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
include book documents
boolean
read/write
If the document this TOC style belongs to is in a book, whether to include TOC data from other book documents.
include hidden
boolean
read/write
If true, include text on hidden layers in the generated TOC.
index
integer
read only
index of the TOC style within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the TOC style.
object reference
TOC style
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
run in
boolean
read/write
If true, use a run-in format for the TOC.
title
string
read/write
he title of the TOC.
title style
paragraph style
read/write
he paragraph style to apply to the TOC title in the generated TOC.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
toc style
Create a new toc style.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Description:
InDesign CS Scripting Guide AppleScript Reference 453
TOC style entry Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
format style
paragraph style
read/write
he paragraph style to apply to the TOC entry text in the generated TOC.
index
integer
read only
index of the TOC style entry within its parent TOC style
level
small integer
read/write
Level of this TOC style entry.
name
string
read/write
he name of the TOC style entry.
object reference
TOC style entry
read only
An object reference to the object.
page number position
ater entry, before entry, none
read/write
Options for where to put page number.
page number style
character style
read/write
he character style to apply to the page number.
parent
TOC style
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
separator
string
read/write
he string between entry text and page number.
separator style
character style
read/write
he character style to apply to the separator text.
sort alphabet
boolean
read/write
If true, sort the entries in the generated TOC alphabetically.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
454
AppleScript Reference
InDesign CS Scripting Guide
topic Elements Element:
Refer to by:
cross reference
index, name, range, relative, test, id
page reference
index, name, range, relative, test, id
subtopic
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
index
integer
read only
index of the topic within its parent index
name
string
read only
he name of the index topic.
object reference
topic
read only
An object reference to the object.
parent
index
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method: capitalize
delete make
Parameters: Name:
Type:
Description:
[capitalization option]
selected entry, include subentries, all level1 entries, all entries
What to capitalize.
None Name:
Type:
Description:
name
string
topic name.
[sort by]
string
String to use for sorting this topic as string.
Return:
Description:
nothing
Applies capitalization options to the index entries.
nothing
Deletes the object.
topic
Create a new topic.
InDesign CS Scripting Guide AppleScript Reference 455
transform preference Properties Property:
Type:
Access:
class
type
read only
he class descriptor type
dimensions include stroke weight
boolean
read/write
Whether transform panel includes stroke weight in its dimension values
object reference
transform preference
read only
An object reference for this transform preference
parent
object
read only
he transform preference’s parent
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
scale strokes
boolean
read/write
Whether strokes are scaled when objects are scaled
show content offset
boolean
read/write
Whether transform panel display values includes stroke weight in its dimension values
transform content
boolean
read/write
Whether transform panel transforms content when rotating, scaling, skewing and resizing objects
transformations are totals
boolean
read/write
Whether transform panel displays values for nested objects relative to the parent object
456
AppleScript Reference
InDesign CS Scripting Guide
Description:
transparency preference Properties Property:
Type:
Access:
Description:
blending space
default, RGB, CMYK
read/write
Determines the color space in which colors will be blended on spreads where there is transparency present.
class
type
read only
he class of the object.
object reference
transparency preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
InDesign CS Scripting Guide AppleScript Reference 457
trap preset Properties Property:
Type:
Access:
Description:
black color threshold
fixed
read/write
Trap preset’s black color threshold in percentage between 0% and 100%
black density
fixed
read/write
Trap preset’s black density in the range, 0.001 to 12.0
black width
fixed
read/write
he trap preset’s black width in the range 0.0 and 8.0
class
type
read only
he class descriptor type
color reduction
fixed
read/write
Trap preset’s color reduction threshold in percentage between 0% and 100%
default trap width
fixed
read/write
he trap preset’s default width in the range 0.0 and 8.0
id
integer
read only
he trap preset’s unique id
image placement
center edges, choke, image neutral density, images over spread
read/write
he trap preset’s image placement
images to images
boolean
read/write
If true, trap images to images
index
integer
read only
index of the trap preset within its parent application or document
internal images
boolean
read/write
If true, trap images internally
label
string
read/write
A label that can be set to any string
name
string
read/write
he name of the trap preset
object reference
trap preset
read only
An object reference for this trap preset
objects to images
boolean
read/write
If true, trap objects to images.
one bit images
boolean
read/write
If trye, apply trapping to one-bit images
parent
object
read only
he trap preset’s parent. Can return: application or document.
properties
AppleScript record
read/write
Property that allows setting of several properties at the same time
sliding trap threshold
fixed
read/write
Trap preset’s sliding trap threshold in percentage between 0% and 100%
step threshold
fixed
read/write
Trap preset’s step threshold in percentage between 1% and 100%
trap end
miter trap ends, overlap trap ends
read/write
he trap preset’s end type
trap join
miter end join, round end join, bevel end join
read/write
he trap preset’s join type
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
trap preset
Create a new trap preset.
extract label
insert label
make
458
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
user dictionary Properties Property:
Type:
Access:
Description:
added words
list of string
read/write
words in the user dictionary.
class
type
read only
he class of the object.
index
integer
read only
index of the user dictionary within its parent application
name
string
read only
he name of the user dictionary.
object reference
user dictionary
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
removed words
list of strings
read/write
words in the not list dictionary.
Methods Method: add word
remove word
Parameters: Name:
Type:
Description:
added words
list of strings
he list of exceptions to remove from the user dictionary.
[removed list]
boolean
If true, modify the ‘removed words’ list, the ‘added words’ list is modified by default.
Name:
Type:
Description:
removed words
list of strings
he list of exceptions to remove from the user dictionary.
[removed list]
boolean
If true, modify the ‘removed words’ list, the ‘added words’ list is modified by default.
Return:
Description:
nothing
Add a word to the user dictionary.
nothing
Remove a word from the user dictionary.
InDesign CS Scripting Guide AppleScript Reference 459
validation error Properties Property:
Type:
Access:
Description:
attribute name
string
read only
he attribute name if the validation error refers to an attribute.
class
type
read only
he class of the object.
element
XML element
read only
he XML element which caused the validation error.
error message
string
read only
he validation error message.
index
integer
read only
index of the validation error within its parent document
object reference
validation error
read only
An object reference to the object.
parent
document
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
460
AppleScript Reference
InDesign CS Scripting Guide
view preference Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
cursor key increment
fixed
read/write
he distance each press of an arrow key will move the selection.
guide snapto zone
integer
read/write
he range within which an object snaps to guides.
horizontal measurement units
points, picas, inches, inches decimal, millimeters, centimeters, ciceros
read/write
he measurement unit to use for the horizontal ruler.
object reference
view preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
ruler origin
spread origin, page origin, spine origin
read/write
Where the default ruler origin (zero point) should appear.
show frame edges
boolean
read/write
If true, show the edges of non-selected text frames.
show rulers
boolean
read/write
If true, show the horizontal and vertical rulers.
vertical measurement units
points, picas, inches, inches decimal, millimeters, centimeters, ciceros
read/write
he measurement unit to use for the vertical ruler.
InDesign CS Scripting Guide AppleScript Reference 461
view zoom behavior Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
enable behavior
boolean
read/write
Whether behavior is enabled
event
mouse up, mouse down, mouse enter, mouse exit, on focus, on blur
read/write
he event which triggers the behavior
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the view zoom behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the view zoom behavior.
object reference
view zoom behavior
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
view zoom style
full screen, zoom in, zoom out, fit page, actual size, fit width, fit visible, reflow, single page, one column, two column, rotate CW, rotate CCW
read/write
he View Zoom style.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
view zoom behavior
Create a new view zoom behavior.
extract label
insert label
make
462
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
AppleScript Reference
InDesign CS Scripting Guide
Description:
widget Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the widget within its parent dialog column, dialog row, enabling group or border panel
min width
fixed
read/write
he minimum width of the control.
object reference
widget
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
InDesign CS Scripting Guide AppleScript Reference 463
window Properties Property:
Type:
Access:
Description:
bounds
list of numbers or measurement strings {top, let, bottom, right}
read/write
he bounds of the window, in screen pixels.
class
type
read only
he class of the object.
index
integer
read only
index of the window within its parent document or application
name
string
read only
he name of the window.
object reference
window
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
selection
list
read/write
he selection of the window.
Methods Method:
Parameters:
Return:
Description:
bring to front
None
nothing
Brings the object to the top
close
None
nothing
Close the window
make
None
window
Create a new window.
maximize
None
nothing
Maximize the window
minimize
None
nothing
Minimize the window
restore
None
nothing
Restore the window
nothing
Selects an object or objects. If the object is a text object (e.g., characters, words, lines, paragraphs), any other selected objects are deselected (the AppendSelection parameter has no effect).
select
464
Name:
Type:
Description:
selectable items
object, list of objects, or nothing (to deselect all)
he object(s) to select.
[existing selection]
replace, add to, remove from
How to handle the existing selection.
AppleScript Reference
InDesign CS Scripting Guide
WMF Properties Property:
Type:
Access:
Description:
absolute horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absolute rotation angle
fixed
read/write
he rotation angle of the page item relative to its containing page item.
absolute shear angle
fixed
read/write
he shear angle of the page item relative to its containing page item.
absolute vertical scale
fixed
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
associated XML element
XML element
read only
Returns the XML element (or elements) associated with this page item.
blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
class
type
read only
he class of the object.
clipping path
clipping path settings
read only
he clipping path settings
feather corner type
sharp, rounded, diffusion
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
feather mode
none, standard
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
feather width
fixed
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
geometric bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
image type name
string
read only
he type of image
index
integer
read only
index of the wmff within its parent XML element, page item, oval, rectangle, polygon, graphic line, state, group or button
isolate blending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
item link
link
read only
link to a placed file
knockout group
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
InDesign CS Scripting Guide AppleScript Reference 465
Property:
Type:
Access:
Description:
local display setting
high quality, typical, optimized, default
read/write
he display setting for this page item.
nonprinting
boolean
read/write
Whether the page item is non-printing
object reference
WMF
read only
An object reference to the object.
opacity
fixed
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
parent
object
read only
he parent of the page item.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
rotation angle
fixed
read/write
he rotation angle of the page item.
shadow blend mode
normal, multiply, screen, overlay, sot light, hard light, color dodge, color burn, darken, lighten, difference, exclusion, hue, saturation, color, luminosity
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadow blur radius
fixed
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadow color
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
shadow mode
none, drop
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadow opacity
fixed
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadow x offset
fixed
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadow y offset
fixed
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shear angle
fixed
read/write
he shear angle applied to the page item.
text wrap preferences
text wrap preference
read only
he text wrap applied to the page item.
vertical scale
fixed
read/write
he vertical scaling percentage of the page item.
visible bounds
list of fixed or measurement strings {y1, x1, y2, x2}
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
466
AppleScript Reference
InDesign CS Scripting Guide
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
nothing
Export the object to file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Move page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
object
Place a file.
export
extract label
insert label
move
place
Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[to]
list of fixed or measurement strings {x, y} or page, spread, master spread, or layer
he new location of the object.
[by]
list of fixed or measurement strings {x, y}
Amount by which to move the object relative to its current location.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he point at which to place the file.
[destination layer]
layer or layer name as string
he layer on which to place the file.
[showing options]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retaining formatting]
boolean
If true, keep formatting of placed text files.
[converting quotes]
boolean
If true, convert straight quotes to typographer’s quotes.
InDesign CS Scripting Guide AppleScript Reference 467
Method: resize
rotate
468
Parameters: Name:
Type:
Description:
[horizontal scale]
fixed
he horizontal scaling percentage.
[vertical scale]
fixed
he vertical scaling percentage.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to scale around.
[considering current scale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are scaled.
[considering parents scale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to rotate around.
[considering current rotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are rotated.
[considering parents rotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Rotate the page item.
Method: shear
store
unlink
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
list or numbers or measurement strings {x, y} or bottom center anchor, bottom let anchor, bottom right anchor, center anchor, let center anchor, right center anchor, top let anchor, top center anchor, top right anchor
he point to shear around.
[considering current shear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transforming content]
boolean
If true then both the object and items within it are sheared.
[considering parents shear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
Library
he library in which to store.
Name:
Type:
Description:
from
page or master spread
What to unlink from.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide AppleScript Reference 469
word Elements Element:
Refer to by:
button
index, name, range, relative, test, id
character
index, name, range, relative, test
form field
index, name, range, relative, test, id
graphic line
index, name, range, relative, test, id
group
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
nested style
index, name, range, relative, test
oval
index, name, range, relative, test, id
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
polygon
index, name, range, relative, test, id
rectangle
index, name, range, relative, test, id
tab stop
index, name, range, relative, test
table
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text frame
index, name, range, relative, test, id
text style range
index, name, range, relative, test
word
index, name, range, relative, test
Properties Property:
Type:
Access:
Description:
align to baseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
all graphics
list of graphics
read only
All graphics
all page items
list of page items
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
applied character style
character style
read/write
he character style applied to the text.
applied font
font or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
applied language
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
applied paragraph style
paragraph style
read/write
he paragraph style applied to the text.
470
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ascent
fixed
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associated XML elements
list of XML elements
read only
he XML elements associated with this text object (if any).
auto leading
fixed
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balance ragged lines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
fixed
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baseline shit
fixed
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
capitalization
normal, small caps, all caps, cap to small cap
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
class
type
read only
he class of the object.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
fixed
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desired glyph scaling
fixed
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desired letter spacing
fixed
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desired word spacing
fixed
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
drop cap characters
small integer
read/write
Number of characters for drop cap.
drop cap lines
small integer
read/write
Number of lines for drop cap.
InDesign CS Scripting Guide AppleScript Reference 471
Property:
Type:
Access:
Description:
drop cap style
character style
read/write
character style of drop cap. Can also accept: string.
fill color
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fill tint
fixed
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
first line indent
fixed or measurement string
read/write
he indent applied to the first line of the paragraph containing the text.
font style
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradient fill angle
fixed
read/write
he angle of the gradient applied to the fill of the text (if any).
gradient fill length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradient fill start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradient stroke angle
fixed
read/write
he angle of the gradient applied to the stroke of the text.
gradient stroke length
fixed
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradient stroke start
list of fixed or measurement strings {x, y}
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
grid align first line only
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontal offset
fixed
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontal scale
fixed
read/write
he horizontal scaling percentage applied to the text object.
hyphen weight
small integer
read/write
he weight (in points) of hyphen characters used in the text object.
hyphenate ater first
small integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenate before last
small integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenate capitalized words
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenate ladder limit
small integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenate words longer than
small integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenation zone
fixed or measurement string
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
472
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
index
integer
read only
index of the object within its parent object.
justification
let align, center align, right align, let justified, right justified, center justified, fully justified
read/write
Alignment of the paragraph containing the text.
keep all lines together
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keep first lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keep last lines
small integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keep lines together
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keep with next
small integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerning method
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerning value
fixed
read/write
he amount of kerning applied to the characters in the text object.
leading
fixed, measurement string, or ‘auto’
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
let indent
fixed or measurement string
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximum glyph scaling
fixed
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximum letter spacing
fixed
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximum word spacing
fixed
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimum glyph scaling
fixed
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
InDesign CS Scripting Guide AppleScript Reference 473
Property:
Type:
Access:
Description:
minimum letter spacing
fixed
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimum word spacing
fixed
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
no break
boolean
read/write
If true, the no break attribute is applied to the text.
object reference
word
read only
An object reference to the object.
open type features
list of integers
read/write
open type features
OTF contextual alternate
boolean
read/write
If true, InDesign will replace characters in the text with contextual alternate characters. Only applies to text set using an OpenType font.
OTF discretionary ligature
boolean
read/write
If true, InDesign will replace ligature characters (“ffi,” “ffl”) in the text with discretionary ligature characters. Only applies to text set using an OpenType font.
OTF figure style
tabular lining, proportional oldstyle, proportional lining, tabular oldstyle, default
read/write
Which figure style to use in OpenType fonts
OTF fraction
boolean
read/write
If true, InDesign will replace typed fractions (“1/2”) in the text with fraction alternate characters. Only applies to text set using an OpenType font.
OTF ordinal
boolean
read/write
If true, InDesign will replace number characters in the text with ordinal alternate characters. Only applies to text set using an OpenType font.
OTF swash
boolean
read/write
If true, InDesign will replace characters in the text with swash alternate characters. Only applies to text set using an OpenType font.
OTF titling
boolean
read/write
If true, InDesign will replace characters in the text with titling alternate characters. Only applies to text set using an OpenType font.
overprint fill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprint stroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
parent story
story
read only
he story containing the text object.
parent text frame
text frame
read only
he text frame containing the text object.
point size
fixed
read/write
he size of the text in points.
position
normal, superscript, subscript, OT superscript, OT subscript, OT numerator, OT denominator
read/write
he position attribute applied to the text.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
right indent
fixed or measurement string
read/write
he right indent applied to the paragraph containing the text.
rule above
boolean
read/write
If true, the paragraph containing the text object has a rule above.
rule above color
swatch or string
read/write
he color of the paragraph rule above.
rule above gap color
swatch or string
read/write
he gap color of the paragraph rule above.
474
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rule above gap overprint
boolean
read/write
If true, overprint the rule above gap color.
rule above gap tint
fixed
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
rule above let indent
fixed or measurement string
read/write
he let indent of the paragraph rule above.
rule above line weight
fixed
read/write
he stroke weight of the paragraph rule above.
rule above offset
fixed or measurement string
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
rule above overprint
boolean
read/write
If true, the paragraph rule above will overprint.
rule above right indent
fixed or measurement string
read/write
he right indent of the paragraph rule above.
rule above tint
fixed
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
rule above type
stroke style
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule above width
column width, text width
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
rule below
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
rule below color
swatch or string
read/write
he color of the paragraph rule below.
rule below gap color
swatch or string
read/write
he color of the paragraph rule below gap
rule below gap overPrint
boolean
read/write
If true, the gap applied to the paragraph rule below will overprint.
rule below gap tint
fixed
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
rule below let indent
fixed or measurement string
read/write
he let indent of the paragraph rule below.
rule below line weight
fixed
read/write
he stroke weight of the paragraph rule below.
rule below offset
fixed or measurement string
read/write
he offset of the paragraph rule below.
rule below overPrint
boolean
read/write
If true, the paragraph rule below will overprint.
rule below right indent
fixed or measurement string
read/write
he right indent of the paragraph rule below.
rule below tint
fixed
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
rule below type
stroke style
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
rule below width
column width, text width
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
InDesign CS Scripting Guide AppleScript Reference 475
Property:
Type:
Access:
Description:
single word justification
let align, center align, right align, fully justified
read/write
Justification for lines containing a single word.
skew
fixed
read/write
he skewing angle (in degrees) applied to the text object.
space ater
fixed or measurement string
read/write
he space ater applied to the paragraph containing the text.
space before
fixed or measurement string
read/write
he space before applied to the paragraph containing the text.
start paragraph
anywhere, next column, next frame, next page, next odd page, next even page
read/write
his property controls the location at which InDesign will start the paragraph.
strike through color
swatch or string
read/write
he stroke color of the strike through.
strike through gap color
swatch or string
read/write
he gap color of the strike through
strike through gap overprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strike through gap tint
fixed
read/write
he gap tint of the strike through
strike through offset
fixed or measurement string
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strike through overprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strike through tint
fixed
read/write
he tint of the strike through
strike through type
stroke style
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strike through weight
fixed
read/write
he stroke weight of the strike through, in points.
strike thru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
stroke color
swatch
read/write
he color applied to the stroke of the text.
stroke tint
fixed
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
stroke weight
fixed
read/write
he width (in points) of the stroke applied to the text.
tab list
list of objects
read/write
A list of all of the properties of all of the tab stops on this word. Can return: list of record.
tracking
fixed
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underline color
swatch or string
read/write
he color applied to the stroke of the underline.
underline gap color
swatch or string
read/write
he gap color applied to the stroke of the underline.
underline gap overprint
boolean
read/write
If true, the gap of the underline will overprint.
underline gap tint
fixed
read/write
he gap tint of the stroke applied to the underline.
476
AppleScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underline offset
fixed or measurement string
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underline overprint
boolean
read/write
If true, the underline will overprint.
underline tint
fixed
read/write
he tint of the color applied to the stroke of the underline.
underline type
stroke style
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underline weight
fixed
read/write
he stroke weight of the underline.
vertical scale
fixed
read/write
he vertical scaling percentage applied to the text object.
Methods Method: apply style
changecase
convert to table
create outlines
delete
Parameters: Name:
Type:
Description:
using
character style, paragraph style, or string
he paragraph style or character style to apply.
[clearing overrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
uppercase, lowercase, titlecase, sentencecase
Case option to use.
Name:
Type:
Description:
[column separator]
string
he character to interpret as the column separator.
[row separator]
string
he character to interpret as the row separator.
[number of columns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[delete original]
boolean
If true, delete the original text.
None
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Deletes the object.
InDesign CS Scripting Guide AppleScript Reference 477
Method: export
markup
move
place
478
Parameters: Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he full path to the exported file.
[showing options]
boolean
If true, display the Export dialog box.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
using
XML element
he XML element to associate with the text.
Name:
Type:
Description:
to
before, ater, at end, at beginning
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
file name
string
he file to place.
[place point]
list or numbers or measurement strings {x, y}
he location (in page coordinates) at which to place the incoming file.
[destination layer]
layer
he layer on which to place the incoming file.
[showing options]
boolean
If true, display the import options dialog box for the file type being placed.
[autoflowing]
boolean
If true, autoflow the incoming text.
[retaining formatting]
boolean
If true, retain the formatting of the incoming text. If false, place the text using the document’s default text formatting attributes.
[converting quotes]
boolean
If true, convert typewriter (“straight”) quotation marks to typographic (“curly”) quotation marks.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
object
Place a file.
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box.
[whole word]
boolean
If true, limit the search to whole words that match the search string.
[case sensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacing with]
string
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Return:
Description:
list of objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character) in the “for” parameter. You can use some of InDesign’s metacharacters (e.g., “ ” for a tab character) in the “replacing with” parameter, but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
nothing
Selects text.
InDesign CS Scripting Guide AppleScript Reference 479
word RTF import preference Properties Property:
Type:
Access:
class
type
read only
he class of the object.
convert page breaks
none, page break, column break
read/write
he method used to convert page breaks in the imported file.
Convert Tables To
unformatted table, unformatted tabbed text
read/write
he method used for importing tables in the incoming file.
import index
boolean
read/write
If true, import index text.
import notes
boolean
read/write
If true, import footnotes and endnotes.
import TOC
boolean
read/write
If true, import table of contents text.
object reference
word RTF import preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Remove Formatting
boolean
read/write
If true, remove text and table formatting.
480
AppleScript Reference
InDesign CS Scripting Guide
Description:
XML attribute Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
index
integer
read only
index of the XML attribute within its parent XML element
name
string
read/write
he name of the XML attribute.
object reference
XML attribute
read only
An object reference to the object.
parent
XML element
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
value
string
read/write
he value of the XML attribute.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
xml attribute
Create a new attribute.
nothing
Select this xml attribute.
make
select
Name:
Type:
Description:
name
string
he attribute name.
value
string
he attribute value.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
InDesign CS Scripting Guide AppleScript Reference 481
XML comment Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the XML comment within its parent document, XML element or XML item
object reference
XML comment
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
story offset
integer
read only
he location of the object from the beginning of the story
value
string
read/write
he value of the XML comment.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
xml comment
Create a new XML comment.
xml element
Move element before/ater another element or text object, or to beginning/end.
nothing
Select this xml comment.
make
move
select
482
Name:
Type:
Description:
story offset
integer
Offset within the story as insertion point or integer.
[value]
string
Value.
Name:
Type:
Description:
to
before, ater, at end, at beginning
Location.
[reference]
object
Before/ater this object as xml item or text.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
AppleScript Reference
InDesign CS Scripting Guide
Description:
XML element Elements Element:
Refer to by:
character
index, name, range, relative, test
DTD
index, name, range, relative, test, id
EPS
index, name, range, relative, test, id
image
index, name, range, relative, test, id
insertion point
index, name, range, relative, test
line
index, name, range, relative, test
page item
index, name, range, relative, test, id
paragraph
index, name, range, relative, test
PDF
index, name, range, relative, test, id
PICT
index, name, range, relative, test, id
story
index, name, range, relative, test, id
text
index, name, range, relative, test
text column
index, name, range, relative, test
text style range
index, name, range, relative, test
WMF
index, name, range, relative, test, id
word
index, name, range, relative, test
XML attribute
index, name, range, relative, test
XML comment
index, name, range, relative, test, id
XML element
index, name, range, relative, test, id
XML instruction
index, name, range, relative, test, id
XML item
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
contents
string
read/write
he text contents of the XML element.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the XML element within its parent document, XML element or XML item
markup tag
XML tag
read/write
he XML markup tag associated with the XML element.
object reference
XML element
read only
An object reference to the object.
parent
object
read only
he parent of the object.
parent story
story
read only
he related story
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
story offset
integer
read only
he location of the object from the beginning of the story
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
InDesign CS Scripting Guide AppleScript Reference 483
Method: export
import xml
make
markup
move
place xml
select
untag
Name:
Type:
Description:
format
string (name of the export format as it appears in the Export dialog box) or eps type, InCopy, jpg, pdf type, rtf, svg, svg compressed, tagged text, text type, xml
he export format.
to
string
he file to export to.
[showing options]
boolean
If true, display the export options dialog.
[using]
export preset or export preset name as string
he export preset to use.
Name:
Type:
Description:
from
string
What to import from.
Name:
Type:
Description:
markup tag
XML tag
he XML tag used to identify this element as string or xml tag.
[xml content]
xml content
Content to be marked up as text, story or pageItem.
Name:
Type:
Description:
using
XML tag
he object to mark up as text, story or pageItem.
Name:
Type:
Description:
to
ater, at beginning, at end, before
Location.
[reference]
object
Before/ater this object as xml item or text.
Name:
Type:
Description:
using
XML element
he object to place into as story or pageItem.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
None
validate
484
Parameters:
Name:
Type:
Description:
[maximum errors]
integer
he maximum number of validation errors to generate.
AppleScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Export the object to file.
nothing
Import a XML file into an InDesign document.
xml element
Create a new XML element.
nothing
Markup layout content with XML preserving the existing content.
xml element
Move element before/ater another element or text object, or to beginning/end.
nothing
Places XML content in the specified object replacing the existing content.
nothing
Select this xml element.
nothing
Untag an element
objects
Validate XML structure against a dtdd.
XML export map Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
index
integer
read only
index of the XML export map within its parent application or document
mapped style
object
read only
he style mapped to the XML tag.
markup tag
XML tag
read/write
he markup tag mapped to the style.
object reference
XML export map
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
xml export map
Create a new mapping.
make
Name:
Type:
Description:
mapped style
character style, paragraph style, or string
he mapped style as paragraphStyle, characterStyle or string.
markup tag
XML tag
he tag to map as xml tag or string.
InDesign CS Scripting Guide AppleScript Reference 485
XML export preference Properties Property:
Type:
Access:
class
type
read only
he class of the object.
copy formatted images
boolean
read/write
If true, copy formatted images to the images subfolder.
copy optimized images
boolean
read/write
If true, copy optimized images to the images subfolder.
copy original images
boolean
read/write
If true, copy the original images to the images subfolder.
exclude dtd
boolean
read/write
If true, exclude the dtdd from the exported XML.
export from selected
boolean
read/write
If true, export the selected element (otherwise export the entire document).
file encoding
UTF8, UTF16, shit JIS
read/write
he file encoding to use when exporting.
GIF options interlaced
boolean
read/write
If true, generate interlaced GIFs.
GIF options palette
adaptive palette, macintosh palette, web palette, windows palette
read/write
he color palette to use for GIF conversion.
image conversion
automatic, JPEG, GIF
read/write
Type of image to generate for optimized and formatted images.
JPEG options format
baseline encoding, progressive encoding
read/write
he format of converted JPEG image.
JPEG options quality
low, medium, high, maximum
read/write
he quality setting for converted JPEG images.
object reference
XML export preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
preferred browser
file reference or file name as string
read/write
he name of the preferred browser for viewing XML.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
ruby
boolean
read/write
If true, include Ruby characters in the exported XML.
view ater export
boolean
read/write
If true, view exported XML in the default browser ater exporting.
486
AppleScript Reference
InDesign CS Scripting Guide
Description:
XML import map Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
index
integer
read only
index of the XML import map within its parent application or document
mapped style
object
read/write
he style mapped to the XML tag.
markup tag
XML tag
read only
he XML markup tag to map to the style.
object reference
XML import map
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
xml import map
Create a new mapping.
make
Name:
Type:
Description:
markup tag
XML tag
he tag to map as xml tag or string.
mapped style
character style, paragraph style, or string
the mapped style as paragraphStyle, characterStyle or string.
InDesign CS Scripting Guide AppleScript Reference 487
XML import preference Properties Property:
Type:
Access:
class
type
read only
he class of the object.
import style
append import, merge import
read/write
he method used to import XML content (append or merge).
import to selected
boolean
read/write
If true, import into the selected element (otherwise import at the root element).
object reference
XML import preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
488
AppleScript Reference
InDesign CS Scripting Guide
Description:
XML instruction Properties Property:
Type:
Access:
class
type
read only
Description: he class of the object.
data
string
read/write
he data of the PI.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the XML instruction within its parent document, XML element or XML item
object reference
XML instruction
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
story offset
integer
read only
he location of the object from the beginning of the story
target
string
read/write
he target of the PI.
Methods Method:
Parameters:
Return:
delete
None
nothing
Deletes the object.
duplicate
None
XML instruction
Duplicates the object.
xml instruction
Create a new XML processing instruction.
xml element
Move element before/ater another element or text object, or to beginning/end.
nothing
Select this xml instruction.
make
move
select
Name:
Type:
Description:
story offset
integer
Offset within the story as insertion point or integer.
[target]
string
Target.
[data]
string
Data.
Name:
Type:
Description:
to
before, ater, at end, at beginning
Location.
[reference]
object
Before/ater this object as xml item or text.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
Description:
InDesign CS Scripting Guide AppleScript Reference 489
XML item Elements Element:
Refer to by:
DTD
index, name, range, relative, test, id
XML comment
index, name, range, relative, test, id
XML element
index, name, range, relative, test, id
XML instruction
index, name, range, relative, test, id
XML item
index, name, range, relative, test, id
Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the XML item within its parent document, XML element or XML item
object reference
XML item
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
duplicate
None
object
Duplicates the object.
xml element
Move element before/ater another element or text object, or to beginning/end.
nothing
Select this xml item.
move
select
490
Name:
Type:
to
ater, at beginning, at end, before
Location.
[reference]
object
Before/ater this object as xml item or text.
Name:
Type:
Description:
[existing selection]
replace, add to, remove from
How to handle the existing selection.
AppleScript Reference
InDesign CS Scripting Guide
Description:
XML tag Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the XML tag within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the XML tag.
object reference
XML tag
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
tag color
list of numbers {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
read/write
he color of the tag.
Methods Method:
Parameters:
Return:
Description:
delete
None
nothing
Deletes the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
XML tag
Create a new tag.
extract label
insert label
make
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[name]
string
he tag name as string.
[tag color]
list of numbers {r, g, b} or light blue, red, green, blue, yellow, magenta, cyan, gray, black, orange, dark green, teal, tan, brown, violet, gold, dark blue, pink, lavender, brick red, olive green, peach, burgundy, grass green, ochre, purple, light gray, charcoal, grid blue, grid orange, fiesta, light olive, lipstick, cute teal, sulphur, grid green, white
he color of the tag.
InDesign CS Scripting Guide AppleScript Reference 491
XML view preference Properties Property:
Type:
Access:
Description:
class
type
read only
he class of the object.
object reference
XML view preference
read only
An object reference to the object.
parent
object
read only
he parent of the object.
properties
AppleScript record
read/write
An AppleScript record containing all of the properties of the object.
show attributes
boolean
read/write
If true, show XML attributes as well as elements in the structure view.
show structure
boolean
read/write
If true, show the structure view for the document.
show tag markers
boolean
read/write
If true, show tag markers in text.
show tagged frames
boolean
read/write
If true, highlight tagged frames in the document.
show text snippets
boolean
read/write
If true, show text snippets of an element’s content in the structure view.
492
AppleScript Reference
InDesign CS Scripting Guide
JavaScript Reference
his section describes the InDesign objects available to JavaScript. he objects are shown in alphabetical order, and each object description shows the object’s properties (attributes of the object or other objects contained within the object), and methods the object can respond to. Note: Due to the constraints of our page layout, we’ve had to hyphenate some scripting terms. When you are entering the term, do not enter the hyphen. No scripting terms in InDesign contain hyphens.
Setting object properties he following example creates a color and then fills in its properties. with(app.activeDocument){ myNewColor=colors.add(); with(myNewColor){ model=ColorModel.process; space=ColorSpace.CMYK; colorValue=newArray(30,80,30,10); name="DGC_504a"; } }
In InDesign JavaScript, you can set object properties as you create the object. his parameter always comes last, following any required or optional parameters. he following example creates the same color as the above example, but executes much faster: with(app.activeDocument){ myColorArray=newArray(30,80,30,10); myNewColor=colors.add({model:ColorModel.process,space:ColorSpace.CMYK,colorValue:myColorArray, name:"DCG504a"}) }
About properties he properties of an object are the object’s attributes—a character object, for example, has font, fontStyle, pointSize, and baselineShit properties. Here’s an example property reference table (from the book object): Property:
Type:
Access:
Description:
automaticDocumentConversion
boolean
read/write
If true, automatically convert document during repagination and synchronization
automaticPagination
boolean
read/write
If true, repaginate the book documents when the book pagination changes.
bookContents
bookContents
read only
Every InDesign book content
filePath
string
read only
he file path to the book file (does not include the file name).
fullName
string
read only
he file path to the book file, including the file name.
index
integer
read only
index of the book within its parent application
InDesign CS Scripting Guide JavaScript Reference 493
Property:
Type:
Access:
Description:
insertBlankPage
boolean
read/write
If true, insert blank pages to meet the odd/even setting.
modified
boolean
read only
If true, the document has been modified since it was last saved.
name
string
read only
he file name of the book.
parent
application
read only
he parent of the object.
printPreferences
printPreference
read only
he print preferences of the book.
read/write
Sets the repagination options for the book.
repaginationOption
Name:
Decimal:
RepaginateOption.nextPage
1885500011
RepaginateOption.nextOddPage
1332765291
RepaginateOption.nextEvenPage
1164993131
saved
boolean
read only
If true, the document has been saved since it was opened.
styleSourceDocument
document
read/write
he current master document.
synchronizeOptions
synchronizeOptions
read only
Every synchronize option style
Note that many of the properties in the book object are read only. In general, read only properties are either system information (such as the unique id assigned to InDesign objects) or are set as the result of a method (the full name of the book file, for example, is set by saving the book file as a given name). he read/write properties, however, can be changed, as shown below: //Givenabookdocument"myBook" myBook.automaticPagination=true; myBook.insertBlankPage=true;
494
JavaScript Reference
InDesign CS Scripting Guide
About methods Here’s an example command reference (from the document object): Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
Return:
Description:
nothing
Export the object to a file.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Here’s an example of using the document.exportFile method (the following example assumes that you have a PDF export preset named “myPrepressPreset”): myPDFFile=newFile("c:\test.pdf") app.activeDocument.exportFile(ExportFormatType.pdfType,myPDFFile,false,"myPrepressPreset");
When a method includes optional parameters, use “undefined” when you do not want to use the parameter. In the following example, we do not want to set the optional “layer,” “at,” or “reference” parameters as we create a new rectangle, so we use “undefined” to ignore them: app.activeDocument.pages.item(0).rectangles.add(undefined,undefined,undefined,{strokeWeight:.25});
InDesign CS Scripting Guide JavaScript Reference 495
About Files and Folders InDesign’s JavaScript implementation includes support for File and Folder objects. A File object corresponds to a disk file, while a Folder object matches a directory or folder.
About path names he File and Folder objects accept operating system specific path names. To maximize the portability of path names, however, both objects support a platform-independent form of path names, called URI. You can use absolute path names and relative path names. Absolute path names start with one or two slash characters. hese path names describe the full path from a root directory down to a file or folder. Relative path names start at a known location, the current directory. (You can also use the “activeScript” property of the InDesign application to get the path to the currently-executing script file.) A relative path name starts either with a directory name or with one of the special names “.” and “..”. he name “.” refers to the current directory, and the name “..” refers to the parent directory. he slash character is used to separate path elements.
Examples: Path:
Description:
/dir1/dir2/file
An absolute path name, describing the file file in the directory dir2, which is in the directory dir1, which again is in the root directory.
./file
he file file in the current directory; you could also simply use file without the beginning “./” sequence.
../file
he file file in the parent of the current directory.
../../file
he file file in the grandparent of the current directory.
../dir1/file
he file file in the directory dir1, which is parallel to the current directory.
Portable path name:
Windows path name:
/c/dir/file
c:\dir\file
Portable path name:
Mac OS X path name:
/macosx/dir/file
/dir/file
Properties common to both File and Folder objects Name:
Type:
Access:
Description:
absoluteURI
String
read only
he full path name for the object in URI notation.
alias
Boolean
read only
Returns true if the object refers to a file system alias.
created
Date
read only
he creation date of the object. If the object does not refer to a folder or file on disk, the value is null.
error
String
read only
Contains a message describing the last file system error. Setting this value clears any error message and resets the error bit for opened files.
exists
Boolean
read only
Returns true if the path name of this object refers to an actually existing file or folder. Read only.
fs
String
read only
he name of the file system. Use “Windows” or “Macintosh”.
fsName
String
read only
he file-system specific name of the object as a full path name.
modified
Date
read only
he date of the object’s last modification. If the object does not refer to a folder or file on disk, the value is null.
name
String
read only
he name of the object without the path specification.
parent
Folder
read only
he folder object containing this object. If this object already is the root folder of a volume, the property value is null.
path
String
read only
he path portion of the absolute URI. If the name does not have a path, this property contains the empty string.
relativeURI
String
read only
he path name for the object in URI notation, relative to the current folder.
496
JavaScript Reference
InDesign CS Scripting Guide
Methods common to File and Folder objects Name
Parameters
Return value
Description
execute()
None
Boolean
Attempts to find the application associated with this file or folder. If found, load the application and cause it to load the file. his method may be used to execute a file much as it had been double-clicked in the Finder or Explorer. It can be used to run scripts, to launch other applications and much more. Folders pop open as if double-clicked. he method returns immediately ater launching the application. It does not wait for the application to terminate. It returns true if the launch was successful.
getRelativeURI()
String basePath
String
Calculate and return the relative URI, given a base path, in URI notation. If the base path is omitted, the path of the current folder is assumed.
remove()
None
Boolean
Deletes the file or folder that this object represents. Folders must be empty before they can be deleted. he return value is true if the file or folder has been deleted. he remove() method deletes the referenced file or folder immediately. It does not move the referenced file or folder to the system trash. he effects of the remove method cannot be undone. It is recommended that you prompt the user for permission to delete a file or folder before deleting it. he method does not resolve aliases; it rather deletes the file alias itself.
rename
String newName
Boolean
Rename the object to the new name. he new name must not have a path. Returns true if the object was renamed. he method does not resolve aliases, but rather renames the alias file.
isEncodingAvailable
String name
Boolean
his method checks whether your system supports a specific encoding. You supply the name of the desired encoding; the method returns true if that encoding is available, false otherwise.
decode
String what
String
he method File.decode() or Folder.decode() decodes its input string as required by RFC 2396. All characters with a numeric value greater than 127 are encoded in UTF-8; they are stored as escaped characters starting with the percent sign followed by two hex digits. Also the characters / - _ . ! ~ * ‘ ( ) are encoded the same way. he String “ D%C3%A4umling” would be decoded as “Däumling”.
encode
String
String
he method File.encode() or Folder.encode() encodes its input string as required by RFC 2396. All characters with a numeric value greater than 127 are encoded in UTF-8; they are returned as escaped characters starting with the percent sign followed by two hex digits. Also the characters / - _ . ! ~ * ‘ ( ) are encoded the same way. he string “Däumling” would be encoded as “ D%C3%A4umling”.
resolve
None
File, Folder, or null
Attempt to resolve the file system alias that this object points to. If successful, a new File or Folder object is returned that points to the resolved file system element. If the object is not an alias, or if the alias could not be resolved, the return value is null.
InDesign CS Scripting Guide JavaScript Reference 497
Folder object reference In addition to the properties and methods shown above, the Folder object contains the following properties and methods.
Properties Name:
Type:
Access:
Description:
current
Folder
read only
he current folder is returned as a Folder object. Assigning either a Folder object or a string containing the new path name sets the current folder.
startup
Folder
read only
he folder containing the executable image of the running application.
system
Folder
read only
he folder containing the operating system files.
temp
Folder
read only
he default folder for temporary files.
trash
Folder
read only
he folder containing deleted items.
Methods Name:
Parameters:
Folder (or new Folder)
Name:
Type:
Description:
path
string
he path to the folder.
selectDialog
Name:
Type:
Description:
[prompt]
String
An optional prompt that is displayed as part of the dialog if the dialog permits the display of an additional message.
[preset]
String
A default folder path.
create
None
getFiles
Name:
Type:
Description:
[mask]
string
he mask is the search mask for the file names. It may contain question marks and asterisks and is preset to * to find all files.
Return:
Description:
Folder or File
Creates a new Folder object. If the given path name refers to an already existing disk file, a File object is returned instead.
Folder (or null, if the user pressed the Cancel button)
Opens the OS specific folder select dialog. Both arguments are optional.
Boolean
Attempts to create a folder at the location the path name points to. Returns true if the folder was created.
Array or null (if no files were found)
Gets a list of File and Folder objects contained in the folder object. Instead of a mask, a function may be supplied. his function is called with a File or Folder object for every file or folder in the directory search. If the function returns true, the object is added to the array. In Windows, all aliases end with the extension “.lnk”. his extension is stripped from the file name when found to preserve compatibility with other operating systems. You can, however, search for all aliases by supplying the search mask “*.lnk”. his is not recommended, however, because it is not portable. he return value is an array of File and/or Folder objects that correspond to the files found. he return value is null if the folder does not exist.
498
JavaScript Reference
InDesign CS Scripting Guide
File object reference In addition to the properties and methods shown above, the Folder object contains the following properties and methods.
Properties Name:
Type:
Access:
Description:
creator
String
read only
he Macintosh file creator as a four-character string. On Windows, the return value is always “????”.
encoding
String
read/write
Gets or sets the encoding for subsequent read/write operations. he encoding is one of several predefined constants that follow the common Internet encoding names. Valid names are UCS-2, X-SJIS, ISO-8851-9, ASCII or the like. A special encoder, BINARY, is used to read binary files. his encoder stores each byte of the file as one Unicode character regardless of any encoding. When writing, the lower byte of each Unicode character is treated as a single byte to write. See appendix A for a list of encodings. If an unrecognized encoding is used, the encoding reverts to the system default encoding.
eof
Boolean
read only
his property has the value true if a read attempt caused the current position to be behind the end of the file. Read only. If the file is not open, the value is true.
hidden
Boolean
read/write
Returns true if the file is invisible. Assigning a Boolean value sets or clears this attribute.
length
Number
read only
he size of the file in bytes. When setting the file size, the file must not be open.
lineFeed
String
read/write
he way line feed characters are written. his can be one of the three values macintosh, unix or windows (actually, only the first character is interpreted).
readonly
Boolean
read/write
his attribute, when set, prevents the file from being altered or deleted.
type
String
read only
he Macintosh file type as a four-character string. On the Macintosh, the file type is returned. On Windows, “appl” is returned for .EXE files, “shlb” for .DLLs and “TEXT” for any other file. If the file does not exist, the file type is “????”.
Methods Name: File, new File
Parameters: Name:
Type:
Description:
path
string
he full or partial path name of the. he file that the path name refers to does not need to exist. If the argument is omitted, a temporary name is generated.
Return:
Description:
File or Folder
his function constructs a new File object. If the given path name refers to an already existing folder, a Folder object is returned instead. he CRLF sequence is preset to the system default, and the encoding is preset to the default system encoding.
InDesign CS Scripting Guide JavaScript Reference 499
Name: openDialog
Parameters: Name:
Type:
Description:
[prompt]
String
An optional prompt that is displayed as part of the dialog if the dialog permits the display of an additional message.
[select] (Windows)
String
he Windows selection string is actually a list of file types with explanative text. his list is displayed in the bottom of the dialog as a drop-down list box so the user can select which types of files to display. he elements of this list are separated by commas. Each element starts with the descriptive text, followed by a colon and the file search masks for this text. Again, each search mask is separated by a semicolon. A Selection list that allowed the selection of all text files (*.TXT and *.DOC) or all files would look like this: Text Files:*.TXT;*. DOC,All files:* A single asterisk character is a placeholder for all files.
500
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
File or null (if the user clicked the Cancel button)
Opens the built-in OS open file dialog box.
Name: saveDialog
Parameters: Name:
Type:
Description:
[prompt]
String
An optional prompt that is displayed as part of the dialog if the dialog permits the display of an additional message.
[select] (Windows)
String
he Windows selection string is actually a list of file types with explanative text. his list is displayed in the bottom of the dialog as a drop-down list box so the user can select which types of files to display. he elements of this list are separated by commas. Each element starts with the descriptive text, followed by a colon and the file search masks for this text. Again, each search mask is separated by a semicolon. A Selection list that allowed the selection of all text files (*.TXT and *.DOC) or all files would look like this:
Return:
Description:
File or null (if the user clicked the Cancel button)
Opens the built-in OS save file dialog box.
Boolean
Closes the open file. he return value is true if the file was closed, false on I/O errors.
Boolean
Copies the file to the given location. You can supply an URI path name as well as another File object. If there is a file at the target location, it is overwritten. he method returns true if the copy was successful, false otherwise. he method resolves any aliases to find the source file.
Text Files:*.TXT;*. DOC,All files:* A single asterisk character is a placeholder for all files. close copy
None Name:
Type:
Description:
target
String/File
he target location.
InDesign CS Scripting Guide JavaScript Reference 501
Name: open
Parameters: Name:
Type:
Description:
mode
String ("r", "w", or "e")
r (read) Opens for reading. If the file does not exist or cannot be found the call fails.
Return:
Description:
Boolean
Open the file for subsequent read/write operations. he type and creator arguments optional arguments that are Macintosh specific; they specify the file type and creator as two four-character strings. hey are used if the file is newly created. On other platforms, they are ignored. When open() is used to open a file for read access, the method attempts to detect the encoding of the open file. It reads a few bytes at the current location and tries to detect the Byte Order Mark character 0xFFFE. If found, the current position is advanced behind the detected character and the encoding property is set to one of the strings UCS-2BE, UCS-2LE, UCS4-BE, UCS-4LE or UTF-8. If the marker character cannot be found, it checks for zero bytes at the current location and makes an assumption about one of the above formats (except for UTF-8). If everything fails, the encoding property is set to the system encoding. he method resolves any aliases to find the file.
w (write) Opens an empty file for writing. If the file exists, its contents are destroyed. e (edit) Opens an existing file for reading and writing. [type]
[creator]
read
String
String
he Macintosh file type; a four-byte character string; ignored on non-Macintosh operating systems.
Do not open a file more than once. he operating system usually permits you to do so, but if you start writing to the file using two different File objects, you may destroy your data!
he Macintosh file creator; a four-byte character string; ignored on non-Macintosh operating systems.
Name:
Type:
Description:
chars
Integer
he number of characters to read. If the number of characters to read is not supplied, the entire file is read in one big chunk, starting at the current position. If the file is encoded, multiple bytes may be read to create single Unicode characters.
he return value is true if the file has been opened successfully, false otherwise.
String
Read the contents of the file from the current position on. Returns a string that contains up to the number of characters that were supposed to be read.
readch
None
String
Read one single text character. Line feeds are recognized as CR, LF, CRLF or LFCR pairs. If the file is encoded, multiple bytes may be read to create single Unicode characters.
readln
None
String
Read one line of text. Line feeds are recognized as CR, LF, CRLF or LFCR pairs. If the file is encoded, multiple bytes may be read to create single Unicode characters.
Boolean
Seek to a certain position in the file. Returns true if the position was changed. his method does not permit seeking to positions less than 0 or greater than the current file size.
seek
502
Name:
Type:
Description:
pos
Integer
he new current position inside the file as an offset in bytes, dependent on the seek mode.
mode
Integer
he seek mode (0 = seek to absolute position, 1 = seek relative to the current position, 2 = seek backwards from the end of the file).
JavaScript Reference
InDesign CS Scripting Guide
Name:
Parameters:
Return:
Description:
tell
None
integer
Returns the current position in the file as a an offset in bytes.
Boolean
Write the given string to the file. Returns true on success. For encoded files, writing a single Unicode character may result in multiple bytes being written. You should take care not to write to a file that is open in another application or object. his may cause loss of data, since a second write issued from another File object may overwrite your data!
Boolean
Write the given string to the file. A Line Feed sequence is appended to the string you provide. Returns true on success. If the file is encoded, multiple bytes may be read to create single Unicode characters.
write
writeln
Name:
Type:
Description:
text
String
All arguments are concatenated to form the string to be written.
Name:
Type:
Description:
text
String
All arguments are concatenated to form the string to be written.
Error messages he following messages may be returned in the error property of either the File or Folder object. Text
Explanation
File does not exist
he file or folder does not exist, but the parent folder exists.
File exists
he file or folder already exists.
File is not open
An I/O operation was attempted on a file that was closed.
EOF
Attempt to read behind the end of a file.
Bad encoding
Unable to read encoded characters from a file.
Permission denied
he OS did not allow the attempted operation.
Cannot change directory
Cannot change the current folder.
Cannot create
Cannot create a folder.
Cannot rename
Cannot rename a file or folder.
Cannot delete
Cannot delete a file or folder.
I/O error
Unspecified I/O error.
Cannot set size
Setting the file size failed.
Cannot open
Opening of a file failed.
Cannot close
Closing a file failed.
Read error
Reading from a file failed.
Write error
Writing to a file failed.
Cannot seek
Seek failure.
Cannot execute
Unable to execute the specified file.
InDesign CS Scripting Guide JavaScript Reference 503
Supported encoding names he following list of names is a basic set of encoding names supported by the File object. Some of the character encoders are built in, while the operating system is queried for most of the other encoders. Depending on the language packs installed, some of the encodings may not be available. Names that refer to the same encoding are listed in one line. Underlines are replaced with dashes before matching an encoding name. Note, however, that the File object cannot process extended Unicode characters with values greater than 65535. hese characters are let encoded as specified in the UTF-16 standard in as two characters in the range from 0xD700-0xDFFF. Built-in encodings are: US-ASCII, ASCII,ISO646-US,I SO-646.IRV:1991, ISO-IR-6, ANSI-X3.4-1968,CP367,IBM367,US,ISO646.1991-IRV UCS-2,UCS2, ISO-10646-UCS-2 UCS2LE,UCS-2LE,ISO-10646-UCS-2LE UCS2BE,UCS-2BE,ISO-10646-UCS-2BE UCS-4,UCS4, ISO-10646-UCS-4 UCS4LE,UCS-4LE,ISO-10646-UCS-4LE UCS4BE,UCS-4BE,ISO-10646-UCS-4BE UTF-8,UTF8,UNICODE-1-1-UTF-8,UNICODE-2-0-UTF-8,X-UNICODE-2-0-UTF-8 UTF16,UTF-16,ISO-10646-UTF-16 UTF16LE,UTF-16LE,ISO-10646-UTF-16LE UTF16BE,UTF-16BE,ISO-10646-UTF-16BE CP1252,WINDOWS-1252,MS-ANSI ISO-8859-1,ISO-8859-1,ISO-8859-1:1987,ISO-IR-100,LATIN1 MACINTOSH,X-MAC-ROMAN BINARY he ASCII encoder raises errors for characters greater than 127, and the BINARY encoder simply converts between bytes and Unicode characters by using the lower 8 bits. he latter encoder is convenient for reading and writing binary data.
504
JavaScript Reference
InDesign CS Scripting Guide
angleCombobox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
editValue
number
read/write
Real number value of the control.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the angle combobox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
stringList
array of strings
read/write
A list of the strings that appear on the menu of the control.
InDesign CS Scripting Guide JavaScript Reference 505
angleComboboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of angle comboboxes
Methods Method:
Parameters:
Return:
Description:
add
None
angleCombobox
Create a new angle combobox.
anyItem
None
object
Returns any angle combobox.
firstItem
None
object
Returns the first angle combobox.
object
Returns the angle combobox with the specified ID.
objects
Returns the angle comboboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
angleCombobox object or number (index of the object in its containing object)
he angleCombobox at the start of the range.
to
angleCombobox object or number (index of the object in its containing object)
he angleCombobox at the end of the range.
lastItem
None
object
Returns the last angle combobox.
middleItem
None
object
Returns the middle angle combobox.
object
Returns the next angle combobox.
object
Returns the previous angle combobox.
nextItem
previousItem
506
Name:
Type:
Description:
obj
object
he angle combobox before the one desired.
Name:
Type:
Description:
obj
object
he angle combobox ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
angleEditbox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
editValue
number
read/write
Real number value of the control.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the angle editbox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
InDesign CS Scripting Guide JavaScript Reference 507
angleEditboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of angle editboxes
Methods Method:
Parameters:
Return:
add
None
angleEditbox
Create a new angle editbox.
anyItem
None
object
Returns any angle editbox.
firstItem
None
object
Returns the first angle editbox.
object
Returns the angle editbox with the specified ID.
objects
Returns the angle editboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
angleEditbox object or number (index of the object in its containing object)
he angleEditbox at the start of the range.
to
angleEditbox object or number (index of the object in its containing object)
he angleEditbox at the end of the range.
Description:
lastItem
None
object
Returns the last angle editbox.
middleItem
None
object
Returns the middle angle editbox.
object
Returns the next angle editbox.
object
Returns the previous angle editbox.
nextItem
previousItem
508
Name:
Type:
Description:
obj
object
he angle editbox before the one desired.
Name:
Type:
Description:
obj
object
he angle editbox ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
application Properties Property:
Type:
Access:
Description:
activeDocument
document
read/write
he active (front-most) document.
activeScript
string
read only
he file path to the current script running from the scripts palette.
activeWindow
window
read/write
he active (front-most) window.
books
books
read only
All open InDesign books
buttonPreferences
buttonPreference
read only
button preferences
changePreferences
changePreference
read/write
he current change settings for InDesign’s find/change feature. his object corresponds to options found in the Find/ Change panel (including the options in the Change Format Settings section of that panel).
characterStyles
characterStyles
read only
character Styles
clipboardPreferences
clipboardPreference
read only
Clipboard preferences
colors
colors
read only
All colors
colorSettings
colorSetting
read only
he application default color management settings.
dashedStrokeStyles
dashedStrokeStyles
read only
Every dashed stroke style
dialogs
dialogs
read only
All dialogs
dictionaryPreferences
dictionaryPreference
read only
he application default user dictionary preferences. his object corresponds to the Dictionary panel of the Preferences dialog box.
displayPerformancePreferences
displayPerformancePreference
read only
he application default display performance preferences. his object corresponds to the Display Performance panel of the Preferences dialog box.
displaySettings
displaySettings
read only
Every display setting
documentPreferences
documentPreference
read only
he application default document preferences. his object corresponds to the document panel of the Preferences dialog box.
documentPresets
documentPresets
read only
Every preset that contains all of the new document settings
documents
documents
read only
All open documents
dottedStrokeStyles
dottedStrokeStyles
read only
Every dotted stroke style
epsExportPreferences
epsExportPreference
read only
eps export preferences
epsImportPreferences
epsImportPreference
read only
eps import preferences
excelImportPreferences
excelImportPreference
read only
he application default Excel Import preferences. his object corresponds to the Excel Import dialog box (which appears when you import an Excel document and have turned on the Show Options option in the Place dialog box).
filePath
string
read only
he file path to the folder containing the InDesign application (does not include the file name).
InDesign CS Scripting Guide JavaScript Reference 509
Property:
Type:
Access:
Description:
findPreferences
findPreference
read/write
he current find settings for InDesign’s find/change feature. his object corresponds to options found in the Find/ Change panel (including the options in the Find Format Settings section of that panel).
flattenerPresets
flattenerPresets
read only
Every preset that contains the transparency flattener properties
fonts
fonts
read only
Every font
fullName
string
read only
he file path to the InDesign application file, including the file name.
galleyPreferences
galleyPreference
read only
he application default story Editor preferences. his object corresponds to the story Editor Display panel of the Preferences dialog box.
generalPreferences
generalPreference
read only
he application default general preferences. his object corresponds to the General panel of the Preferences dialog box.
gradients
gradients
read only
All gradients
gridPreferences
gridPreference
read only
he application default grid preferences. his object corresponds to the Grids panel of the Preferences dialog box.
guidePreferences
guidePreference
read only
he application default guide preferences. his object corresponds to the guides and Pasteboard panel of the Preferences dialog box.
imageIOPreferences
imageIOPreferences
read only
Image IO preferences.
imePreferences
imePreference
read only
IME preferences
indexGenerationOptions
indexOptions
read only
he options controlling index generation. his object corresponds to the Generate index dialog box (to display this dialog box, choose Generate index from the index palette menu).
inks
inks
read only
Every InDesign ink
jpegExportPreferences
jpegExportPreference
read only
JPEG export preferences
languagesWithVendors
languagesWithVendors
read only
Every language with vendors
layoutAdjustmentPreferences
layoutAdjustmentPreference
read only
he application default layout adjustment preferences. he properties in this object correspond to the options shown in the Layout Adjustment dialog box (choose Layout Adjustment from the Layout menu to display this dialog box).
layoutWindows
layoutWindows
read only
Every layout window
libraries
libraries
read only
Every library
510
JavaScript Reference
InDesign CS Scripting Guide
Property: locale
Type: Name:
Decimal:
Locale.danishLocale
1279476846
Locale.englishLocale
1279477102
Locale.internationalEnglishLocale
1279477097
Locale.finnishLocale
1279477358
Locale.frenchLocale
1279477362
Locale.germanLocale
1279477613
Locale.italianLocale
1279478132
Locale.portugueseLocale
1279479911
Locale.spanishLocale
1279480688
Locale.swedishLocale
1279480695
Locale.japaneseLocale
1279478384
Access:
Description:
read only
he locale of the application.
marginPreferences
marginPreference
read only
he application default margin preferences. hese settings affect all new documents you create, but have no effect on the margin preferences of existing documents. his object corresponds to the options found in the Margins and columns dialog box.
mixedInkGroups
mixedInkGroups
read only
All mixed ink groups
mixedInks
mixedInks
read only
All mixed inks
name
string
read only
he name of the application.
packageForGoLivePreferences
packageForGoLivePreference
read only
he default Package For GoLive preferences
palettesVisible
boolean
read/write
Whether the palettes are shown
paragraphStyles
paragraphStyles
read only
paragraph Styles
parent
application
read only
he parent of the object.
pasteboardPreferences
pasteboardPreference
read only
he application default pasteboard preferences. he properties of this object correspond to the pasteboard-related options in the guides and Pasteboard panel of the Preferences dialog box.
pdfExportPreferences
pdfExportPreference
read only
pdf export preferences
pdfExportPresets
pdfExportPresets
read only
Every PDF export preset
pdfPlacePreferences
pdfPlacePreference
read only
pdf place preferences
polygonPreferences
polygonPreference
read only
he application default polygon preferences. his object corresponds to the polygon Settings dialog box (to display this dialog box, double-click the polygon tool in the Tools palette).
printerPresets
printerPresets
read only
Every preset that contains all of the print settings
selection
array of objects
read/write
he current selection of the active window.
spellPreferences
spellPreference
read only
he application default spelling preferences. his object corresponds to the Spelling panel of the Preferences dialog box.
storyPreferences
storyPreference
read only
he application default story preferences. his object corresponds to the story palette. hese settings affect all new InDesign documents, but have no effect on the story preferences in existing documents.
storyWindows
storyWindows
read only
Every story window
InDesign CS Scripting Guide JavaScript Reference 511
Property:
Type:
Access:
Description:
stripedStrokeStyles
stripedStrokeStyles
read only
Every stripe stroke style
strokeStyles
strokeStyles
read only
Every stroke style
svgExportPreferences
svgExportPreference
read only
SVG export preferences
swatches
swatches
read only
All swatches
taggedTextExportPreferences
taggedTextExportPreference
read only
he application tagged text export preferences. his object corresponds to the Tagged text Export dialog box, which appears when you export InDesign tagged text.
taggedTextImportPreferences
taggedTextImportPreference
read only
he application default tagged text import preferences. his object corresponds to the Tagged text Import dialog box (which appears when you import a tagged text file and have turned on the Show Options option in the Place dialog box).
textDefaults
textDefault
read only
he application default text formatting. Changing the application default text formatting sets the default formatting for all new documents, but has no effect on existing documents. To change the default text formatting for an existing document, change the settings of the text default object for that document.
textExportPreferences
textExportPreference
read only
he application text export preferences. his object corresponds to the text Export dialog box, which appears when you export text.
textFramePreferences
textFramePreference
read only
he application default text frame preferences. Changing the properties of this object affects all new documents; the text frame preferences in existing documents are not changed.
textImportPreferences
textImportPreference
read only
he application default text import preferences. his object corresponds to the text Import dialog box (which appears when you import a text file and have turned on the Show Options option in the Place dialog box).
textPreferences
textPreference
read only
he application default text preferences. his object corresponds to the text panel of the Preferences dialog box.
tints
tints
read only
All tints
tocStyles
tocStyles
read only
Every TOC style
transformPreferences
transformPreference
read only
Transform preferences
transparencyPreferences
transparencyPreference
read only
he application default transparency preferences. his object corresponds to the setting of the Transparency Blend Space submenu of the Edit menu.
trapPresets
trapPresets
read only
Every InDesign trap preset
unusedSwatches
objects
read only
A list of the unused swatches.
userDictionaries
userDictionaries
read only
Every user dictionary
read/write
Use this property to suppress or activate the application’s display of alerts and dialog boxes. If you turn this property off, make certain that you turn it on again before your script completes execution.
read only
he version of InDesign.
userInteractionLevel
version
512
Name:
Decimal:
UserInteractionLevels.neverInteract
1699640946
UserInteractionLevels.interactWithAll
1699311169
number
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
viewPreferences
viewPreference
read only
he application default view preferences. he properties of this object correspond to the options in the Units and Increments panel of the Preferences dialog box.
visible
boolean
read only
If true, the application is visible.
windows
windows
read only
Every window
wordRTFImportPreferences
wordRTFImportPreference
read only
he word and RTF import preferences
xmlExportMaps
xmlExportMaps
read only
Every style to XML tag mapping
xmlExportPreferences
xmlExportPreference
read only
he default XML export preferences
xmlImportMaps
xmlImportMaps
read only
Every XML tag to style mapping
xmlImportPreferences
xmlImportPreference
read only
he default XML import preferences
xmlTags
xmlTags
read only
All XML tags
xmlViewPreferences
xmlViewPreference
read only
he default XML view preferences
Methods Method:
Parameters:
Return:
Description:
activate
None
nothing
Brings InDesign to the front.
cascadeWindows
None
nothing
Arranges the open InDesign document windows in a “cascade” (i.e., overlapping windows).
copy
None
nothing
Copies the selection in the active document window to the clipboard.
objects
Create a new independent objects collection.
createCollection
Name:
Type:
Description:
[objects]
array of objects
A list of objects to add to the collection.
cut
None
nothing
Cuts the selection in the active document window to the clipboard.
deleteUnusedTags
None
nothing
Deletes all unused XML markup tags.
nothing
Runs a script file stored on your disk.
doScript
Name:
Type:
Description:
script
file object or file name as string
he script to execute. Either a file reference or string containing the file name (including the file path).
[language]
Name:
Decimal:
ScriptLanguage. javascript
1447185511
ScriptLanguage. visualBasic
1246973031
ScriptLanguage. applescript
1433299822
he language of the script to execute. If not specified, the language used to call this method is used.
InDesign CS Scripting Guide JavaScript Reference 513
Method: exportPresets
Parameters: Name:
Type:
format
import
open
514
Decimal:
ExportPresetFormat. pdfExportPresetsFormat
1716745324
ExportPresetFormat. printerPresetsFormat
1918071916
ExportPresetFormat. flattenerPresetsFormat
1951626348
ExportPresetFormat. documentPresetsFormat
1683190892
a file to which to export the object.
Name:
Type:
Description:
Name:
Decimal:
ExportPresetFormat. pdfExportPresetsFormat
1716745324
ExportPresetFormat. printerPresetsFormat
1918071916
ExportPresetFormat. flattenerPresetsFormat
1951626348
ExportPresetFormat. documentPresetsFormat
1683190892
string
he full file path of the file to import.
Name:
Type:
Description: Decimal:
ImportFormat. characterStylesFormat
1131565940
ImportFormat. paragraphStylesFormat
1885885300
ImportFormat. textStylesFormat
1668305780
ImportFormat. tocStylesFormat
1415795572
File
An InDesign file to import from.
Name:
Type:
Description:
from
string
What to import from.
Name:
Type:
Description:
from
File
A reference to the file you want to open.
[showingWindow]
boolean
If true, show the document window ater opening the file.
InDesign CS Scripting Guide
nothing
Imports a file containing document presets, flattener presets, PDF export presets, or printer presets. To import text or graphics, use the place command of the document, spread, page, page item, or text object you want to import into. To import XML tags, use the loadXMLTags command.
nothing
Import styles.
nothing
Load a set of tags from an external file.
object
Opens a document, book or library.
he format.
from
JavaScript Reference
Export the presets to a file.
he preset format to use.
from
Name:
Description:
nothing
he preset format.
string
format
loadXMLTags
Name:
to
format
importStyles
Description:
Return:
Method:
Parameters:
Return:
Description:
paste
None
nothing
Pastes data from the clipboard into the active document window.
pasteInPlace
None
nothing
Paste data from the clipboard into front document window at the same position as the original
pasteInto
None
nothing
Pastes data from the clipboard into the selected object in the active document window.
nothing
Prints one or more documents.
nothing
Quits InDesign.
nothing
Save a set of tags to an external file.
printOut
quit
Name:
Type:
Description:
from
object
One or more files.
[printDialog]
boolean
If true, display the Print dialog box.
[using]
printer preset object or preset name as string
he printer preset to use.
Name:
Type:
Description:
[saving]
saveXMLTags
Name:
Decimal:
SaveOptions.no
1852776480
SaveOptions.ask
1634954016
SaveOptions.yes
2036691744
Use SaveOptions. ask to display a dialog box asking if the user would like to save changes for each unsaved open document; use SaveOptions.no to close all documents without savign; use SaveOptions.yes to save all unsaved open documents.
Name:
Type:
Description:
to
string
Where to export to.
InDesign CS Scripting Guide JavaScript Reference 515
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
selectableItems
array of objects
he object(s) to select as Object, Array of objects or idNothingEnum.
[existingSelection]
tileWindows
516
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects an object or objects. If the object is a text object (e.g., characters, words, lines, paragraphs), any other selected objects are deselected (the AppendSelection parameter has no effect).
nothing
Arranges the open InDesign document windows in a “tiled” layout (i.e., non-overlapping windows).
How to handle the existing selection.
asset Properties Property: assetType
Type: Name:
Decimal:
AssetType.imageType
1952409965
AssetType.epsType
1952400720
assetAssetType.pdfType
1952403524
assetAssetType.geometryType
1952409445
AssetType.pageType
1952411745
AssetType.textType
1952412773
Access:
Description:
read/write
he type of the asset.
date
date
read only
he date and time the asset was created.
description
string
read/write
A description of the asset.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the asset within its parent library
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the asset.
parent
library
read only
he parent of the object.
Methods Method: extractLabel
insertLabel
placeAsset
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
on
document
he document in which to place the asset.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
object
Places the asset in a document.
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 517
assets Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of assets
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any asset.
firstItem
None
object
Returns the first asset.
object
Returns the asset with the specified ID.
objects
Returns the assets within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
asset object, number (index of the object in its containing object), or string (name of the object)
he asset at the start of the range.
to
asset object, number (index of the object in its containing object), or string (name of the object)
he asset at the end of the range.
lastItem
None
object
Returns the last asset.
middleItem
None
object
Returns the middle asset.
object
Returns the next asset.
object
Returns the previous asset.
nextItem
previousItem
518
Name:
Type:
Description:
obj
object
he asset before the one desired.
Name:
Type:
Description:
obj
object
he asset ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
behavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the behavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
parent
object
read only
he parent of the object.
Methods Method: extractLabel
insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 519
behaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of behaviors
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any behavior.
firstItem
None
object
Returns the first behavior.
object
Returns the behavior with the specified ID.
objects
Returns the behaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
behavior object, number (index of the object in its containing object), or string (name of the object)
he behavior at the start of the range.
to
behavior object, number (index of the object in its containing object), or string (name of the object)
he behavior at the end of the range.
lastItem
None
object
Returns the last behavior.
middleItem
None
object
Returns the middle behavior.
object
Returns the next behavior.
object
Returns the previous behavior.
nextItem
previousItem
520
Name:
Type:
Description:
obj
object
he behavior before the one desired.
Name:
Type:
Description:
obj
object
he behavior ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
book Properties Property:
Type:
Access:
Description:
automaticDocumentConversion
boolean
read/write
If true, automatically convert document during repagination and synchronization
automaticPagination
boolean
read/write
If true, repaginate the book documents when the book pagination changes.
bookContents
bookContents
read only
Every InDesign book content
filePath
string
read only
he file path to the book file (does not include the file name).
fullName
string
read only
he file path to the book file, including the file name.
index
integer
read only
index of the book within its parent application
insertBlankPage
boolean
read/write
If true, insert blank pages to meet the odd/even setting.
modified
boolean
read only
If true, the document has been modified since it was last saved.
name
string
read only
he file name of the book.
parent
application
read only
he parent of the object.
printPreferences
printPreference
read only
he print preferences of the book.
read/write
Sets the repagination options for the book.
repaginationOption
Name:
Decimal:
RepaginateOption.nextPage
1885500011
RepaginateOption.nextOddPage
1332765291
RepaginateOption.nextEvenPage
1164993131
saved
boolean
read only
If true, the document has been saved since it was opened.
styleSourceDocument
document
read/write
he current master document.
synchronizeOptions
synchronizeOptions
read only
Every synchronize option style
Methods Method: close
Parameters: Name: [saving]
exportFile
Type:
Description:
Name:
Decimal:
SaveOptions.no
1852776480
SaveOptions.ask
1634954016
SaveOptions.yes
2036691744
Return:
Description:
nothing
Close the book.
nothing
Export the book to PDF
Use SaveOptions. ask to display a dialog box asking if the user would like to save changes for each unsaved open document; use SaveOptions.no to close all documents without savign; use SaveOptions.yes to save all unsaved open documents.
[savingIn]
file object or file name as string
he file in which to save the book.
Name:
Type:
Description:
[to]
File
he file to export.
InDesign CS Scripting Guide JavaScript Reference 521
Method: package
packageForGoLive
printOut
save
synchronize
522
Parameters: Name:
Type:
Description:
to
string
A folder, alias or path as string in which to place the packaged files.
copyingFonts
boolean
If true, copy required fonts.
copyingLinkedGraphics
boolean
If true, copy linked graphics file.
copyingProfiles
boolean
If true, copy profiles.
updatingGraphics
boolean
If true, update graphics links before packaging.
includingHiddenLayers
boolean
If true, include objects on hidden layers.
ignorePreflightErrors
boolean
If true, ignore preflight errors and package anyways.
creatingReport
boolean
If true, create package report.
Name:
Type:
Description:
location
string
File location for package.
Name:
Type:
Description:
[printDialog]
boolean
If true, invoke the print dialog.
[using]
printer preset object or preset name as string
Printer preset to use.
Name:
Type:
Description:
[to]
File
Where to save the book. If the book is already saved, a copy is saved at this path, the original file is closed the new copy is opened.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
boolean
Packages the document.
boolean
Packages the book for GoLive.
nothing
Print the book.
nothing
Save the book.
nothing
Synchronize whole to the Style Source document
bookContent Properties Property:
Type:
Access:
Description:
date
date
read only
he date and time the book content file was last saved.
documentPageRange
string
read only
he page range of the book content document.
fullName
string
read only
he file path to the book content file, including the file name.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the bookContent within its parent book
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
parent
book
read only
he parent of the object.
size
integer
read only
Size of the book content file on disk.
read only
he status of the book content file.
status
Name:
Decimal:
BookContentStatus.normal
1852797549
BookContentStatus.missingDocument
1148150605
BookContentStatus.documentOutOfDate
1148150596
BookContentStatus.documentInUse
1148150601
BookContentStatus.documentIsOpen
1148150607
Methods Method: extractLabel
insertLabel
move
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[to]
[reference] remove
None
Name:
Decimal:
LocationOptions.before
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions. atBeginning
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
bookContent
Move the book content before/ ater another book content, or to beginning/end.
nothing
Deletes the object.
location.
Before/ater this book content.
InDesign CS Scripting Guide JavaScript Reference 523
Method: replace
synchronize
524
Parameters: Name:
Type:
Description:
fullName
string
Full path name of the replaced book content.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
bookContent
Replace a file.
nothing
Sync this book content to the Style Source document
bookContents Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of bookContents
Methods Method: add
Parameters: Name:
Type:
Description:
fullName
string
Full path name of the new book content.
Return:
Description:
bookContent
Create a new book content.
anyItem
None
object
Returns any bookContent.
firstItem
None
object
Returns the first bookContent.
object
Returns the bookContent with the specified ID.
objects
Returns the bookContents within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
bookContent object or number (index of the object in its containing object)
he bookContent at the start of the range.
to
bookContent object or number (index of the object in its containing object)
he bookContent at the end of the range.
lastItem
None
object
Returns the last bookContent.
middleItem
None
object
Returns the middle bookContent.
object
Returns the next bookContent.
object
Returns the previous bookContent.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he bookContent before the one desired.
Name:
Type:
Description:
obj
object
he bookContent after the one desired.
InDesign CS Scripting Guide JavaScript Reference 525
bookmark Properties Property:
Type:
Access:
Description:
bookmarks
bookmarks
read only
Every bookmark
destination
object
read only
he destination of the bookmark.
id
integer
read only
A unique number identifying the object.
indent
integer
read only
he indent level of the bookmark.
index
integer
read only
index of the bookmark within its parent document or bookmark
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read/write
he name of the bookmark.
parent
object
read only
he parent of the object.
Methods Method: extractLabel
insertLabel
move
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
to
bookmark
he new parent bookmark.
indentLevel
integer
he new indent level.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Move this bookmark under another.
remove
None
nothing
Deletes the object.
showBookmark
None
nothing
Go to the bookmark.
526
JavaScript Reference
InDesign CS Scripting Guide
bookmarks Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of bookmarks
Methods Method: add
Parameters: Name:
Type:
Description:
destination
object
he bookmark’s destination as hyperlinktextDestination, hyperlinkpageDestination, hyperlinkExternalpageDestination or hyperlinkURLDestination.
Return:
Description:
bookmark
Create a new bookmark.
anyItem
None
object
Returns any bookmark.
firstItem
None
object
Returns the first bookmark.
object
Returns the bookmark with the specified ID.
objects
Returns the bookmarks within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
bookmark object, number (index of the object in its containing object), or string (name of the object)
he bookmark at the start of the range.
to
bookmark object, number (index of the object in its containing object), or string (name of the object)
he bookmark at the end of the range.
lastItem
None
object
Returns the last bookmark.
middleItem
None
object
Returns the middle bookmark.
object
Returns the next bookmark.
object
Returns the previous bookmark.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he bookmark before the one desired.
Name:
Type:
Description:
obj
object
he bookmark ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 527
books Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of books
Methods Method: add
Parameters: Name:
Type:
Description:
fullName
string
Full path name of the new book.
Return:
Description:
book
Create a new book.
anyItem
None
object
Returns any book.
firstItem
None
object
Returns the first book.
objects
Returns the books within the specified range.
itemByRange
Name:
Type:
Description:
from
book object, number (index of the object in its containing object), or string (name of the object)
he book at the start of the range.
to
book object, number (index of the object in its containing object), or string (name of the object)
he book at the end of the range.
lastItem
None
object
Returns the last book.
middleItem
None
object
Returns the middle book.
object
Returns the next book.
object
Returns the previous book.
nextItem
previousItem
528
Name:
Type:
Description:
obj
object
he book before the one desired.
Name:
Type:
Description:
obj
object
he book ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
borderPanel Properties Property:
Type:
Access:
Description:
angleComboboxes
angleComboboxes
read only
All angle comboboxes
angleEditboxes
angleEditboxes
read only
All angle editboxes
borderPanels
borderPanels
read only
All border panels
checkboxControls
checkboxControls
read only
All checkbox controls
dialogColumns
dialogColumns
read only
All columns
dialogRows
dialogRows
read only
All dialog rows
dropdowns
dropdowns
read only
All dropdowns
enablingGroups
enablingGroups
read only
All enabling checkbox panels
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the border panel within its parent dialog column, dialog row, enabling group or border panel
integerComboboxes
integerComboboxes
read only
All integer comboboxes
integerEditboxes
integerEditboxes
read only
All integer editboxes
measurementComboboxes
measurementComboboxes
read only
All measurement comboboxes
measurementEditboxes
measurementEditboxes
read only
All measurement editboxes
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
percentComboboxes
percentComboboxes
read only
All percent comboboxes
percentEditboxes
percentEditboxes
read only
All percent editboxes
radiobuttonGroups
radiobuttonGroups
read only
All radio button groups
realComboboxes
realComboboxes
read only
All real number comboboxes
realEditboxes
realEditboxes
read only
All real number editboxes
staticTexts
staticTexts
read only
All static texts
textEditboxes
textEditboxes
read only
All text editboxes
widgets
widgets
read only
All widgets
InDesign CS Scripting Guide JavaScript Reference 529
borderPanels Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of border panels
Methods Method:
Parameters:
Return:
Description:
add
None
borderPanel
Create a new border panel.
anyItem
None
object
Returns any border panel.
firstItem
None
object
Returns the first border panel.
object
Returns the border panel with the specified ID.
objects
Returns the border panels within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
borderPanel object or number (index of the object in its containing object)
he borderPanel at the start of the range.
to
borderPanel object or number (index of the object in its containing object)
he borderPanel at the end of the range.
lastItem
None
object
Returns the last border panel.
middleItem
None
object
Returns the middle border panel.
object
Returns the next border panel.
object
Returns the previous border panel.
nextItem
previousItem
530
Name:
Type:
Description:
obj
object
he border panel before the one desired.
Name:
Type:
Description:
obj
object
he border panel after the one desired.
JavaScript Reference
InDesign CS Scripting Guide
button Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scale of the page item relative to its containing page item
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item
absoluteVerticalScale
number
read/write
he vertical scale of the page item relative to its containing page item
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page items
appearanceName
string
read only
Name of any appearance of field
associatedXMLElement
xmlElement
read only
Returns the associated XML element
behaviors
behaviors
read only
Every behavior object
read/write
he blend mode used to combine the object’s color with the background
read only
Every close window behavior object
read/write
he type of corner effect on the object
blendMode
closeWindowBehaviors cornerEffect
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
closeWindowBehaviors Name:
Decimal:
CornerEffects.none
1852796517
CornerEffects.roundedCorner
1667592804
CornerEffects.inverseRoundedCorner
1667591798
CornerEffects.insetCorner
1667591795
CornerEffects.bevelCorner
1667588726
CornerEffects.fancyCorner
1667589742
cornerRadius
number
read/write
he radius of the corner
description
string
read/write
Description
InDesign CS Scripting Guide JavaScript Reference 531
Property: endCap
endJoin
epss
Type: Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
epss
featherCornerType
featherMode
Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
Access:
Description:
read/write
he appearance of both ends of an open path
read/write
he appearance of the stroke at corner points
read only
eps
read/write
he type of feathering to apply
read/write
he feather mode
featherWidth
number
read/write
he width of the feathering
fillColor
swatch object or swatch name as string
read/write
he fill color of the object as swatch or string
fillTint
number
read/write
he object’s fill tint percentage (-1 indicates no override)
gapColor
swatch
read/write
Gap color for the page item
gapTint
number
read/write
Gap tint for the page item
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
gotoAnchorBehaviors
gotoAnchorBehaviors
read only
Every goto anchor behavior object
gotoFirstPageBehaviors
gotoFirstPageBehaviors
read only
Every goto first page behavior object
gotoLastPageBehaviors
gotoLastPageBehaviors
read only
Every goto last page behavior object
gotoNextPageBehaviors
gotoNextPageBehaviors
read only
Every goto next page behavior object
gotoNextViewBehaviors
gotoNextViewBehaviors
read only
Every goto next view behavior object
gotoPreviousPageBehaviors
gotoPreviousPageBehaviors
read only
Every goto previous page behavior object
gotoPreviousViewBehaviors
gotoPreviousViewBehaviors
read only
Every goto previous view behavior object
gotoURLBehaviors
gotoURLBehaviors
read only
Every goto URL behavior object
gradientFillAngle
number
read/write
Angle of a linear gradient on the fill
gradientFillLength
number
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill as Array of 2 Units (numbers or strings)
gradientStrokeAngle
number
read/write
Angle of a linear gradient on the stroke
532
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradientStrokeLength
number
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the stroke
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
Center point for a radial gradient or starting point for a linear gradient on the stroke as Array of 2 Units (numbers or strings)
graphicLines
graphicLines
read only
All graphic lines
graphics
graphics
read only
All graphics
groups
groups
read only
groups
horizontalScale
number
read/write
he scale percentage in the horizontal direction
id
integer
read only
he button’s unique id
images
images
read only
images
index
integer
read only
index of the button within its parent spread, master spread, group, textFrame, story, text, character, word, line, textcolumn, paragraph, textStyleRange, cell, table, page, document, layer or insertion point
isolateBlending
boolean
read/write
Indicates whether the object should blend in isolation
itemLayer
layer
read/write
he layer the object is on
knockoutGroup
boolean
read/write
Indicates whether the object is a knockout group
label
string
letLineEnd
localDisplaySetting
Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
read/write
A label that can be set to any string
read/write
A shape, such as an arrowhead, on the let end of an open path
read/write
he display settings for this page item
locked
boolean
read/write
Whether the button is locked
miterLimit
number
read/write
When a corner point switches from a mitered (pointed) join to a beveled (squared-off) join
movieBehaviors
movieBehaviors
read only
movie behaviors collection object
name
string
read/write
he name of the button
nonprinting
boolean
read/write
Whether the page item is non-printing
opacity
number
read/write
he opacity of the object
InDesign CS Scripting Guide JavaScript Reference 533
Property:
Type:
Access:
Description:
openFileBehaviors
openFileBehaviors
read only
Open file behaviors collection object
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, overprint the fill
overprintGap
boolean
read/write
If true, overprint the gap
overprintStroke
boolean
read/write
If true, overprint the stroke
overridden
boolean
read only
True if this page item originated on a master spread and was later overridden. It is still linked to the page item on the master
overriddenMasterPageItem
pageItem
read only
he overridden master page item
pageItems
pageItems
read only
All page items
parent
object
read only
he button’s parent as spread, master spread, group, textFrame, story, text, character, word, line, textcolumn, paragraph, textStyleRange, cell, table, page, document, layer or insertion point
pdfs
pdfs
read only
PDFs.
picts
picts
read only
Picts.
polygons
polygons
read only
All polygons
quitBehaviors
quitBehaviors
read only
Quit behaviors collection object
rectangles
rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the right end of an open path
read/write
Angle of rotation
rightLineEnd
rotationAngle
534
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
number
JavaScript Reference
InDesign CS Scripting Guide
Property: shadowBlendMode
Type: Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Access:
Description:
read/write
he blend mode to use for drawing the shadow
shadowBlurRadius
number
read/write
he radius of the blur to apply to the shadow
shadowColor
swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the shadow
shadowxOffset
number
read/write
he horizontal offset of the shadow
shadowyOffset
number
read/write
he vertical offset of the shadow
shearAngle
number
read/write
he shear angle of the page item relative to the spread
showHideFieldsBehaviors
showHideFieldsBehaviors
read only
Show/hide fields behaviors collection object
soundBehaviors
soundBehaviors
read only
sound behaviors collection object
states
states
read only
Every form field appearance state
read/write
he stroke alignment for the page item
read/write
he stroke color of the object as swatch or string
read/write
he adjustment to add to the corners of a dashed line
strokeAlignment
strokeColor strokeCornerAdjustment
Name:
Decimal:
StrokeAlignment.centerAlignment
1936998723
StrokeAlignment.insideAlignment
1936998729
StrokeAlignment.outsideAlignment
1936998735
swatch object or swatch name as string Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
strokeDashAndGap
array of measurement strings or numbers as [dash, gap, dash, gap,...]
read/write
he dash and gap settings of a dashed line. A list of up to 6 values as Array of Units (numbers or strings)
strokeTint
number
read/write
he object’s stroke tint percentage (-1 indicates no override)
InDesign CS Scripting Guide JavaScript Reference 535
Property:
Type:
Access:
Description:
strokeType
strokeStyle
read/write
he stroke type
strokeWeight
number
read/write
he weight (in points) to apply to the stroke of the object
textFrames
textFrames
read only
text Frames
textWrapPreferences
textWrapPreference
read only
he text wrap preferences
verticalScale
number
read/write
he scale percentage in the vertical direction
viewZoomBehaviors
viewZoomBehaviors
read only
View Zoom behaviors collection object
read/write
Visibility of the item in the output PDF.
visibilityInPDF
Name:
Decimal:
VisibilityInPDF.visibleInPDF
1180068211
VisibilityInPDF.hiddenInPDF
1181247844
VisibilityInPDF.visibleButDoesNotPrintInPDF
1180061264
VisibilityInPDF.hiddenButPrintableInPDF
1179140688
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
wmfs
wmfs
read only
WMFs.
Methods Method: addPath
applyAppearance
Parameters: Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
using
string
the appearance.
Return:
Description:
pageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (objects>p athfinder>Add).
nothing
Apply an appearance.
Brings the object forward.
bringForward
None
nothing
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
pageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (objects>pathfinder> Exclude Overlap).
excludeOverlapPath
536
Name:
Type:
Description:
with
objects
he objects to exclude.
JavaScript Reference
InDesign CS Scripting Guide
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
fit
insertLabel
intersectPath
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Fits content within the frame.
nothing
Sets the string associated with the given key (label name).
pageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (objects>pathfinder>Intersect).
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
Return:
Name:
Decimal:
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions.proportionally
1667591779
FitOptions. contentToFrame
1668247152
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
he objects to intersect with.
InDesign CS Scripting Guide JavaScript Reference 537
Method:
Parameters:
makeCompoundPath
Name:
Type:
Description:
with
objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
minusBack
move
override
place
placeXML
538
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
pageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
pageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (objects>pathfi nder>Minus Back).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
pageItem
Overrides an item from the master page and places it on the page.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
Method:
Parameters:
Return:
Description:
releaseCompoundPath
None
objects
release compound path.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
resize
Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
InDesign CS Scripting Guide JavaScript Reference 539
Method: rotate
select
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Rotate the page item.
nothing
Select this button.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
540
JavaScript Reference
InDesign CS Scripting Guide
Method: shear
store
subtractPath
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
pageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (objects>pathfinder>Subtract).
InDesign CS Scripting Guide JavaScript Reference 541
Method: unlink
Parameters: Name: from
542
JavaScript Reference
Type:
Description:
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
buttonPreference Properties Property:
Type:
Access:
Description:
appearanceName
string
read/write
Name of any appearance of field
name
string
read/write
he name of the buttonPreference
parent
object
read only
he buttonPreference’s parent as application or document
InDesign CS Scripting Guide JavaScript Reference 543
buttons Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of buttons
Methods Method: add
Parameters: Name:
Type:
Description:
[layer]
layer object or layer name as string
he layer on which to create the button as layer.
[at]
[reference]
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
button
Create a new button.
Location.
Before/ater this button or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
anyItem
None
object
Returns any button.
firstItem
None
object
Returns the first button.
object
Returns the button with the specified ID.
objects
Returns the buttons within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
button object, number (index of the object in its containing object), or string (name of the object)
he button at the start of the range.
to
button object, number (index of the object in its containing object), or string (name of the object)
he button at the end of the range.
lastItem
None
object
Returns the last button.
middleItem
None
object
Returns the middle button.
object
Returns the next button.
object
Returns the previous button.
nextItem
previousItem
544
Name:
Type:
Description:
obj
object
he button before the one desired.
Name:
Type:
Description:
obj
object
he button ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
cell Properties Property:
Type:
Access:
Description:
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items contained by this object, regardless of their location in the object hierarchy (i.e., including objects nested within other objects, such as groups).
autoGrow
boolean
read/write
If true, the cell will expand to display its content.
bottomEdgeStrokeColor
swatch
read/write
he stroke color of the bottom edge of the cell.
bottomEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the bottom edge of the cell.
bottomEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the bottom edge of the cell.
bottomEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottomEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the bottom edge of the cell.
bottomEdgeStrokePriority
integer
read/write
he stroke priority of the bottom edge
bottomEdgeStrokeTint
number
read/write
he tint applied to the stroke of the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottomEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the bottom edge of the cell.
bottomEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the bottom edge of the cell.
bottomInset
measurement string or number
read/write
he bottom inset the cell.
buttons
buttons
read only
Every button
cells
cells
read only
cells
characters
characters
read only
characters
clipContentToCell
boolean
read/write
If true, clip the content of the cell to the boundaries of the cell.
columns
columns
read only
All columns
columnSpan
integer
read only
he number of columns that this cell spans
contents
string
read/write
he text contents of the cell.
diagonalLineInFront
boolean
read/write
If true, the diagonal line will draw in front of the contents of the cell.
diagonalLineStrokeColor
swatch
read/write
he stroke color of the diagonal line(s) applied to the cell.
diagonalLineStrokeGapColor
swatch
read/write
he gap color of the diagonal line(s).
diagonalLineStrokeGapOverprint
boolean
read/write
If true, overprint the color of the gap of the diagonal line(s).
diagonalLineStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
InDesign CS Scripting Guide JavaScript Reference 545
Property:
Type:
Access:
Description:
diagonalLineStrokeOverprint
boolean
read/write
If true, overprint the diagonal line(s) applied to the cell.
diagonalLineStrokeTint
number
read/write
he tint applied to the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonalLineStrokeType
strokeStyle
read/write
he type of stroke applied to the diagonal line(s) of the cell.
diagonalLineStrokeWeight
measurement string or number
read/write
he stroke weight of the diagonal line(s) of the cell.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, gradient, tint, or mixed ink applied to the fill of the cell.
fillTint
number
read/write
he tint percentage applied to the fill of the cell (-1 indicates 100%, or no tint override).
read/write
he method used to calculate the distance from the first baseline of text in the cell and the top inset of the cell.
firstBaselineOffset
Name:
Decimal:
FirstBaseline.ascentOffset
1296135023
FirstBaseline.capHeight
1296255087
FirstBaseline.leadingOffset
1296852079
FirstBaseline.emboxHeight
1296386159
FirstBaseline.xHeight
1299728495
FirstBaseline.fixedHeight
1296451695
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
Angle of a linear gradient on the fill
gradientFillLength
number
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
graphicLines
graphicLines
read only
All graphic lines
groups
groups
read only
groups
height
measurement string or number
read/write
he height of the cell.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the cell within its parent table.
innerColumnStrokeColor
swatch
read/write
he stroke color of the inner column of the cell.
innerColumnStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the inner column of the cell.
innerColumnStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the inner column of the cell.
innerColumnStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the inner column of the cell (-1 indicates 100%, or no tint override).
innerColumnStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the inner column of the cell.
innerColumnStrokeTint
number
read/write
he tint applied to the stroke of the inner column of the cell (-1 indicates 100%, or no tint override).
innerColumnStrokeType
strokeStyle
read/write
he type of stroke applied to the inner column of the cell.
innerColumnStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the inner column of the cell.
innerRowStrokeColor
swatch
read/write
he stroke color of the inner row of the cell.
546
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
innerRowStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the inner row of the cell.
innerRowStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the inner row
innerRowStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the inner row of the cell (-1 indicates 100%, or no tint override).
innerRowStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the inner row of the cell.
innerRowStrokeTint
number
read/write
he tint applied to the stroke of the inner row of the cell (-1 indicates 100%, or no tint override).
innerRowStrokeType
strokeStyle
read/write
he type of stroke applied to the inner row of the cell.
innerRowStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the inner row of the cell.
insertionPoints
insertionPoints
read only
Insertion Points
keepWithNextRow
boolean
read/write
If true, keep this row with the next row when the rows break between pages, text frames, or text columns.
letEdgeStrokeColor
swatch
read/write
he stroke color of the let edge of the cell.
letEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the let edge of the cell.
letEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the let edge of the cell.
letEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the let edge of the cell (-1 indicates 100%, or no tint override).
letEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the let edge of the cell.
letEdgeStrokePriority
integer
read/write
he stroke priority of the let edge
letEdgeStrokeTint
number
read/write
he tint of the color of the let edge
letEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the let edge of the cell.
letEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the let edge of the cell.
letInset
measurement string or number
read/write
he let inset of the cell.
lines
lines
read only
lines
maximumHeight
measurement string or number
read/write
Specifies the maximum height of the row containing the cell.
minimumFirstBaselineOffset
measurement string or number
read/write
he minimum distance (in points) between the first baseline of the text in the cell and the top inset of the frame or cell.
minimumHeight
measurement string or number
read/write
Constrains the row height to an amount no smaller than this value. he row may be larger than this amount, however, as the row height will continue to grow automatically as text is added.
name
string
read only
he name of the cell, in the form row number; column number. he third cell of the fourth row, for example, would have the name “R4:C3”.
ovals
ovals
read only
All ovals
overflows
boolean
read only
If true, the cell contains overset (i.e., uncomposed) text.
InDesign CS Scripting Guide JavaScript Reference 547
Property:
Type:
Access:
Description:
overprintFill
boolean
read/write
If true, overprint the fill of the cell.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
paragraphSpacingLimit
measurement string or number
read/write
When the vertical justification of the cell is set to justified, this is the maximum amount of space that will be added between paragraphs. Increase this value to encourage spacing between paragraphs of vertically justified text; decrease it to increase the leading between lines of text in vertically justified text.
parent
object
read only
he parent of the object.
parentColumn
column
read only
he parent column of the cell.
parentRow
row
read only
he parent row of the cell.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
rightEdgeStrokeColor
swatch
read/write
he stroke color of the right edge of the cell.
rightEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the right edge of the cell.
rightEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the right edge of the cell.
rightEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the right edge of the cell (-1 indicates 100%, or no tint override).
rightEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the right edge of the cell.
rightEdgeStrokePriority
integer
read/write
he stroke priority of the right edge
rightEdgeStrokeTint
number
read/write
he tint applied to the stroke of the right edge of the cell (-1 indicates 100%, or no tint override).
rightEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the right edge of the cell.
rightEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the right edge of the cell.
rightInset
measurement string or number
read/write
he right inset the cell.
rotationAngle
number
read/write
he rotation angle of the cell.
rows
rows
read only
All rows
rowSpan
integer
read only
he number of rows that this cell spans
read/write
he type of the row containing the cell.
read/write
Where to start the row
rowType
startRow
548
Name:
Decimal:
RowTypes.bodyRow
1161982583
RowTypes.headerRow
1162375799
RowTypes.footerRow
1162244727
RowTypes.mixedState
1162703479
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
tables
tables
read only
All tables
textCellRotationFollowsStoryDirection
boolean
read/write
Whether text cell direction matches the story direction
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
topEdgeStrokeColor
swatch
read/write
he stroke color of the top edge of the cell.
topEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the top edge of the cell.
topEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the top edge of the cell.
topEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the top edge of the cell (-1 indicates 100%, or no tint override).
topEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the top edge of the cell.
topEdgeStrokePriority
integer
read/write
he stroke priority of the top edge
topEdgeStrokeTint
number
read/write
he tint applied to the stroke of the top edge of the cell (-1 indicates 100%, or no tint override).
topEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the right edge of the cell.
topEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the top edge of the cell.
topInset
measurement string or number
read/write
he top inset the cell.
topLetDiagonalLine
boolean
read/write
If true, draw a diagonal line from the top let corner to the bottom right corner of the cell .
topRightDiagonalLine
boolean
read/write
If true, draw a diagonal line from the top right corner to the bottom let corner of the cell .
read/write
he vertical justification applied to the text in the cell.
verticalJustification
Name:
Decimal:
VerticalJustification.topAlign
1953460256
VerticalJustification.centerAlign
1667591796
VerticalJustification.bottomAlign
1651471469
VerticalJustification.justifyAlign
1785951334
width
measurement string or number
read/write
he width of the cell.
words
words
read only
words
Methods Method: createOutlines
merge
Parameters: Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original object.
Name:
Type:
Description:
with
cell
he cell or range of cells to merge with.
Return:
Description:
objects
Creates outlines from the text.
cell
Merges cells together.
InDesign CS Scripting Guide JavaScript Reference 549
Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects the cell.
nothing
Splits the cell horizontally or vertically.
objects
Unmerges the cells.
search
select
Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
split
Name: using
unmerge
550
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Type:
Description:
Name:
Decimal:
HorizontalOrVertical. horizontal
1752134266
HorizontalOrVertical. vertical
1986359924
None
JavaScript Reference
How to handle the existing selection.
InDesign CS Scripting Guide
Sets the direction in which to split the cell.
cells Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of cells
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any cell.
firstItem
None
object
Returns the first cell.
object
Returns the cell with the specified ID.
objects
Returns the cells within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
cell object, number (index of the object in its containing object), or string (name of the object)
he cell at the start of the range.
to
cell object, number (index of the object in its containing object), or string (name of the object)
he cell at the end of the range.
lastItem
None
object
Returns the last cell.
middleItem
None
object
Returns the middle cell.
object
Returns the next cell.
object
Returns the previous cell.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he cell before the one desired.
Name:
Type:
Description:
obj
object
he cell ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 551
changePreference Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
autoLeading
number
read/write
Percentage for calculating auto leading
balanceRaggedLines
boolean
read/write
If true, balance ragged lines
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
capitalization
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
changeText
string
read/write
he replacement text. his property corresponds to the string in the Change To field of the Find/Change panel.
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he text override of the fill’s tint percentage (-1 indicates no override)
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
552
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
read/write
Alignment of the paragraph containing the text.
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
otfFigureStyle
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
InDesign CS Scripting Guide JavaScript Reference 553
Property:
Type:
Access:
Description:
otfFraction
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
application
read only
he parent of the object.
pointSize
number
read/write
he size of the text in points.
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140 read/write
he right indent applied to the paragraph containing the text.
read/write
Justification for lines with only one word.
position
rightIndent singleWordJustification
measurement string or number Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
Where to start the paragraph
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he color of the strike through as swatch or string
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through as swatch or string
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through as Unit (number or string)
554
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
strikehroughOverprint
boolean
read/write
If true, overprint the strike through
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strike through
strikehroughWeight
number
read/write
he line weight of the strike through
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he text override of the stroke’s tint percentage (-1 indicates no override)
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underlineColor
swatch object or swatch name as string
read/write
he color of the underline as swatch or string
underlineGapColor
swatch object or swatch name as string
read/write
he gap color of the underline as swatch or string
underlineGapOverprint
boolean
read/write
If true, overprint the gap of the underline
underlineGapTint
number
read/write
he gap tint of the underline
underlineOffset
measurement string or number
read/write
he offset of the underline as Unit (number or string)
underlineOverprint
boolean
read/write
If true, overprint the underline
underlineTint
number
read/write
he tint of the underline
underlineType
strokeStyle
read/write
he stroke type of the underline
underlineWeight
number
read/write
he line weight of the underline
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
InDesign CS Scripting Guide JavaScript Reference 555
character Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
ascent
measurement string or number
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associatedXMLElements
objects
read only
Returns the associated XML elements
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
measurement string or number
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
buttons
buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
characters
capitalization
characters
556
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
characters
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
measurement string or number
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or style name as string
read/write
Character style of drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradientStrokeAngle
number
read/write
he angle of the gradient applied to the stroke of the text.
gradientStrokeLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
InDesign CS Scripting Guide JavaScript Reference 557
Property:
Type:
Access:
Description:
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
graphicLines
graphicLines
read only
All graphic lines
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
groups
groups
read only
groups
horizontalOffset
measurement string or number
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
index
integer
read only
index of the object within its parent object.
insertionPoints
insertionPoints
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
558
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
lines
lines
read only
lines
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
openTypeFeatures
array of integers
read/write
open type features as Array of integers
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
InDesign CS Scripting Guide JavaScript Reference 559
Property:
Type:
Access:
Description:
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
parentStory
story
read only
he story containing the text object.
parentTextFrame
textFrame
read only
he text frame containing the text object.
pointSize
number
read/write
he size of the text in points.
polygons
polygons
read only
All polygons
position
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
otfFigureStyle
otfFraction
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
rectangles
rectangles
read only
All rectangles
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
560
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
ruleBelowWidth
singleWordJustification
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
InDesign CS Scripting Guide JavaScript Reference 561
Property:
Type:
Access:
Description:
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tables
tables
read only
All tables
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
562
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
words
words
read only
words
Methods Method: applyStyle
changecase
Parameters: Name:
Type:
Description:
using
style object or style name as string
he paragraph style or character style to apply.
[clearingOverrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
Name:
Decimal:
ChangecaseMode. uppercase
1667462499
ChangecaseMode. lowercase
1667460195
ChangecaseMode. titlecase
1667462243
ChangecaseMode. sentencecase
1667461987
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
Case option to use.
InDesign CS Scripting Guide JavaScript Reference 563
Method: convertToTable
createOutlines
exportFile
Parameters: Name:
Type:
Description:
[columnSeparator]
string or specialCharacter constant
he character to interpret as the column separator.
[rowSeparator]
string or specialCharacter constant
he character to interpret as the row separator.
[numberOfColumns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original text.
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
markup
564
Description: Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
using
xmlElement
he XML element to associate with the text.
JavaScript Reference
Return: table
InDesign CS Scripting Guide
Method: move
Parameters: Name: to
place
remove
Type:
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
Description:
nothing
Moves the text.
object
Place a file.
nothing
Deletes the object.
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
None
Return:
InDesign CS Scripting Guide JavaScript Reference 565
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
566
JavaScript Reference
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects text.
characters Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of characters
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any character.
firstItem
None
object
Returns the first character.
objects
Returns the characters within the specified range.
itemByRange
Name:
Type:
Description:
from
character object or number (index of the object in its containing object)
he character at the start of the range.
to
character object or number (index of the object in its containing object)
he character at the end of the range.
lastItem
None
object
Returns the last character.
middleItem
None
object
Returns the middle character.
object
Returns the next character.
object
Returns the previous character.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he character before the one desired.
Name:
Type:
Description:
obj
object
he character ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 567
characterStyle Properties Property:
Type:
Access:
Description:
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
basedOn
style object or style name as string
read/write
he character style this style is based on.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
capitalization
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
id
integer
read only
A unique number identifying the object.
imported
boolean
read only
Whether this style was imported from another document
index
integer
read only
index of the characterStyle within its parent document or application
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
label
string
read/write
A label that can be set to any string
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
name
string
read/write
he name of the character style
568
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
pointSize
number
read/write
he size of the text in points.
read/write
he position attribute applied to the text.
otfFigureStyle
otfFraction
position
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
Name:
Decimal:
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
InDesign CS Scripting Guide JavaScript Reference 569
Property:
Type:
Access:
Description:
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
Methods Method: extractLabel
insertLabel
remove
570
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
characterStyles Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of characterStyles
Methods Method:
Parameters:
Return:
Description:
add
None
characterStyle
Create a new character style.
anyItem
None
object
Returns any characterStyle.
firstItem
None
object
Returns the first characterStyle.
object
Returns the characterStyle with the specified ID.
objects
Returns the characterStyles within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
characterStyle object, number (index of the object in its containing object), or string (name of the object)
he characterStyle at the start of the range.
to
characterStyle object, number (index of the object in its containing object), or string (name of the object)
he characterStyle at the end of the range.
lastItem
None
object
Returns the last characterStyle.
middleItem
None
object
Returns the middle characterStyle.
object
Returns the next characterStyle.
object
Returns the previous characterStyle.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he characterStyle before the one desired.
Name:
Type:
Description:
obj
object
he characterStyle ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 571
checkboxControl Properties Property:
Type:
Access:
Description:
checkedState
boolean
read/write
If true, the checkbox control is checked.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the checkbox control within its parent dialog column, dialog row, enabling group or border panel
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
staticLabel
string
read/write
he static text label of the checkbox control.
572
JavaScript Reference
InDesign CS Scripting Guide
checkboxControls Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of checkbox controls
Methods Method:
Parameters:
Return:
Description:
add
None
checkboxControl
Create a new checkbox control.
anyItem
None
object
Returns any checkbox control.
firstItem
None
object
Returns the first checkbox control.
object
Returns the checkbox control with the specified ID.
objects
Returns the checkbox controls within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
checkboxControl object or number (index of the object in its containing object)
he checkboxControl at the start of the range.
to
checkboxControl object or number (index of the object in its containing object)
he checkboxControl at the end of the range.
lastItem
None
object
Returns the last checkbox control.
middleItem
None
object
Returns the middle checkbox control.
object
Returns the next checkbox control.
object
Returns the previous checkbox control.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he checkbox control before the one desired.
Name:
Type:
Description:
obj
object
he checkbox control ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 573
clipboardPreference Properties Property:
Type:
Access:
Description:
copyPDFToClipboard
boolean
read/write
If true, copy PDF to clipboard
parent
application
read only
he clipboard preference’s parent
pasteRemembersLayers
boolean
read/write
Whether objects cut or copied from different layers retain their layer assignment when pasted
preferPDFWhenPasting
boolean
read/write
If true, paste PDF if available
preferStyledTextWhenPasting
boolean
read/write
If true, include text attributes if available when pasting text
574
JavaScript Reference
InDesign CS Scripting Guide
clippingPathSettings Properties Property:
Type:
Access:
Description:
alphaChannelPathNames
array of strings
read only
A list of the path names of alpha channels associated with an imported graphic.
appliedPathName
string
read/write
he name of the currently-applied clipping path.
read/write
he clipping path type.
boolean
read/write
If true, include inside edges of the clipping path.
insetFrame
measurement string or number
read/write
he inset width of the frame.
invertPath
boolean
read/write
If true, invert the path of the clipping path.
parent
object
read only
he parent of the object.
paths
paths
read only
All paths
photoshopPathNames
array of strings
read only
A list of path names of a Photoshop path.
restrictToFrame
boolean
read/write
If true, restrict the imported graphic to its frame.
threshold
integer
read/write
Sets the threshold for detect edges or alpha channel.
tolerance
integer
read/write
Sets the accuracy of the Find Edges method of generating a clipping path. Higher values produce a clipping path that’s closer to the shape of the objects in the imported graphic, but tend to be more jagged. Lower values produce smoother clipping paths, but tend to be less accurate.
useHighResolutionImage
boolean
read/write
If true, use a high resolution version of the imported graphic when creating a clipping path using the Find Edges method.
clippingType
includeInsideEdges
Name:
Decimal:
ClippingPathType.none
1852796517
ClippingPathType.detectEdges
1685349735
ClippingPathType.alphaChannel
1634756707
ClippingPathType.photoshopPath
1886613620
ClippingPathType.userModifiedPath
1970106484
Methods Method:
Parameters:
Return:
Description:
convertToFrame
None
pageItem
Convert to Frame.
InDesign CS Scripting Guide JavaScript Reference 575
closeWindowBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the Closewindowbehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
parent
object
read only
he parent of the object.
Methods Method: extractLabel
insertLabel
remove
576
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
closeWindowBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of Closewindowbehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
closeWindowBehavior
Create a new close window behavior.
anyItem
None
object
Returns any Closewindowbehavior.
firstItem
None
object
Returns the first Closewindowbehavior.
object
Returns the Closewindowbehavior with the specified ID.
objects
Returns the Closewindowbehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
closeWindowBehavior object, number (index of the object in its containing object), or string (name of the object)
he closeWindowBehavior at the start of the range.
to
closeWindowBehavior object, number (index of the object in its containing object), or string (name of the object)
he closeWindowBehavior at the end of the range.
lastItem
None
object
Returns the last Closewindowbehavior.
middleItem
None
object
Returns the middle Closewindowbehavior.
object
Returns the next Closewindowbehavior.
object
Returns the previous Closewindowbehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he Closewindowbehavior before the one desired.
Name:
Type:
Description:
obj
object
he Closewindowbehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 577
color Properties Property:
Type:
Access:
colorValue
array of numbers as [c, m, y, k] or [r, g, b]
read/write
he values of the color
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the color within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he color model of the color.
he name of the color.
model
Name:
Decimal:
ColorModel.spot
1936748404
ColorModel.process
1886548851
ColorModel.registration
1919248243
ColorModel.mixedinkmodel
1768844664
Description:
name
string
read/write
parent
object
read only
he parent of the object.
read/write
he color space of the color.
space
Name:
Decimal:
ColorSpace.rgb
1666336578
ColorSpace.cmyk
1129142603
ColorSpace.lab
1665941826
ColorSpace.mixedInk
1666009432
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Merge one or more other swatches into this one.
nothing
Deletes the object.
extractLabel
insertLabel
merge
remove
578
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
object or object name as string
he swatches to merge.
None
JavaScript Reference
InDesign CS Scripting Guide
colors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of colors
Methods Method:
Parameters:
Return:
add
None
color
Create a new color.
anyItem
None
object
Returns any color.
firstItem
None
object
Returns the first color.
object
Returns the color with the specified ID.
objects
Returns the colors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
color object, number (index of the object in its containing object), or string (name of the object)
he color at the start of the range.
to
color object, number (index of the object in its containing object), or string (name of the object)
he color at the end of the range.
Description:
lastItem
None
object
Returns the last color.
middleItem
None
object
Returns the middle color.
object
Returns the next color.
object
Returns the previous color.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he color before the one desired.
Name:
Type:
Description:
obj
object
he color ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 579
colorSetting Properties Property:
Type:
Access:
Description:
cmsSettings
string
read/write
he name of the current color settings configuration
cmsSettingsList
Array of strings
read only
he list of available color settings configurations.
cmsSettingsPath
string
read/write
he path of the csf file to use
read/write
he policy for handling mismatched CMYK configurations
cmykPolicy
Name:
Decimal:
ColorSettingsPolicy.colorPolicyOff
1129344870
ColorSettingsPolicy.preserveEmbeddedProfiles
1129345136
ColorSettingsPolicy.convertToWorkingSpace
1129346931
enableColorManagement
boolean
read/write
If true, enable color management.
engine
string
read/write
he name of the color engine to use.
engineList
Array of strings
read only
he list of available color engines.
read/write
he rendering intent
intent
Name:
Decimal:
RenderingIntent.useColorSettings
1380541299
RenderingIntent.perceptual
1380544611
RenderingIntent.saturation
1380545377
RenderingIntent.relativeColorimetric
1380545123
RenderingIntent.absoluteColorimetric
1380540771
mismatchAskWhenOpening
boolean
read/write
If true, ask the user what to do when opening a file with a mismatched color configuration.
mismatchAskWhenPasting
boolean
read/write
If true, ask the user what to do when pasting an object with a mismatched color configuration.
missingAskWhenOpening
boolean
read/write
If true, ask the user what to do when opening an object with a missing color configuration.
parent
application
read only
he parent of the object.
read/write
he policy for handling mismatched rgb configurations
rgbPolicy
Name:
Decimal:
ColorSettingsPolicy.colorPolicyOff
1129344870
ColorSettingsPolicy.preserveEmbeddedProfiles
1129345136
ColorSettingsPolicy.convertToWorkingSpace
1129346931
usebpc
boolean
read/write
If true, compensate for differences in black point
workingSpace cmyk
string
read/write
he name of the current CMYK configuration
workingSpace cmykList
Array of strings
read only
he list of valid CMYK color profiles.
workingSpacergb
string
read/write
he name of the current rgb configuration
workingSpace rgbList
Array of strings
read only
he list of valid RGB color profiles.
580
JavaScript Reference
InDesign CS Scripting Guide
column Properties Property:
Type:
Access:
Description:
autoGrow
boolean
read/write
If true, the cell will expand to display its content.
bottomEdgeStrokeColor
swatch
read/write
he stroke color of the bottom edge of the cell.
bottomEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the bottom edge of the cell.
bottomEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the bottom edge of the cell.
bottomEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottomEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the bottom edge of the cell.
bottomEdgeStrokePriority
integer
read/write
he stroke priority of the bottom edge
bottomEdgeStrokeTint
number
read/write
he tint applied to the stroke of the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottomEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the bottom edge of the cell.
bottomEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the bottom edge of the cell.
bottomInset
measurement string or number
read/write
he bottom inset the cell.
cells
cells
read only
cells
clipContentToCell
boolean
read/write
If true, clip the content of the cell to the boundaries of the cell.
columns
columns
read only
All columns
columnSpan
integer
read only
he number of columns that this cell spans
contents
string
read/write
he text contents of the cell.
diagonalLineInFront
boolean
read/write
If true, the diagonal line will draw in front of the contents of the cell.
diagonalLineStrokeColor
swatch
read/write
he stroke color of the diagonal line(s) applied to the cell.
diagonalLineStrokeGapColor
swatch
read/write
he gap color of the diagonal line(s).
diagonalLineStrokeGapOverprint
boolean
read/write
If true, overprint the color of the gap of the diagonal line(s).
diagonalLineStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonalLineStrokeOverprint
boolean
read/write
If true, overprint the diagonal line(s) applied to the cell.
diagonalLineStrokeTint
number
read/write
he tint applied to the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonalLineStrokeType
strokeStyle
read/write
he type of stroke applied to the diagonal line(s) of the cell.
diagonalLineStrokeWeight
measurement string or number
read/write
he stroke weight of the diagonal line(s) of the cell.
InDesign CS Scripting Guide JavaScript Reference 581
Property:
Type:
Access:
Description:
fillColor
swatch object or swatch name as string
read/write
he swatch, color, gradient, tint, or mixed ink applied to the fill of the cell.
fillTint
number
read/write
he tint percentage applied to the fill of the cell (-1 indicates 100%, or no tint override).
read/write
he method used to calculate the distance from the first baseline of text in the cell and the top inset of the cell.
firstBaselineOffset
Name:
Decimal:
FirstBaseline.ascentOffset
1296135023
FirstBaseline.capHeight
1296255087
FirstBaseline.leadingOffset
1296852079
FirstBaseline.emboxHeight
1296386159
FirstBaseline.xHeight
1299728495
FirstBaseline.fixedHeight
1296451695
gradientFillAngle
number
read/write
Angle of a linear gradient on the fill
gradientFillLength
number
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
height
measurement string or number
read/write
he height of the cell.
index
integer
read only
index of the cell within its parent table.
innerColumnStrokeColor
swatch
read/write
he stroke color of the inner column of the cell.
innerColumnStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the inner column of the cell.
innerColumnStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the inner column of the cell.
innerColumnStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the inner column of the cell (-1 indicates 100%, or no tint override).
innerColumnStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the inner column of the cell.
innerColumnStrokeTint
number
read/write
he tint applied to the stroke of the inner column of the cell (-1 indicates 100%, or no tint override).
innerColumnStrokeType
strokeStyle
read/write
he type of stroke applied to the inner column of the cell.
innerColumnStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the inner column of the cell.
innerRowStrokeColor
swatch
read/write
he stroke color of the inner row of the cell.
innerRowStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the inner row of the cell.
innerRowStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the inner row
innerRowStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the inner row of the cell (-1 indicates 100%, or no tint override).
innerRowStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the inner row of the cell.
innerRowStrokeTint
number
read/write
he tint applied to the stroke of the inner row of the cell (-1 indicates 100%, or no tint override).
innerRowStrokeType
strokeStyle
read/write
he type of stroke applied to the inner row of the cell.
582
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
innerRowStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the inner row of the cell.
keepWithNextRow
boolean
read/write
If true, keep this row with the next row when the rows break between pages, text frames, or text columns.
letEdgeStrokeColor
swatch
read/write
he stroke color of the let edge of the cell.
letEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the let edge of the cell.
letEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the let edge of the cell.
letEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the let edge of the cell (-1 indicates 100%, or no tint override).
letEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the let edge of the cell.
letEdgeStrokePriority
integer
read/write
he stroke priority of the let edge
letEdgeStrokeTint
number
read/write
he tint of the color of the let edge
letEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the let edge of the cell.
letEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the let edge of the cell.
letInset
measurement string or number
read/write
he let inset of the cell.
maximumHeight
measurement string or number
read/write
Specifies the maximum height of the row containing the cell.
minimumFirstBaselineOffset
measurement string or number
read/write
he minimum distance (in points) between the first baseline of the text in the cell and the top inset of the frame or cell.
minimumHeight
measurement string or number
read/write
Constrains the row height to an amount no smaller than this value. he row may be larger than this amount, however, as the row height will continue to grow automatically as text is added.
name
string
read only
he name of the cell, in the form row number; column number. he third cell of the fourth row, for example, would have the name “R4:C3”.
overflows
boolean
read only
If true, the cell contains overset (i.e., uncomposed) text.
overprintFill
boolean
read/write
If true, overprint the fill of the cell.
paragraphSpacingLimit
measurement string or number
read/write
When the vertical justification of the cell is set to justified, this is the maximum amount of space that will be added between paragraphs. Increase this value to encourage spacing between paragraphs of vertically justified text; decrease it to increase the leading between lines of text in vertically justified text.
parent
object
read only
he parent of the object.
parentColumn
column
read only
he parent column of the cell.
parentRow
row
read only
he parent row of the cell.
rightEdgeStrokeColor
swatch
read/write
he stroke color of the right edge of the cell.
rightEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the right edge of the cell.
InDesign CS Scripting Guide JavaScript Reference 583
Property:
Type:
Access:
Description:
rightEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the right edge of the cell.
rightEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the right edge of the cell (-1 indicates 100%, or no tint override).
rightEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the right edge of the cell.
rightEdgeStrokePriority
integer
read/write
he stroke priority of the right edge
rightEdgeStrokeTint
number
read/write
he tint applied to the stroke of the right edge of the cell (-1 indicates 100%, or no tint override).
rightEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the right edge of the cell.
rightEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the right edge of the cell.
rightInset
measurement string or number
read/write
he right inset the cell.
rotationAngle
number
read/write
he rotation angle of the cell.
rows
rows
read only
All rows
rowSpan
integer
read only
he number of rows that this cell spans
read/write
he type of the row containing the cell.
read/write
Where to start the row
rowType
startRow
Name:
Decimal:
RowTypes.bodyRow
1161982583
RowTypes.headerRow
1162375799
RowTypes.footerRow
1162244727
RowTypes.mixedState
1162703479
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
textCellRotationFollowsStoryDirection
boolean
read/write
Whether text cell direction matches the story direction
topEdgeStrokeColor
swatch
read/write
he stroke color of the top edge of the cell.
topEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the top edge of the cell.
topEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the top edge of the cell.
topEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the top edge of the cell (-1 indicates 100%, or no tint override).
topEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the top edge of the cell.
topEdgeStrokePriority
integer
read/write
he stroke priority of the top edge
topEdgeStrokeTint
number
read/write
he tint applied to the stroke of the top edge of the cell (-1 indicates 100%, or no tint override).
topEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the right edge of the cell.
584
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
topEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the top edge of the cell.
topInset
measurement string or number
read/write
he top inset the cell.
topLetDiagonalLine
boolean
read/write
If true, draw a diagonal line from the top let corner to the bottom right corner of the cell .
topRightDiagonalLine
boolean
read/write
If true, draw a diagonal line from the top right corner to the bottom let corner of the cell .
read/write
he vertical justification applied to the text in the cell.
read/write
he width of the cell.
verticalJustification
width
Name:
Decimal:
VerticalJustification.topAlign
1953460256
VerticalJustification.centerAlign
1667591796
VerticalJustification.bottomAlign
1651471469
VerticalJustification.justifyAlign
1785951334
measurement string or number
Methods Method: createOutlines
merge
redistribute
Parameters: Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original object.
Name:
Type:
Description:
with
cell
he cell to merge with.
Name:
Type:
Description:
using
[thru] remove
None
Name:
Decimal:
HorizontalOrVertical. horizontal
1752134266
HorizontalOrVertical. vertical
1986359924
object
Return:
Description:
objects
Create outlines from the text.
cell
Merge cells together.
nothing
Redistribute columns or rows.
nothing
Deletes the object.
Which direction to redistribute.
redistribute till this object.
InDesign CS Scripting Guide JavaScript Reference 585
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
split
Name: using
unmerge
586
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Type: Decimal:
HorizontalOrVertical. horizontal
1752134266
HorizontalOrVertical. vertical
1986359924
None
JavaScript Reference
InDesign CS Scripting Guide
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Select this column.
nothing
Splits the cell horizontally or vertically.
objects
Unmerge the cells.
How to handle the existing selection.
Description:
Name:
Return:
Sets the direction in which to split the cell.
columns Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of columns
Methods Method: add
Parameters: Name: [at]
[reference]
Type:
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
Return:
Description:
column
Create a new column.
Location.
object
Before/ater an existing column or at the beginning/ end of a parent as column or table.
anyItem
None
object
Returns any column.
firstItem
None
object
Returns the first column.
objects
Returns the columns within the specified range.
itemByRange
Name:
Type:
Description:
from
column object, number (index of the object in its containing object), or string (name of the object)
he column at the start of the range.
to
column object, number (index of the object in its containing object), or string (name of the object)
he column at the end of the range.
lastItem
None
object
Returns the last column.
middleItem
None
object
Returns the middle column.
object
Returns the next column.
object
Returns the previous column.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he column before the one desired.
Name:
Type:
Description:
obj
object
he column ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 587
contourOption Properties Property:
Type:
Access:
Description:
alphaChannelPathNames
array of strings
read only
A list of the alpha channel path names in an imported graphic.
contourPathName
string
read/write
he name of the current contour option applied to an imported graphic.
read/write
he contour options type applied to an imported graphic.
contourType
Name:
Decimal:
ContourOptionsTypes.boundingBox
1701732962
ContourOptionsTypes.photoshopPath
1886613620
ContourOptionsTypes.detectEdges
1685349735
ContourOptionsTypes.alphaChannel
1634756707
ContourOptionsTypes.graphicFrame
1701734246
ContourOptionsTypes.sameAsClipping
1935762288
includeInsideEdges
boolean
read/write
If true, include the inside edges of a contour path.
parent
textWrapPreference
read only
he parent of the object.
photoshopPathNames
array of strings
read only
A list of the photoshop path names in an imported graphic.
588
JavaScript Reference
InDesign CS Scripting Guide
crossReference Properties Property:
Access:
Description:
read/write
he cross reference type.
string
read/write
he string if a custom cross reference.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the cross reference within its parent topic
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
parent
topic
read only
he parent of the object.
referencedTopic
topic
read/write
he index topic that the cross reference refers to.
crossReferenceType
customTypeString
Type: Name:
Decimal:
CrossReferenceType.seeOrAlsoBracket
1399800172
CrossReferenceType.see
1701729125
CrossReferenceType.seeAlso
1399144812
CrossReferenceType.seeHerein
1397256814
CrossReferenceType.seeAlsoHerein
1398884466
CrossReferenceType.customCrossReference
1131639875
CrossReferenceType.customCrossReferenceBefore
1131639906
CrossReferenceType.customCrossReferenceAter
1131639905
Methods Method: extractLabel
insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 589
crossReferences Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of cross references
Methods Method: add
Parameters: Name:
Type:
Description:
referencedTopic
topic
he referenced topic.
crossReferenceType
[customTypeString]
Name:
Decimal:
CrossReferenceType. seeOrAlsoBracket
1399800172
CrossReferenceType.see
1701729125
CrossReferenceType. seeAlso
1399144812
CrossReferenceType. seeHerein
1397256814
CrossReferenceType. seeAlsoHerein
1398884466
CrossReferenceType. customCrossReference
1131639875
CrossReferenceType. customCrossReferenceBefore
1131639906
CrossReferenceType. customCrossReference
1131639905
string
Return:
Description:
crossReference
Create a new cross reference.
he type of reference.
A custom reference as string.
anyItem
None
object
Returns any cross reference.
firstItem
None
object
Returns the first cross reference.
object
Returns the cross reference with the specified ID.
objects
Returns the cross references within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
crossReference object or number (index of the object in its containing object)
he crossReference at the start of the range.
to
crossReference object or number (index of the object in its containing object)
he crossReference at the end of the range.
lastItem
None
object
Returns the last cross reference.
middleItem
None
object
Returns the middle cross reference.
590
JavaScript Reference
InDesign CS Scripting Guide
Method: nextItem
previousItem
Parameters: Name:
Type:
Description:
obj
object
he cross reference before the one desired.
Name:
Type:
Description:
obj
object
he cross reference ater the one desired.
Return:
Description:
object
Returns the next cross reference.
object
Returns the previous cross reference.
InDesign CS Scripting Guide JavaScript Reference 591
dashedStrokeStyle Properties Property:
Type:
Access:
Description:
dashArray
Array of numbers as [dash, gap, ...]
read/write
he position of the dashes and gaps in the the dashed stroke style.
read/write
he appearance of the end points of each dash.
endCap
Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dashed stroke style within its parent document or application
name
string
read/write
he name of the dashed stroke style.
parent
object
read only
he parent of the object.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
read only
he type of the dashed stroke style.
strokeCornerAdjustment
strokeStyleType
Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
string
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
remove
None
nothing
Deletes the object.
592
JavaScript Reference
InDesign CS Scripting Guide
dashedStrokeStyles Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of dashed stroke styles
Methods Method:
Parameters:
Return:
Description:
add
None
dashedStrokeStyle
Create a new dashed stroke style.
anyItem
None
object
Returns any dashed stroke style.
firstItem
None
object
Returns the first dashed stroke style.
object
Returns the dashed stroke style with the specified ID.
objects
Returns the dashed stroke styles within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
dashedStrokeStyle object, number (index of the object in its containing object), or string (name of the object)
he dashedStrokeStyle at the start of the range.
to
dashedStrokeStyle object, number (index of the object in its containing object), or string (name of the object)
he dashedStrokeStyle at the end of the range.
lastItem
None
object
Returns the last dashed stroke style.
middleItem
None
object
Returns the middle dashed stroke style.
object
Returns the next dashed stroke style.
object
Returns the previous dashed stroke style.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he dashed stroke style before the one desired.
Name:
Type:
Description:
obj
object
he dashed stroke style ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 593
dialog Properties Property:
Type:
Access:
Description:
canCancel
boolean
read/write
If true, the dialog contains a Cancel button.
dialogColumns
dialogColumns
read only
All columns
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dialog within its parent application
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the dialog.
parent
application
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
destroy
None
nothing
Destroy dialog
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
boolean
Show dialog.
extractLabel
insertLabel
show
594
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
dialogColumn Properties Property:
Type:
Access:
Description:
angleComboboxes
angleComboboxes
read only
All angle comboboxes
angleEditboxes
angleEditboxes
read only
All angle editboxes
borderPanels
borderPanels
read only
All border panels
checkboxControls
checkboxControls
read only
All checkbox controls
dialogRows
dialogRows
read only
All dialog rows
dropdowns
dropdowns
read only
All dropdowns
enablingGroups
enablingGroups
read only
All enabling checkbox panels
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dialogcolumn within its parent dialog, dialogrow, enabling group or border panel
integerComboboxes
integerComboboxes
read only
All integer comboboxes
integerEditboxes
integerEditboxes
read only
All integer editboxes
measurementComboboxes
measurementComboboxes
read only
All measurement comboboxes
measurementEditboxes
measurementEditboxes
read only
All measurement editboxes
parent
object
read only
he parent of the object.
percentComboboxes
percentComboboxes
read only
All percent comboboxes
percentEditboxes
percentEditboxes
read only
All percent editboxes
radiobuttonGroups
radiobuttonGroups
read only
All radio button groups
realComboboxes
realComboboxes
read only
All real number comboboxes
realEditboxes
realEditboxes
read only
All real number editboxes
staticTexts
staticTexts
read only
All static texts
textEditboxes
textEditboxes
read only
All text editboxes
widgets
widgets
read only
All widgets
InDesign CS Scripting Guide JavaScript Reference 595
dialogColumns Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of dialogcolumns
Methods Method:
Parameters:
Return:
Description:
add
None
dialogColumn
Create a new dialog column.
anyItem
None
object
Returns any dialogcolumn.
firstItem
None
object
Returns the first dialogcolumn.
object
Returns the dialogcolumn with the specified ID.
objects
Returns the dialogcolumns within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
dialogColumn object or number (index of the object in its containing object)
he dialogColumn at the start of the range.
to
dialogColumn object or number (index of the object in its containing object)
he dialogColumn at the end of the range.
lastItem
None
object
Returns the last dialogcolumn.
middleItem
None
object
Returns the middle dialogcolumn.
object
Returns the next dialogcolumn.
object
Returns the previous dialogcolumn.
nextItem
previousItem
596
Name:
Type:
Description:
obj
object
he dialogcolumn before the one desired.
Name:
Type:
Description:
obj
object
he dialogcolumn ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
dialogRow Properties Property:
Type:
Access:
Description:
angleComboboxes
angleComboboxes
read only
All angle comboboxes
angleEditboxes
angleEditboxes
read only
All angle editboxes
borderPanels
borderPanels
read only
All border panels
checkboxControls
checkboxControls
read only
All checkbox controls
dialogColumns
dialogColumns
read only
All columns
dropdowns
dropdowns
read only
All dropdowns
enablingGroups
enablingGroups
read only
All enabling checkbox panels
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dialogrow within its parent dialogcolumn, enabling group or border panel
integerComboboxes
integerComboboxes
read only
All integer comboboxes
integerEditboxes
integerEditboxes
read only
All integer editboxes
measurementComboboxes
measurementComboboxes
read only
All measurement comboboxes
measurementEditboxes
measurementEditboxes
read only
All measurement editboxes
parent
object
read only
he parent of the object.
percentComboboxes
percentComboboxes
read only
All percent comboboxes
percentEditboxes
percentEditboxes
read only
All percent editboxes
radiobuttonGroups
radiobuttonGroups
read only
All radio button groups
realComboboxes
realComboboxes
read only
All real number comboboxes
realEditboxes
realEditboxes
read only
All real number editboxes
staticTexts
staticTexts
read only
All static texts
textEditboxes
textEditboxes
read only
All text editboxes
widgets
widgets
read only
All widgets
InDesign CS Scripting Guide JavaScript Reference 597
dialogRows Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of dialogrows
Methods Method:
Parameters:
Return:
add
None
dialogRow
Create a new dialog row.
anyItem
None
object
Returns any dialogrow.
firstItem
None
object
Returns the first dialogrow.
object
Returns the dialogrow with the specified ID.
objects
Returns the dialogrows within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
dialogRow object or number (index of the object in its containing object)
he dialogRow at the start of the range.
to
dialogRow object or number (index of the object in its containing object)
he dialogRow at the end of the range.
Description:
lastItem
None
object
Returns the last dialogrow.
middleItem
None
object
Returns the middle dialogrow.
object
Returns the next dialogrow.
object
Returns the previous dialogrow.
nextItem
previousItem
598
Name:
Type:
Description:
obj
object
he dialogrow before the one desired.
Name:
Type:
Description:
obj
object
he dialogrow ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
dialogs Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of dialogs
Methods Method:
Parameters:
Return:
Description:
add
None
dialog
Create a new dialog.
anyItem
None
object
Returns any dialog.
firstItem
None
object
Returns the first dialog.
object
Returns the dialog with the specified ID.
objects
Returns the dialogs within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
dialog object, number (index of the object in its containing object), or string (name of the object)
he dialog at the start of the range.
to
dialog object, number (index of the object in its containing object), or string (name of the object)
he dialog at the end of the range.
lastItem
None
object
Returns the last dialog.
middleItem
None
object
Returns the middle dialog.
object
Returns the next dialog.
object
Returns the previous dialog.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he dialog before the one desired.
Name:
Type:
Description:
obj
object
he dialog ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 599
dictionaryPreference Properties Property:
Access:
Description:
read/write
Tells the document which hyphenation source to use when composing text.
boolean
read/write
If true, merge the user dictionary files into the document.
parent
object
read only
he parent of the object.
recompose
boolean
read/write
If true, recompose every time the composition source has changed.
composition
mergeUserDictionary
600
Type: Name:
Decimal:
ComposeUsing.useUserDictionary
1433629284
ComposeUsing.useDocument
1967419235
ComposeUsing.both
1651471464
JavaScript Reference
InDesign CS Scripting Guide
displayPerformancePreference Properties Property:
Access:
Description:
read/write
he default display setting for new windows.
boolean
read/write
If true, ignore local settings for all windows.
parent
application
read only
he parent of the object.
persistLocalSettings
boolean
read/write
Whether or not to local settings are saved to and read from the document
defaultDisplaySettings
ignoreLocalSettings
Type: Name:
Decimal:
ViewDisplaySettings.highQuality
1346922866
ViewDisplaySettings.typical
1349810544
ViewDisplaySettings.optimized
1349480564
InDesign CS Scripting Guide JavaScript Reference 601
displaySetting Properties Property:
Type:
Access:
Description:
antialiasing
boolean
read/write
If true, anti-alias objects. (his setting affects the display only, and has no effect on printing.)
greekBelow
number
read/write
Display text below this size (in points) as a gray rectangle (“greeking”).
index
integer
read only
index of the display setting within its parent application
parent
application
read only
he parent of the object.
read/write
he method used to display raster images.
read/write
he method used to display transparency.
read/write
he method used to display vector objects.
raster
transparency
vector
602
Name:
Decimal:
TagRaster.grayOut
1917284985
TagRaster.proxy
1917874808
TagRaster.highResolution
1917348177
TagRaster.default
1147563124
Name:
Decimal:
TagTransparency.off
1330005536
TagTransparency.lowQuality
1481666146
TagTransparency.mediumQuality
1481663597
TagTransparency.highQuality
1346922866
TagTransparency.default
1147563124
Name:
Decimal:
TagVector.grayOut
1917284985
TagVector.proxy
1917874808
TagVector.highResolution
1917348177
TagVector.default
1147563124
JavaScript Reference
InDesign CS Scripting Guide
displaySettings Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of display settings
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any display setting.
firstItem
None
object
Returns the first display setting.
objects
Returns the display settings within the specified range.
itemByRange
Name:
Type:
Description:
from
displaySetting object or number (index of the object in its containing object)
he displaySetting at the start of the range.
to
displaySetting object or number (index of the object in its containing object)
he displaySetting at the end of the range.
lastItem
None
object
Returns the last display setting.
middleItem
None
object
Returns the middle display setting.
object
Returns the next display setting.
object
Returns the previous display setting.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he display setting before the one desired.
Name:
Type:
Description:
obj
object
he display setting ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 603
document Properties Property: aterBlendingIntent
Type: Name:
Decimal:
RenderingIntent.useColorSettings
1380541299
RenderingIntent.perceptual
1380544611
RenderingIntent.saturation
1380545377
RenderingIntent.relativeColorimetric
1380545123
RenderingIntent.absoluteColorimetric
1380540771
Access:
Description:
read/write
he rendering intent for transparent objects. Corresponds to the Ater-Blending Intent pop-up menu in the Assign Profiles dialog box.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items on the document pages of the document, egardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associatedXMLElement
xmlElement
read only
Returns the associated XML element
bookmarks
bookmarks
read only
Every bookmark
buttonPreferences
buttonPreference
read only
button preferences
buttons
buttons
read only
Every button
characterStyles
characterStyles
read only
character Styles
cmykProfile
string
read/write
he current CMYK profile
cmykProfileList
Array of strings
read only
he list of available CMYK profiles.
colors
colors
read only
All colors
dashedStrokeStyles
dashedStrokeStyles
read only
Every dashed stroke style
read/write
he default color management intent for bitmap images in the document. his property corresponds to the Default image Intent pop-up menu in the Assign Profiles dialog box.
defaultImageIntent
Name:
Decimal:
RenderingIntent.useColorSettings
1380541299
RenderingIntent.perceptual
1380544611
RenderingIntent.saturation
1380545377
RenderingIntent.relativeColorimetric
1380545123
RenderingIntent.absoluteColorimetric
1380540771
dictionaryPreferences
dictionaryPreference
read only
he user dictionary preferences for the document. his object corresponds to the Dictionary panel of the Preferences dialog box.
documentPreferences
documentPreference
read only
he document preferences for the document. his object corresponds to the document panel of the Preferences dialog box.
dottedStrokeStyles
dottedStrokeStyles
read only
Every dotted stroke style
dtds
dtDs
read only
All dtds
filePath
string
read only
he file path to the folder containing the document (does not include the file name).
fonts
fonts
read only
Every font
formFields
formFields
read only
Every form field item
fullName
string
read only
he file path to the document file, including the file name.
604
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
galleyPreferences
galleyPreference
read only
he story Editor preferences of the document. his object corresponds to the story Editor Display panel of the Preferences dialog box.
gradients
gradients
read only
All gradients
graphicLines
graphicLines
read only
All graphic lines
gridPreferences
gridPreference
read only
he document grid preferences. his object corresponds to the Grids panel of the Preferences dialog box.
groups
groups
read only
groups
guidePreferences
guidePreference
read only
he guide preferences for the document. his object corresponds to the guides and Pasteboard panel of the Preferences dialog box.
guides
guides
read only
Every guide
hyperlinkExternalPageDestinations
hyperlinkExternalPageDestinations
read only
Every hyperlink external page destination
hyperlinkPageDestinations
hyperlinkPageDestinations
read only
Every hyperlink page destination
hyperlinkPageItemSources
hyperlinkPageItemSources
read only
Every hyperlink page item source
hyperlinks
hyperlinks
read only
Every hyperlink
hyperlinkTextDestinations
hyperlinkTextDestinations
read only
Every hyperlink text destination
hyperlinkTextSources
hyperlinkTextSources
read only
Every hyperlink text source
hyperlinkURLDestinations
hyperlinkURLDestinations
read only
Every hyperlink URL destination
hyphenationExceptions
hyphenationExceptions
read only
Every hyphenation exception
index
integer
read only
index of the document within its parent application
indexes
indexes
read only
Every index
indexGenerationOptions
indexOptions
read only
he options controlling index generation for the document. his object corresponds to the Generate index dialog box (to display this dialog box, choose Generate index from the index palette menu).
inks
inks
read only
Every InDesign ink
label
string
read/write
A label that can be set to any string
languages
languages
read only
Every language
layers
layers
read only
Every layer
layoutAdjustmentPreferences
layoutAdjustmentPreference
read only
he document layout adjustment preferences. he properties in this object correspond to the options shown in the Layout Adjustment dialog box (choose Layout Adjustment from the Layout menu to display this dialog box).
layoutWindows
layoutWindows
read only
Every layout window
links
links
read only
Every file link
marginPreferences
marginPreference
read only
Margin preferences
masterSpreads
masterSpreads
read only
All master spreads
metadataPreferences
metadataPreference
read only
he document metadata preferences.
mixedInkGroups
mixedInkGroups
read only
All mixed ink groups
mixedInks
mixedInks
read only
All mixed inks
InDesign CS Scripting Guide JavaScript Reference 605
Property:
Type:
Access:
Description:
modified
boolean
read only
If true, the document has been modified since it was last saved.
name
string
read only
he name of the document.
ovals
ovals
read only
All ovals
packageForGoLivePreferences
packageForGoLivePreference
read only
he default Package For GoLive preferences
pageItems
pageItems
read only
All page items
pages
pages
read only
Every page
paragraphStyles
paragraphStyles
read only
paragraph Styles
parent
application
read only
he parent of the object.
pasteboardPreferences
pasteboardPreference
read only
he pasteboard preferences for the document.
polygonPreferences
polygonPreference
read only
he polygon preferences for the document.
polygons
polygons
read only
All polygons
printPreferences
printPreference
read only
he print preferences of the document.
rectangles
rectangles
read only
All rectangles
redoName
string
read only
Name of the action on the top of the redo stack.
rgbProfile
string
read/write
he current RGB profile
rgbProfileList
Array of strings
read only
he list of available RGB profiles.
saved
boolean
read only
If true, the document has been saved since it was opened.
sections
sections
read only
All layout sections
selection
array of objects
read/write
he current selection of the active window.
read/write
he rendering intent to use for solid colors. his property corresponds to the Solid color Intent pop-up menu in the Assign Profiles dialog box.
solidColorIntent
Name:
Decimal:
RenderingIntent.useColorSettings
1380541299
RenderingIntent.perceptual
1380544611
RenderingIntent.saturation
1380545377
RenderingIntent.relativeColorimetric
1380545123
RenderingIntent.absoluteColorimetric
1380540771
spreads
spreads
read only
Every spread
stories
stories
read only
stories
storyPreferences
storyPreference
read only
he document default story preferences.
storyWindows
storyWindows
read only
Every story window
stripedStrokeStyles
stripedStrokeStyles
read only
Every stripe stroke style
strokeStyles
strokeStyles
read only
Every stroke style
swatches
swatches
read only
All swatches
textDefaults
textDefault
read only
he document default text formatting. Changing the default text formatting sets the default formatting for all new text frames, but has no effect on the text in existing text frames.
textFramePreferences
textFramePreference
read only
he document default text frame preferences. Changing the default text frame preferences sets the default formatting for all new text frames, but has no effect on existing text frames.
textFrames
textFrames
read only
text Frames
textPreferences
textPreference
read only
he document’s text preferences. his object corresponds to the text panel of the Preferences dialog box.
606
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
tints
tints
read only
All tints
tocStyles
tocStyles
read only
Every TOC style
transparencyPreferences
transparencyPreference
read only
he document transparency preferences. his object corresponds to the setting of the Transparency Blend Space submenu of the Edit menu.
trapPresets
trapPresets
read only
Every InDesign trap preset
undoName
string
read only
he name of the action on the top of the undo stack.
unusedSwatches
objects
read only
he unused swatches in the document.
validationErrors
validationErrors
read only
All XML validation errors
viewPreferences
viewPreference
read only
he view preferences of the document. he properties of this object correspond to the options in the Units and Increments panel of the Preferences dialog box.
visible
boolean
read only
If true, the document is visible.
windows
windows
read only
Every window
xmlComments
xmlComments
read only
All XML comments
xmlElements
xmlElements
read only
All XML elements
xmlExportMaps
xmlExportMaps
read only
Every style to XML tag mapping
xmlExportPreferences
xmlExportPreference
read only
he default XML export preferences
xmlImportMaps
xmlImportMaps
read only
Every XML tag to style mapping
xmlImportPreferences
xmlImportPreference
read only
he default XML import preferences
xmlInstructions
xmlInstructions
read only
All XML instructions
xmlItems
xmlItems
read only
All XML items
xmlTags
xmlTags
read only
All XML tags
xmlViewPreferences
xmlViewPreference
read only
he default XML view preferences
zeroPoint
Array of numbers or measurement strings as [x, y]
read/write
he current zero point. he default location of the zero point is set by the ruler origin property of the view preferences object. Setting the zero point to (0,0) returns the zero point to the default location.
Methods Method:
Parameters:
Return:
Description:
autoStyle
None
nothing
Auto style the document based on the tag to style map
autoTag
None
nothing
Auto tag the document based on the style to tag map
InDesign CS Scripting Guide JavaScript Reference 607
Method: close
Parameters: Name:
Type:
[saving]
createTOC
deleteUnusedTags
608
Description:
Name:
Decimal:
SaveOptions.no
1852776480
SaveOptions.ask
1634954016
SaveOptions.yes
2036691744
file object or file name as string
he file in which to save the document.
Name:
Type:
Description:
using
tocStyle
he table of content style to create with.
[replacing]
boolean
If true, replace existing TOC.
[fromBook]
object
he book object where TOC is created from.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object.
[includeOverset]
boolean
If true, include TOC in overset.
[destinationLayer]
layer object or layer name as string.
he layer on which to place the TOC as layer.
JavaScript Reference
InDesign CS Scripting Guide
Description:
nothing
Close the document.
textFrame
Create table of Content for a document or book.
nothing
Delete unused XML markup tags
Use SaveOptions. ask to display a dialog box asking if the user would like to save changes for each unsaved open document; use SaveOptions.no to close all documents without savign; use SaveOptions.yes to save all unsaved open documents.
[savingIn]
None
Return:
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
importDtd
importStyles
importXML
insertLabel
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Import a dtd to use for validation.
nothing
Import styles.
nothing
Import a XML file into an InDesign document.
nothing
Sets the string associated with the given key (label name).
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
from
string
What to import from.
Name:
Type:
Description:
format
Return:
Name:
Decimal:
ImportFormat. characterStylesFormat
1131565940
ImportFormat. paragraphStylesFormat
1885885300
ImportFormat. textStylesFormat
1668305780
ImportFormat. tocStylesFormat
1415795572
he format.
from
File
An InDesign file to import from.
Name:
Type:
Description:
from
string
What to import from.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
InDesign CS Scripting Guide JavaScript Reference 609
Method: loadXMLTags
package
packageForGoLive
printOut
redo
Name:
Type:
Description:
from
string
What to import from.
Name:
Type:
Description:
to
string
A folder, alias or path as string in which to place the packaged files.
copyingFonts
boolean
If true, copy required fonts.
copyingLinkedGraphics
boolean
If true, copy linked graphics file.
copyingProfiles
boolean
If true, copy profiles.
updatingGraphics
boolean
If true, update graphics links before packaging.
includingHiddenLayers
boolean
If true, include objects on hidden layers.
ignorePreflightErrors
boolean
If true, ignore preflight errors and package anyways.
creatingReport
boolean
If true, create package report.
Name:
Type:
Description:
location
string
File location for package.
Name:
Type:
Description:
[printDialog]
boolean
If true, display the Print dialog box.
[using]
printerPreset or name of PrinterPreset as string
he printer preset.
None
save
saveXMLTags
610
Parameters:
Name:
Type:
Description:
[to]
File or file name as string
Where to save the document. If the document is already saved, a copy is saved at this path, the original file is closed the new copy is opened.
[stationery]
boolean
If true, save the file as stationery.
Name:
Type:
Description:
to
string
Where to export to.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Load a set of tags from an external file.
boolean
Packages the document.
boolean
Packages for GoLive.
nothing
Prints the document.
nothing
Redo the last action
nothing
Save the document.
nothing
Save a set of tags to an external file.
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
selectableItems
array of objects
he object(s) to select.
[existingSelection]
undo
None
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Select one or more objects.
nothing
Undo the last action
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 611
documentPreference Properties Property:
Type:
Access:
Description:
allowPageShuffle
boolean
read/write
If false, adding a page to a spread always adds it to that spread (up to a maximum of 10 pages). If true, pages added to the spread can be moved (“shuffled”) to a different spread.
columnGuideColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of column guides.
documentBleedBottomOffset
measurement string or number
read/write
he height of the bottom document bleed offset.
documentBleedInsideOrLetOffset
measurement string or number
read/write
he width of the inside (or let) document bleed offset.
documentBleedOutsideOrRightOffset
measurement string or number
read/write
he width of the outside (or right) document bleed offset.
documentBleedTopOffset
measurement string or number
read/write
he height of the top document bleed offset.
documentBleedUniformSize
boolean
read/write
he bleed uniform size flag
documentSlugUniformSize
boolean
read/write
he slug uniform size flag
facingPages
boolean
read/write
If true, the document uses facing pages.
marginGuideColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of margin guides.
overprintBlack
boolean
read/write
If true, overprint black when printing the document.
pageHeight
measurement string or number
read/write
he height of the pages in the document.
read/write
he orientation of the pages in the document.
pagesPerDocument integer
read/write
he number of pages in a document.
pageWidth
measurement string or number
read/write
he width of the pages in the document.
parent
object
read only
he parent of the object.
preserveLayoutWhenShuffling
boolean
read/write
If true, then when setting ‘allow page shuffle’ and the document has spreads with a number of pages greater than the default, this layout is preserved. If false then the pages on these spreads get shuffled.
slugBottomOffset
measurement string or number
read/write
he height of the bottom slug offset.
slugInsideOrLetOffset
measurement string or number
read/write
he width of the inside (or let) slug offset.
slugRightOrOutsideOffset
measurement string or number
read/write
he width of the outside (or right) slug offset.
slugTopOffset
measurement string or number
read/write
he height of the top slug offset.
pageOrientation
612
Name:
Decimal:
PageOrientation.landscape
2003395685
PageOrientation.portrait
1751738216
JavaScript Reference
InDesign CS Scripting Guide
documentPreset Properties Property:
Type:
Access:
Description:
bottom
measurement string or number
read/write
Bottom edge of the documentPreset as Unit (number or string)
columnCount
integer
read/write
he number of columns
columnGutter
measurement string or number
read/write
he distance between columns in a text frame as Unit (number or string)
documentBleedBottomOffset
measurement string or number
read/write
he bottom document bleed offset as Unit (number or string)
documentBleedInsideOrLetOffset
measurement string or number
read/write
he let or inside document bleed offset as Unit (number or string)
documentBleedOutsideOrRightOffset
measurement string or number
read/write
he outside or right document bleed offset as Unit (number or string)
documentBleedTopOffset
measurement string or number
read/write
he top document bleed offset as Unit (number or string)
facingPages
boolean
read/write
Whether the document has facing page.
id
integer
read only
he documentPreset’s unique id
index
integer
read only
index of the documentPreset within its parent application
label
string
read/write
A label that can be set to any string
let
measurement string or number
read/write
Let edge of the documentPreset as Unit (number or string)
name
string
read/write
he name of the documentPreset
pageHeight
measurement string or number
read/write
he height of the page as Unit (number or string)
read/write
he orientation of the page
pagesPerDocument integer
read/write
he number of pages in a document
pageWidth
measurement string or number
read/write
he width of the page as Unit (number or string)
parent
application
read only
he documentPreset’s parent
right
measurement string or number
read/write
Right edge of the documentPreset as Unit (number or string)
slugBottomOffset
measurement string or number
read/write
he bottom slug offset as Unit (number or string)
slugInsideOrLetOffset
measurement string or number
read/write
he inside or let slug offset as Unit (number or string)
slugRightOrOutsideOffset
measurement string or number
read/write
he right or outside slug offset as Unit (number or string)
slugTopOffset
measurement string or number
read/write
he top slug offset as Unit (number or string)
top
measurement string or number
read/write
Top edge of the documentPreset as Unit (number or string)
pageOrientation
Name:
Decimal:
PageOrientation.landscape
2003395685
PageOrientation.portrait
1751738216
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
InDesign CS Scripting Guide JavaScript Reference 613
Method: extractLabel
insertLabel
remove
614
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
documentPresets Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of documentPresets
Methods Method:
Parameters:
Return:
Description:
add
None
documentPreset
Create a new document preset.
anyItem
None
object
Returns any documentPreset.
firstItem
None
object
Returns the first documentPreset.
object
Returns the documentPreset with the specified ID.
objects
Returns the documentPresets within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
documentPreset object, number (index of the object in its containing object), or string (name of the object)
he documentPreset at the start of the range.
to
documentPreset object, number (index of the object in its containing object), or string (name of the object)
he documentPreset at the end of the range.
lastItem
None
object
Returns the last documentPreset.
middleItem
None
object
Returns the middle documentPreset.
object
Returns the next documentPreset.
object
Returns the previous documentPreset.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he documentPreset before the one desired.
Name:
Type:
Description:
obj
object
he documentPreset ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 615
documents Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of documents
Methods Method: add
Parameters: Name:
Type:
Description:
[showingWindow]
boolean
If true, open the document in a window.
[documentPreset]
documentPreset object or document preset name as string
document preset to use as documentPreset.
Return:
Description:
document
Create a new document.
anyItem
None
object
Returns any document.
firstItem
None
object
Returns the first document.
objects
Returns the documents within the specified range.
itemByRange
Name:
Type:
Description:
from
document object, number (index of the object in its containing object), or string (name of the object)
he document at the start of the range.
to
document object, number (index of the object in its containing object), or string (name of the object)
he document at the end of the range.
lastItem
None
object
Returns the last document.
middleItem
None
object
Returns the middle document.
object
Returns the next document.
object
Returns the previous document.
nextItem
previousItem
616
Name:
Type:
Description:
obj
object
he document before the one desired.
Name:
Type:
Description:
obj
object
he document ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
dottedStrokeStyle Properties Property:
Type:
Access:
Description:
dotArray
Array of numbers
read/write
he position of the dots in the the dotted stroke style.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dotted stroke style within its parent document or application
name
string
read/write
he name of the XML tag
parent
object
read only
he parent of the object.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
read only
Stroke style type
strokeCornerAdjustment
strokeStyleType
Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
string
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
remove
None
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 617
dottedStrokeStyles Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of dotted stroke styles
Methods Method:
Parameters:
Return:
Description:
add
None
dottedStrokeStyle
Create a new dotted stroke style.
anyItem
None
object
Returns any dotted stroke style.
firstItem
None
object
Returns the first dotted stroke style.
object
Returns the dotted stroke style with the specified ID.
objects
Returns the dotted stroke styles within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
dottedStrokeStyle object, number (index of the object in its containing object), or string (name of the object)
he dottedStrokeStyle at the start of the range.
to
dottedStrokeStyle object, number (index of the object in its containing object), or string (name of the object)
he dottedStrokeStyle at the end of the range.
lastItem
None
object
Returns the last dotted stroke style.
middleItem
None
object
Returns the middle dotted stroke style.
object
Returns the next dotted stroke style.
object
Returns the previous dotted stroke style.
nextItem
previousItem
618
Name:
Type:
Description:
obj
object
he dotted stroke style before the one desired.
Name:
Type:
Description:
obj
object
he dotted stroke style ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
dropdown Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the dropdown within its parent dialog column, dialog row, enabling group or border panel
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
selectedIndex
integer
read/write
index of the selected string in the dropdown
stringList
array of strings
read/write
A list of the strings that appear on the menu of the control.
InDesign CS Scripting Guide JavaScript Reference 619
dropdowns Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of dropdowns
Methods Method:
Parameters:
Return:
add
None
dropdown
Create a new dropdown.
anyItem
None
object
Returns any dropdown.
firstItem
None
object
Returns the first dropdown.
object
Returns the dropdown with the specified ID.
objects
Returns the dropdowns within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
dropdown object or number (index of the object in its containing object)
he dropdown at the start of the range.
to
dropdown object or number (index of the object in its containing object)
he dropdown at the end of the range.
Description:
lastItem
None
object
Returns the last dropdown.
middleItem
None
object
Returns the middle dropdown.
object
Returns the next dropdown.
object
Returns the previous dropdown.
nextItem
previousItem
620
Name:
Type:
Description:
obj
object
he dropdown before the one desired.
Name:
Type:
Description:
obj
object
he dropdown ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
dtd Properties Property:
Type:
Access:
Description:
contents
string
read only
he text contents as string or idSpecialcharacters
id
integer
read only
he dtd’s unique id
index
integer
read only
index of the dtd within its parent document, XML element or XML item
parent
object
read only
he dtd’s parent as document, XML element or XML item
publicId
string
read only
he public id of the dtd’S DOCTYPE declaration. Only valid if the dtd an an external subset
rootTag
xmlTag
read/write
he tag of the document’s root object
systemId
string
read only
he system id of the dtd’S DOCTYPE declaration. Only valid if the dtd is an external subset
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
xmlElement
Move element before/ater another element or text object, or to beginning/end.
nothing
Deletes the object.
nothing
Select this dtd.
move
Name: to
[reference]
remove select
Type:
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Location.
Before/ater this object as XML item or text.
None Name: [existingSelection]
Type:
Description:
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 621
dtds Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of dtds
Methods Method:
Parameters:
Return:
Description:
anyItem
None
dtd
Returns any dtd.
firstItem
None
dtd
Returns the first dtd.
dtd
Returns the dtd with the specified ID.
dtds
Returns the dtds within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
dtd object, number (index of the object in its containing object), or string (name of the object)
he dtd at the start of the range.
to
dtd object, number (index of the object in its containing object), or string (name of the object)
he dtd at the end of the range.
lastItem
None
dtd
Returns the last dtd.
middleItem
None
dtd
Returns the middle dtd.
dtd
Returns the next dtd.
dtd
Returns the previous dtd.
nextItem
previousItem
622
Name:
Type:
Description:
obj
dtd
he dtd before the one desired.
Name:
Type:
Description:
obj
dtd
he dtd ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
enablingGroup Properties Property:
Type:
Access:
Description:
angleComboboxes
angleComboboxes
read only
All angle comboboxes
angleEditboxes
angleEditboxes
read only
All angle editboxes
borderPanels
borderPanels
read only
All border panels
checkboxControls
checkboxControls
read only
All checkbox controls
checkedState
boolean
read/write
True if this item is checked
dialogColumns
dialogColumns
read only
All columns
dialogRows
dialogRows
read only
All dialog rows
dropdowns
dropdowns
read only
All dropdowns
enablingGroups
enablingGroups
read only
All enabling checkbox panels
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the enabling group within its parent dialog column, dialog row, enabling group or border panel
integerComboboxes
integerComboboxes
read only
All integer comboboxes
integerEditboxes
integerEditboxes
read only
All integer editboxes
measurementComboboxes
measurementComboboxes
read only
All measurement comboboxes
measurementEditboxes
measurementEditboxes
read only
All measurement editboxes
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
percentComboboxes
percentComboboxes
read only
All percent comboboxes
percentEditboxes
percentEditboxes
read only
All percent editboxes
radiobuttonGroups
radiobuttonGroups
read only
All radio button groups
realComboboxes
realComboboxes
read only
All real number comboboxes
realEditboxes
realEditboxes
read only
All real number editboxes
staticLabel
string
read/write
static text label for the widget
staticTexts
staticTexts
read only
All static texts
textEditboxes
textEditboxes
read only
All text editboxes
widgets
widgets
read only
All widgets
InDesign CS Scripting Guide JavaScript Reference 623
enablingGroups Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of enabling groups
Methods Method:
Parameters:
Return:
Description:
add
None
enablingGroup
Create a new enabling group.
anyItem
None
object
Returns any enabling group.
firstItem
None
object
Returns the first enabling group.
object
Returns the enabling group with the specified ID.
objects
Returns the enabling groups within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
enablingGroup object or number (index of the object in its containing object)
he enablingGroup at the start of the range.
to
enablingGroup object or number (index of the object in its containing object)
he enablingGroup at the end of the range.
lastItem
None
object
Returns the last enabling group.
middleItem
None
object
Returns the middle enabling group.
object
Returns the next enabling group.
object
Returns the previous enabling group.
nextItem
previousItem
624
Name:
Type:
Description:
obj
object
he enabling group before the one desired.
Name:
Type:
Description:
obj
object
he enabling group ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
eps Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scale of the page item relative to its containing page item
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item
absoluteVertical Scale
number
read/write
he vertical scale of the page item relative to its containing page item
actualPpi
Array of numbers as [horizontal ppi, vertical ppi]
read only
he resolution of the native graphic file.
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he blend mode used to combine the object’s color with the background
blendMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
clippingPath
clippingPathSettings
read only
he clipping path settings
effectivePpi
Array of numbers as [horizontal ppi, vertical ppi]
read only
he resolution of the graphic ater it has been resized.
read/write
he type of feathering to apply
read/write
he feather mode
featherCornerType
featherMode
Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
featherWidth
number
read/write
he width of the feathering
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
horizontalScale
number
read/write
he scale percentage in the horizontal direction
id
integer
read only
he EPS’s unique id
InDesign CS Scripting Guide JavaScript Reference 625
Property:
Type:
Access:
Description:
imageTypeName
string
read only
he type of image
index
integer
read only
index of the EPS within its parent XML element, pageItem, oval, rectangle, polygon, graphicline, state, group or button
isolateBlending
boolean
read/write
Indicates whether the object should blend in isolation
itemLink
link
read only
link to a placed file
knockoutGroup
boolean
read/write
Indicates whether the object is a knockout group
label
string
read/write
A label that can be set to any string
read/write
he display settings for this page item
localDisplaySetting
Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
nonprinting
boolean
read/write
Whether the page item is non-printing
opacity
number
read/write
he opacity of the object
parent
object
read only
he EPS’s parent as XML element, pageItem, oval, rectangle, polygon, graphicline, state, group or button
rotationAngle
number
read/write
Angle of rotation
Name:
Decimal:
read/write
BlendMode.normal
1852797549
he blend mode to use for drawing the shadow
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
shadowBlendMode
shadowBlurRadius
number
read/write
he radius of the blur to apply to the shadow
shadowColor
swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the shadow
shadowxOffset
number
read/write
he horizontal offset of the shadow
shadowyOffset
number
read/write
he vertical offset of the shadow
shearAngle
number
read/write
he shear angle of the page item relative to the spread
626
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
space
string
read only
he color space
textWrapPreferences
textWrapPreference
read only
he text wrap preferences
verticalScale
number
read/write
he scale percentage in the vertical direction
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
Methods Method: exportFile
extractLabel
insertLabel
markup
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Return:
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Markup layout content with XML preserving the existing content.
InDesign CS Scripting Guide JavaScript Reference 627
Method: move
place
placeXML
remove
628
Parameters: Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
nothing
Deletes the object.
Method: resize
Parameters: Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Return:
Description:
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
InDesign CS Scripting Guide JavaScript Reference 629
Method: rotate
630
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Rotate the page item.
Method: shear
store
unlink
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
InDesign CS Scripting Guide JavaScript Reference 631
epsExportPreference Properties Property:
Type:
Access:
Description:
appliedFlattenerPreset
flattenerPreset
read/write
he flattener preset to use.
bleedBottom
measurement string or number
read/write
Amount to image below the defined page size as Unit (number or string).
bleedInside
measurement string or number
read/write
Amount to image inside the defined page size as Unit (number or string).
bleedOutside
measurement string or number
read/write
Amount to image outside the defined page size as Unit (number or string).
bleedTop
measurement string or number
read/write
Amount to image above the defined page size as Unit (number or string).
read/write
he format of data sent to the printer.
read/write
he EPS color space.
boolean
read/write
If true, export the pages as spreads.
Name:
Decimal:
read/write
FontEmbedding.none
1852796517
Control how fonts are embedded to the exported EPS.
read/write
If true, ignore flattener spread overrides.
read/write
Controls how much image data is exported to the EPS.
dataFormat
epsColor
epsSpreads fontEmbedding
ignoreSpreadOverrides imageData
Name:
Decimal:
DataFormat.ascii
1095975753
DataFormat.binary
1114534521
Name:
Decimal:
EPSColorSpace.rgb
1666336578
EPSColorSpace.cmyk
1129142603
EPSColorSpace.gray
1766290041
EPSColorSpace.unchangedColorSpace
1970161251
FontEmbedding.complete
2003332197
FontEmbedding.subset
1768842098
boolean Name:
Decimal:
EPSImageData.allImageData
1853058416
EPSImageData.proxyImageData
1819243130
omitBitmaps
boolean
read/write
Replace bitmap images with OPI links.
omitEPS
boolean
read/write
Replace EPS images with OPI links.
omitPDF
boolean
read/write
Replace PDF images with OPI links.
opiImageReplacement
boolean
read/write
If true, print graphics that are either linked using OPI comments or OPI comments stored in imported EPS files.
pageRange
page range as string
read/write
he range of pages as idpageRange or string.
parent
application
read only
he EPSExportPreference’s parent.
read/write
he level of PostScript to send to the printer.
read/write
he type of preview to save with the exported EPS.
postScriptLevel
preview
632
Name:
Decimal:
PostScriptLevels.level2
1347636274
PostScriptLevels.level3
1347636275
Name:
Decimal:
PreviewTypes.none
1852796517
PreviewTypes.tiffPreview
1164997734
PreviewTypes.pictPreview
1164996724
JavaScript Reference
InDesign CS Scripting Guide
epsImportPreference Properties Property:
Type:
Access:
Description:
epsFrames
boolean
read/write
If true, create frames from clip path when imports EPS
read/write
he type of proxy created when imports EPS
epsProxy
Name:
Decimal:
CreateProxy.asNeeded
1699311204
CreateProxy.always
1699307895
opiComments
boolean
read/write
If true, read OPI image links when imports EPS
parent
application
read only
he EPSImportPreference’s parent
InDesign CS Scripting Guide JavaScript Reference 633
epss Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of EPSs
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any EPS.
firstItem
None
object
Returns the first EPS.
object
Returns the EPS with the specified ID.
objects
Returns the EPSs within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
enablingGroup object or number (index of the object in its containing object)
he enablingGroup at the start of the range.
to
enablingGroup object or number (index of the object in its containing object)
he enablingGroup at the end of the range.
lastItem
None
object
Returns the last EPS.
middleItem
None
object
Returns the middle EPS.
object
Returns the next EPS.
object
Returns the previous EPS.
nextItem
previousItem
634
Name:
Type:
Description:
obj
object
he EPS before the one desired.
Name:
Type:
Description:
obj
object
he EPS ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
excelImportPreference Properties Property: alignmentStyle
Type: Name:
Decimal:
AlignmentStyle.spreadsheet
1936749171
AlignmentStyle.letAlign
1818584692
AlignmentStyle.rightAlign
1919379572
AlignmentStyle.centerAlign
1667591796
Access:
Description:
read/write
he alignment of text in the cells of the imported Excel spreadsheet.
decimalPlaces
integer
read/write
he number of decimal places.
errorCode
integer
read/write
he error code associated with the Excel spreadsheet import. (0-Success 1-Empty Sheet 2-Invalid sheet 3-Invalid range 4-Invalid View 5-Misc. Error).
parent
application
read only
he parent of the object.
rangeName
string
read/write
he name of selected range.
sheetIndex
integer
read/write
index of the selected sheet.
sheetName
string
read/write
he name of the selected sheet.
showHiddenCells
boolean
read/write
If true, show hidden cells in the imported spreadsheet.
read/write
Options for table Formatting
read/write
he name of selected view.
tableFormatting
viewName
Name:
Decimal:
TableFormatting.excelFormattedTable
2020361812
TableFormatting.excelUnformattedTable
2020365652
TableFormatting.excelUnformattedTabbedText
2018858068
string
InDesign CS Scripting Guide JavaScript Reference 635
findPreference Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
autoLeading
number
read/write
Percentage for calculating auto leading
balanceRaggedLines
boolean
read/write
If true, balance ragged lines
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
capitalization
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
caseSensitive
boolean
read/write
If true, then search only for text that matches case
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he text override of the fill’s tint percentage (-1 indicates no override)
findText
string
read/write
he text to find
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
636
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
read/write
Alignment of the paragraph containing the text.
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
otfFigureStyle
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
InDesign CS Scripting Guide JavaScript Reference 637
Property:
Type:
Access:
Description:
otfFraction
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
application
read only
he parent of the object.
pointSize
number
read/write
he size of the text in points.
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140 read/write
he right indent applied to the paragraph containing the text.
read/write
Justification for lines with only one word.
position
rightIndent singleWordJustification
measurement string or number Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
Where to start the paragraph
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he color of the strike through as swatch or string
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through as swatch or string
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through as Unit (number or string)
638
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
strikehroughOverprint
boolean
read/write
If true, overprint the strike through
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strike through
strikehroughWeight
number
read/write
he line weight of the strike through
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he text override of the stroke’s tint percentage (-1 indicates no override)
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underlineColor
swatch object or swatch name as string
read/write
he color of the underline as swatch or string
underlineGapColor
swatch object or swatch name as string
read/write
he gap color of the underline as swatch or string
underlineGapOverprint
boolean
read/write
If true, overprint the gap of the underline
underlineGapTint
number
read/write
he gap tint of the underline
underlineOffset
measurement string or number
read/write
he offset of the underline as Unit (number or string)
underlineOverprint
boolean
read/write
If true, overprint the underline
underlineTint
number
read/write
he tint of the underline
underlineType
strokeStyle
read/write
he stroke type of the underline
underlineWeight
number
read/write
he line weight of the underline
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
wholeWord
boolean
read/write
If true, then disregard text embedded within a larger word
InDesign CS Scripting Guide JavaScript Reference 639
flattenerPreference Properties Property:
Type:
Access:
Description:
clipComplexRegions
boolean
read/write
If true, clip rasterized areas of the page to the objects which are actually rasterized.
convertAllStrokesToOutlines
boolean
read/write
Convert all strokes to outlines, not just those involved with transparency
convertAllTextToOutlines
boolean
read/write
Convert all text to outlines, not just the text involved with transparency
gradientAndMeshResolution
number
read/write
Resolution at which gradient and mesh are rasterized, when necessary
lineArtAndTextResolution
number
read/write
Resolution of transparency effects for line art and text (drop shadows and feathering)
parent
spread
read only
he parent of the object.
rasterVector Balance
number or one of the following constants:
read/write
he raster/vector balance.
640
Name:
Decimal:
FlattenerLevel.high
1701726313
FlattenerLevel.low
1701727351
FlattenerLevel.medium
1701727588
FlattenerLevel.mediumHigh
1718373704
FlattenerLevel.mediumLow
1718373708
JavaScript Reference
InDesign CS Scripting Guide
flattenerPreset Properties Property:
Type:
Access:
Description:
clipComplexRegions
boolean
read/write
Clip rasterized areas of the page to the objects which are actually rasterized
convertAllStrokesToOutlines
boolean
read/write
Convert all strokes to outlines, not just those involved with transparency
convertAllTextToOutlines
boolean
read/write
Convert all text to outlines, not just the text involved with transparency
gradientAndMeshResolution
number
read/write
Resolution at which gradient and mesh are rasterized, when necessary
id
integer
read only
he flattener preset’s unique id
index
integer
read only
index of the flattener preset within its parent application
label
string
read/write
A label that can be set to any string
lineArtAndTextResolution
number
read/write
Resolution of transparency effects for line art and text (drop shadows and feathering)
name
string
read/write
he name of the flattener preset
parent
application
read only
he flattener preset’s parent
rasterVector Balance
number or one of the following constants:
read/write
he raster/vector balance.
Name:
Decimal:
FlattenerLevel.high
1701726313
FlattenerLevel.low
1701727351
FlattenerLevel.medium
1701727588
FlattenerLevel.mediumHigh
1718373704
FlattenerLevel.mediumLow
1718373708
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
extractLabel
insertLabel
remove
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
InDesign CS Scripting Guide JavaScript Reference 641
flattenerPresets Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of flattener presets
Methods Method:
Parameters:
Return:
Description:
add
None
flattenerPreset
Create a new flattener preset.
anyItem
None
object
Returns any flattener preset.
firstItem
None
object
Returns the first flattener preset.
object
Returns the flattener preset with the specified ID.
objects
Returns the flattener presets within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
flattenerPreset object, number (index of the object in its containing object), or string (name of the object)
he flattenerPreset at the start of the range.
to
flattenerPreset object, number (index of the object in its containing object), or string (name of the object)
he flattenerPreset at the end of the range.
lastItem
None
object
Returns the last flattener preset.
middleItem
None
object
Returns the middle flattener preset.
object
Returns the next flattener preset.
object
Returns the previous flattener preset.
nextItem
previousItem
642
Name:
Type:
Description:
obj
object
he flattener preset before the one desired.
Name:
Type:
Description:
obj
object
he flattener preset ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
font Properties Property:
Type:
Access:
Description:
allowEmbedding
boolean
read only
If true, the font can be embedded.
allowOutlines
boolean
read only
If true, the font allows the creation of outlines from its character data.
allowPDFEmbedding
boolean
read only
Can the font be embedded in a PDF
allowPrinting
boolean
read only
If true, the font can be printed.
fontFamily
string
read only
he name of the font family.
fontStyleName
string
read only
he name of the font style.
read only
he type of the font (TrueType, Type1, etc.).
fontType
Name:
Decimal:
FontTypes.type1
1718899761
FontTypes.trueType
1718899796
FontTypes.cid
1718895433
FontTypes.atc
1718894932
FontTypes.bitmap
1718895209
FontTypes.ocf
1718898499
FontTypes.openTypeCFF
1718898502
FontTypes.openTypeCID
1718898505
FontTypes.openTypeTT
1718898516
index
integer
read only
index of the font within its parent document or application
location
string
read only
he location of the font file on disk, including the file name.
name
string
read only
he name of the font.
parent
object
read only
he parent of the object.
postScriptName
string
read only
he PostScript name of the font
restrictedPrinting
boolean
read only
If true, printing of the font is restricted.
Name:
read only
he status of the font.
status
Decimal:
FontStatus.installed
1718831470
FontStatus.notAvailable
1718832705
FontStatus.fauxed
1718830689
FontStatus.substituted
1718834037
FontStatus.unknown
1433299822
InDesign CS Scripting Guide JavaScript Reference 643
Methods Method: checkOpenTypeFeature
644
Parameters: Name: using
JavaScript Reference
Type:
Description:
Name:
Decimal:
OpenTypeFeature.low
1701727351
OpenTypeFeature. discretionaryLigaturesFeature
1330930764
OpenTypeFeature. fractionsFeature
1330931282
OpenTypeFeature. ordinalFeature
1330933586
OpenTypeFeature. swashFeature
1330934615
OpenTypeFeature. proportionalOldstyleFeature
1330934857
OpenTypeFeature. contextualAlternatesFeature
1330930497
OpenTypeFeature. allSmallCapsFeature
1664250691
OpenTypeFeature. superscriptFeature
1884247123
OpenTypeFeature. subscriptFeature
1884247106
OpenTypeFeature. numeratorFeature
1884247118
OpenTypeFeature. denominatorFeature
1884247108
OpenTypeFeature.tabularLiningFeature
1330931284
OpenTypeFeature. titlingFeature
1330933587
OpenTypeFeature.proportionalLiningFeature
1330932816
OpenTypeFeature.tabularOldstyleFeature
1330933588
OpenTypeFeature.defaultFigureStyleFeature
1330931268
InDesign CS Scripting Guide
Which OpenType feature to use.
Return:
Description:
boolean
Check whether a font object supports a specific open type feature. Pass in either one of the OpenTypeFeature enumeration values or a string with the 4 character code of the feature.
fonts Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of fonts
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any font.
firstItem
None
object
Returns the first font.
objects
Returns the fonts within the specified range.
itemByRange
Name:
Type:
Description:
from
font object, number (index of the object in its containing object), or string (name of the object)
he font at the start of the range.
to
font object, number (index of the object in its containing object), or string (name of the object)
he font at the end of the range.
lastItem
None
object
Returns the last font.
middleItem
None
object
Returns the middle font.
object
Returns the next font.
object
Returns the previous font.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he font before the one desired.
Name:
Type:
Description:
obj
object
he font ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 645
formField Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item.
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item.
absoluteVerticalScale
number
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
appearanceName
string
read only
Name of any appearance of field
associatedXMLElement
xmlElement
read only
Returns the associated XML element
behaviors
behaviors
read only
Every behavior object
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read only
Every close window behavior object
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
blendMode
closeWindowBehaviors cornerEffect
646
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
closeWindowBehaviors Name:
Decimal:
CornerEffects.none
1852796517
CornerEffects.roundedCorner
1667592804
CornerEffects.inverseRoundedCorner
1667591798
CornerEffects.insetCorner
1667591795
CornerEffects.bevelCorner
1667588726
CornerEffects.fancyCorner
1667589742
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
cornerRadius
number
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
description
string
read/write
Description
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
endCap
endJoin
featherCornerType
featherMode
Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
featherWidth
number
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fillTint
number
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gapColor
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gapTint
number
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gotoAnchorBehaviors
gotoAnchorBehaviors
read only
Every goto anchor behavior object
gotoFirstPageBehaviors
gotoFirstPageBehaviors
read only
Every goto first page behavior object
gotoLastPageBehaviors
gotoLastPageBehaviors
read only
Every goto last page behavior object
gotoNextPageBehaviors
gotoNextPageBehaviors
read only
Every goto next page behavior object
gotoNextViewBehaviors
gotoNextViewBehaviors
read only
Every goto next view behavior object
gotoPreviousPageBehaviors
gotoPreviousPageBehaviors
read only
Every goto previous page behavior object
InDesign CS Scripting Guide JavaScript Reference 647
Property:
Type:
Access:
Description:
gotoPreviousViewBehaviors
gotoPreviousViewBehaviors
read only
Every goto previous view behavior object
gotoURLBehaviors
gotoURLBehaviors
read only
Every goto URL behavior object
gradientFillAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientFillLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradientStrokeAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientStrokeLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the form field within its parent spread, master spread, group, textFrame, story, text, character, word, line, textcolumn, paragraph, textStyleRange, cell, table, page, document, layer or insertion point
isolateBlending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
itemLayer
layer
read/write
he layer containing the page item.
knockoutGroup
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
648
JavaScript Reference
InDesign CS Scripting Guide
Property: letLineEnd
localDisplaySetting
Type: Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
Access:
Description:
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miterLimit
number
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
movieBehaviors
movieBehaviors
read only
movie behaviors collection object
name
string
read/write
he name of the behavior.
nonprinting
boolean
read/write
If true, the page item is non-printing.
opacity
number
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
openFileBehaviors
openFileBehaviors
read only
Open file behaviors collection object
overprintFill
boolean
read/write
If true, the fill of the page item will overprint.
overprintGap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprintStroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overriddenMasterPageItem
pageItem
read only
A reference to the master page item linked to the page item (if any).
parent
object
read only
he parent of the page item.
quitBehaviors
quitBehaviors
read only
Quit behaviors collection object
InDesign CS Scripting Guide JavaScript Reference 649
Property: rightLineEnd
rotationAngle shadowBlendMode
Type: Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
number Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Access:
Description:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadowBlurRadius
number
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadowColor
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadowMode
shadowOpacity
650
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
number
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
shadowxOffset
number
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadowyOffset
number
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shearAngle
number
read/write
he shear angle applied to the page item.
showHideFieldsBehaviors
showHideFieldsBehaviors
read only
Show/hide fields behaviors collection object
soundBehaviors
soundBehaviors
read only
sound behaviors collection object
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
strokeAlignment
strokeColor strokeCornerAdjustment
Name:
Decimal:
StrokeAlignment.centerAlignment
1936998723
StrokeAlignment.insideAlignment
1936998729
StrokeAlignment.outsideAlignment
1936998735
swatch object or swatch name as string Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
strokeDashAndGap
array of measurement strings or numbers as [dash, gap, dash, gap,...]
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
strokeTint
number
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
strokeType
strokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
strokeWeight
number
read/write
he weight (in points) of the stroke applied to the page item.
textWrapPreferences
textWrapPreference
read only
he text wrap applied to the page item.
verticalScale
number
read/write
he vertical scaling percentage of the page item.
viewZoomBehaviors
viewZoomBehaviors
read only
View Zoom behaviors collection object
read/write
Visibility of the item in the output PDF.
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
visibilityInPDF
visibleBounds
Name:
Decimal:
VisibilityInPDF.visibleInPDF
1180068211
VisibilityInPDF.hiddenInPDF
1181247844
VisibilityInPDF.visibleButDoesNotPrintInPDF
1180061264
VisibilityInPDF.hiddenButPrintableInPDF
1179140688
array of measurement strings or numbers as [y1, x1, y2, x2]
InDesign CS Scripting Guide JavaScript Reference 651
Methods Method: addPath
Parameters: Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
pageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (objects>p athfinder>Add). Brings the object forward.
bringForward
None
nothing
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
pageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (objects>pathfinder> Exclude Overlap).
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
excludeOverlapPath
Name:
Type:
Description:
with
objects
he objects to exclude.
exportFile
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
652
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
JavaScript Reference
InDesign CS Scripting Guide
Method: fit
Parameters: Name: given
insertLabel
Type:
Description:
Name:
Decimal:
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions.proportionally
1667591779
FitOptions. contentToFrame
1668247152
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
he objects to intersect with.
makeCompoundPath
Name:
Type:
Description:
with
objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
minusBack
move
override
Description:
nothing
Fits content within the frame.
nothing
Sets the string associated with the given key (label name).
pageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (objects>pathfinder>Intersect).
pageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
pageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (objects>pathfi nder>Minus Back).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
pageItem
Overrides an item from the master page and places it on the page.
he fit option to use.
Name:
intersectPath
Return:
InDesign CS Scripting Guide JavaScript Reference 653
Method: place
placeXML
Parameters: Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
releaseCompoundPath
None
objects
release compound path.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
654
JavaScript Reference
InDesign CS Scripting Guide
Method: resize
Parameters: Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Return:
Description:
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
InDesign CS Scripting Guide JavaScript Reference 655
Method: rotate
select
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Rotate the page item.
nothing
Select this form field.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
656
JavaScript Reference
InDesign CS Scripting Guide
Method: shear
store
subtractPath
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
pageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (objects>pathfinder>Subtract).
InDesign CS Scripting Guide JavaScript Reference 657
Method: unlink
Parameters: Name: from
658
JavaScript Reference
Type:
Description:
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
formFields Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of form fields
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any form field.
firstItem
None
object
Returns the first form field.
object
Returns the form field with the specified ID.
objects
Returns the form fields within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
formField object, number (index of the object in its containing object), or string (name of the object)
he formField at the start of the range.
to
formField object, number (index of the object in its containing object), or string (name of the object)
he formField at the end of the range.
lastItem
None
object
Returns the last form field.
middleItem
None
object
Returns the middle form field.
object
Returns the next form field.
object
Returns the previous form field.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he form field before the one desired.
Name:
Type:
Description:
obj
object
he form field ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 659
galleyPreference Properties Property:
Type:
Access:
Description:
backgroundColor
uiColor constant or array of numbers as [r, g, b]
read/write
he background color of the story Editor. his property corresponds to the Background pop-up menu in the story Editor Display panel of the Preferences dialog box.
blinkCursor
boolean
read/write
If true, the story Editor cursor will blink. his property corresponds to the Blink option in the story Editor Display panel of the Preferences dialog box.
read/write
Sets the type of cursor should be used in galley and story views.
string
read/write
he font to use for displaying text in the story Editor.
parent
object
read only
he parent of the object.
smoothText
boolean
read/write
If true, antialias text displayed in the story Editor. this property corresponds to the Enable Anti-Aliasing option in the story Editor Display panel of the Preferences dialog box.
textColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of text displayed in the story Editor. his property corresponds to the text color pop-up menu in the story Editor Display panel of the Preferences dialog box.
useOverridePreviewFont
boolean
read/write
If true, use the font specified in the override preview font property.
cursorType
overridePreviewFont
660
Name:
Decimal:
CursorTypes.standardCursor
1699968100
CursorTypes.thickCursor
1700029291
CursorTypes.barbellCursor
1698841196
CursorTypes.blockCursor
1698851951
JavaScript Reference
InDesign CS Scripting Guide
generalPreference Properties Property:
Type:
Access:
Description:
completeFontDownloadGlyphLimit
integer
read/write
Complete font download glyph limit
includePreview
boolean
read/write
If true, include a preview when saving the document
read/write
How to number pages
pageNumbering
Name:
Decimal:
PageNumberingOptions.section
1935897710
PageNumberingOptions.absolute
1096971116
parent
application
read only
he parent of the object.
temporaryFolder
string
read/write
Where temporary files should be stored
read/write
Controls the appearance of the tools palette
read/write
Controls the appearance of tool tips
toolsPalette
toolTips
Name:
Decimal:
ToolsPaletteOptions.singleColumn
1163092844
ToolsPaletteOptions.doubleColumn
1162109804
ToolsPaletteOptions.singleRow
1163096695
Name:
Decimal:
ToolTipOptions.normal
1852797549
ToolTipOptions.none
1852796517
ToolTipOptions.fast
1180791668
InDesign CS Scripting Guide JavaScript Reference 661
gotoAnchorBehavior Properties Property:
Type:
Access:
Description:
anchorItem
hyperlink
read/write
he anchor item
anchorName
string
read only
he anchor name
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
filePath
string
read/write
he file path
id
integer
read only
he GotoAnchorbehavior’s unique id
index
integer
read only
index of the GotoAnchorbehavior within its parent form field or button
label
string
read/write
A label that can be set to any string
name
string
read only
he name of the GotoAnchorbehavior
parent
object
read only
he GotoAnchorbehavior’s parent as form field or button
read/write
he zoom setting
zoomSetting
Name:
Decimal:
GoToZoomOptions.inheritZoom
1212437370
GoToZoomOptions.fitWindow
1212437367
GoToZoomOptions.fitWidth
1212437335
GoToZoomOptions.fitVisible
1212437334
GoToZoomOptions.actualSize
2053206906
Methods Method: extractLabel
insertLabel
remove
662
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
gotoAnchorBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of GotoAnchorbehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
gotoAnchorBehavior
Create a new goto anchor behavior.
anyItem
None
object
Returns any GotoAnchorbehavior.
firstItem
None
object
Returns the first GotoAnchorbehavior.
object
Returns the GotoAnchorbehavior with the specified ID.
objects
Returns the GotoAnchorbehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
gotoAnchorBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoAnchorBehavior at the start of the range.
to
gotoAnchorBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoAnchorBehavior at the end of the range.
lastItem
None
object
Returns the last GotoAnchorbehavior.
middleItem
None
object
Returns the middle GotoAnchorbehavior.
object
Returns the next GotoAnchorbehavior.
object
Returns the previous GotoAnchorbehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he GotoAnchorbehavior before the one desired.
Name:
Type:
Description:
obj
object
he GotoAnchorbehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 663
gotoFirstPageBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the GotoFirstpagebehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
parent
object
read only
he parent of the object.
read/write
he zoom setting
zoomSetting
Name:
Decimal:
GoToZoomOptions.inheritZoom
1212437370
GoToZoomOptions.fitWindow
1212437367
GoToZoomOptions.fitWidth
1212437335
GoToZoomOptions.fitVisible
1212437334
GoToZoomOptions.actualSize
2053206906
Methods Method: extractLabel
insertLabel
remove
664
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
gotoFirstPageBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of GotoFirstpagebehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
gotoFirstPageBehavior
Create a new goto first page behavior.
anyItem
None
object
Returns any GotoFirstpagebehavior.
firstItem
None
object
Returns the first GotoFirstpagebehavior.
object
Returns the GotoFirstpagebehavior with the specified ID.
objects
Returns the GotoFirstpagebehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
gotoFirstPageBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoFirstPageBehavior at the start of the range.
to
gotoFirstPageBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoFirstPageBehavior at the end of the range.
lastItem
None
object
Returns the last GotoFirstpagebehavior.
middleItem
None
object
Returns the middle GotoFirstpagebehavior.
object
Returns the next GotoFirstpagebehavior.
object
Returns the previous GotoFirstpagebehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he GotoFirstpagebehavior before the one desired.
Name:
Type:
Description:
obj
object
he GotoFirstpagebehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 665
gotoLastPageBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the GotoLastpagebehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
parent
object
read only
he parent of the object.
read/write
he zoom setting
zoomSetting
Name:
Decimal:
GoToZoomOptions.inheritZoom
1212437370
GoToZoomOptions.fitWindow
1212437367
GoToZoomOptions.fitWidth
1212437335
GoToZoomOptions.fitVisible
1212437334
GoToZoomOptions.actualSize
2053206906
Methods Method: extractLabel
insertLabel
remove
666
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
gotoLastPageBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of GotoLastpagebehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
gotoLastPageBehavior
Create a new goto last page behavior.
anyItem
None
object
Returns any GotoLastpagebehavior.
firstItem
None
object
Returns the first GotoLastpagebehavior.
object
Returns the GotoLastpagebehavior with the specified ID.
objects
Returns the GotoLastpagebehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
gotoLastPageBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoLastPageBehavior at the start of the range.
to
gotoLastPageBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoLastPageBehavior at the end of the range.
lastItem
None
object
Returns the last GotoLastpagebehavior.
middleItem
None
object
Returns the middle GotoLastpagebehavior.
object
Returns the next GotoLastpagebehavior.
object
Returns the previous GotoLastpagebehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he GotoLastpagebehavior before the one desired.
Name:
Type:
Description:
obj
object
he GotoLastpagebehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 667
gotoNextPageBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the GotoNextpagebehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
parent
object
read only
he parent of the object.
read/write
he zoom setting
zoomSetting
Name:
Decimal:
GoToZoomOptions.inheritZoom
1212437370
GoToZoomOptions.fitWindow
1212437367
GoToZoomOptions.fitWidth
1212437335
GoToZoomOptions.fitVisible
1212437334
GoToZoomOptions.actualSize
2053206906
Methods Method: extractLabel
insertLabel
remove
668
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
gotoNextPageBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of GotoNextpagebehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
gotoNextPageBehavior
Create a new goto next page behavior.
anyItem
None
object
Returns any GotoNextpagebehavior.
firstItem
None
object
Returns the first GotoNextpagebehavior.
object
Returns the GotoNextpagebehavior with the specified ID.
objects
Returns the GotoNextpagebehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
gotoNextPageBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoNextPageBehavior at the start of the range.
to
gotoNextPageBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoNextPageBehavior at the end of the range.
lastItem
None
object
Returns the last GotoNextpagebehavior.
middleItem
None
object
Returns the middle GotoNextpagebehavior.
object
Returns the next GotoNextpagebehavior.
object
Returns the previous GotoNextpagebehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he GotoNextpagebehavior before the one desired.
Name:
Type:
Description:
obj
object
he GotoNextpagebehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 669
gotoNextViewBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the GotoNextViewbehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
parent
object
read only
he parent of the object.
read/write
he zoom setting
zoomSetting
Name:
Decimal:
GoToZoomOptions.inheritZoom
1212437370
GoToZoomOptions.fitWindow
1212437367
GoToZoomOptions.fitWidth
1212437335
GoToZoomOptions.fitVisible
1212437334
GoToZoomOptions.actualSize
2053206906
Methods Method: extractLabel
insertLabel
remove
670
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
gotoNextViewBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of GotoNextViewbehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
gotoNextViewBehavior
Create a new goto next view behavior.
anyItem
None
object
Returns any GotoNextViewbehavior.
firstItem
None
object
Returns the first GotoNextViewbehavior.
object
Returns the GotoNextViewbehavior with the specified ID.
objects
Returns the GotoNextViewbehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
gotoNextViewBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoNextViewBehavior at the start of the range.
to
gotoNextViewBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoNextViewBehavior at the end of the range.
lastItem
None
object
Returns the last GotoNextViewbehavior.
middleItem
None
object
Returns the middle GotoNextViewbehavior.
object
Returns the next GotoNextViewbehavior.
object
Returns the previous GotoNextViewbehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he GotoNextViewbehavior before the one desired.
Name:
Type:
Description:
obj
object
he GotoNextViewbehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 671
gotoPreviousPageBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the GotoPreviouspagebehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
parent
object
read only
he parent of the object.
read/write
he zoom setting
zoomSetting
Name:
Decimal:
GoToZoomOptions.inheritZoom
1212437370
GoToZoomOptions.fitWindow
1212437367
GoToZoomOptions.fitWidth
1212437335
GoToZoomOptions.fitVisible
1212437334
GoToZoomOptions.actualSize
2053206906
Methods Method: extractLabel
insertLabel
remove
672
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
gotoPreviousPageBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of GotoPreviouspagebehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
gotoPreviousPageBehavior
Create a new goto previous page behavior.
anyItem
None
object
Returns any GotoPreviouspagebehavior.
firstItem
None
object
Returns the first GotoPreviouspagebehavior.
object
Returns the GotoPreviouspagebehavior with the specified ID.
objects
Returns the GotoPreviouspagebehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
gotoPreviousPageBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoPreviousPageBehavior at the start of the range.
to
gotoPreviousPageBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoPreviousPageBehavior at the end of the range.
lastItem
None
object
Returns the last GotoPreviouspagebehavior.
middleItem
None
object
Returns the middle GotoPreviouspagebehavior.
object
Returns the next GotoPreviouspagebehavior.
object
Returns the previous GotoPreviouspagebehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he GotoPreviouspagebehavior before the one desired.
Name:
Type:
Description:
obj
object
he GotoPreviouspagebehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 673
gotoPreviousViewBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the GotoPreviousViewbehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
parent
object
read only
he parent of the object.
read/write
he zoom setting
zoomSetting
Name:
Decimal:
GoToZoomOptions.inheritZoom
1212437370
GoToZoomOptions.fitWindow
1212437367
GoToZoomOptions.fitWidth
1212437335
GoToZoomOptions.fitVisible
1212437334
GoToZoomOptions.actualSize
2053206906
Methods Method: extractLabel
insertLabel
remove
674
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
gotoPreviousViewBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of GotoPreviousViewbehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
gotoPreviousViewBehavior
Create a new goto previous view behavior.
anyItem
None
object
Returns any GotoPreviousViewbehavior.
firstItem
None
object
Returns the first GotoPreviousViewbehavior.
object
Returns the GotoPreviousViewbehavior with the specified ID.
objects
Returns the GotoPreviousViewbehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
gotoPreviousViewBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoPreviousViewBehavior at the start of the range.
to
gotoPreviousViewBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoPreviousViewBehavior at the end of the range.
lastItem
None
object
Returns the last GotoPreviousViewbehavior.
middleItem
None
object
Returns the middle GotoPreviousViewbehavior.
object
Returns the next GotoPreviousViewbehavior.
object
Returns the previous GotoPreviousViewbehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he GotoPreviousViewbehavior before the one desired.
Name:
Type:
Description:
obj
object
he GotoPreviousViewbehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 675
gotoURLBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
he GotoURLbehavior’s unique id
index
integer
read only
index of the GotoURLbehavior within its parent form field or button
label
string
read/write
A label that can be set to any string
name
string
read only
he name of the GotoURLbehavior
parent
object
read only
he GotoURLbehavior’s parent as form field or button
url
string
read/write
he URL
Methods Method: extractLabel
insertLabel
remove
676
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
gotoURLBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of GotoURLbehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
gotoURLBehavior
Create a new gotoURLBehavior.
anyItem
None
gotoURLBehavior
Returns any gotoURLBehavior.
firstItem
None
gotoURLBehavior
Returns the first gotoURLBehavior.
gotoURLBehavior
Returns the gotoURLBehavior with the specified ID.
gotoURLBehaviors
Returns the gotoURLBehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
gotoURLBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoURLBehavior at the start of the range.
to
gotoURLBehavior object, number (index of the object in its containing object), or string (name of the object)
he gotoURLBehavior at the end of the range.
lastItem
None
gotoURLBehavior
Returns the last gotoURLBehavior.
middleItem
None
gotoURLBehavior
Returns the middle gotoURLBehavior.
gotoURLBehavior
Returns the next gotoURLBehavior.
gotoURLBehavior
Returns the previous gotoURLBehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
gotoURLBehavior
he GotoURLbehavior before the one desired.
Name:
Type:
Description:
obj
gotoURLBehavior
he GotoURLbehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 677
gradient Properties Property:
Type:
Access:
Description:
gradientStops
gradientStops
read only
Every gradient stop
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the gradient within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the gradient swatch.
parent
object
read only
he parent of the object.
read/write
he type of the gradient.
type
Name:
Decimal:
GradientType.linear
1635282023
GradientType.radial
1918985319
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Merge one or more other swatches into this one.
nothing
Deletes the object.
extractLabel
insertLabel
merge
remove
678
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
object or object name as string
he swatches to merge.
None
JavaScript Reference
InDesign CS Scripting Guide
gradients Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of gradients
Methods Method:
Parameters:
Return:
Description:
add
None
gradient
Create a new gradient.
anyItem
None
object
Returns any gradient.
firstItem
None
object
Returns the first gradient.
object
Returns the gradient with the specified ID.
objects
Returns the gradients within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
gradient object, number (index of the object in its containing object), or string (name of the object)
he gradient at the start of the range.
to
gradient object, number (index of the object in its containing object), or string (name of the object)
he gradient at the end of the range.
lastItem
None
object
Returns the last gradient.
middleItem
None
object
Returns the middle gradient.
object
Returns the next gradient.
object
Returns the previous gradient.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he gradient before the one desired.
Name:
Type:
Description:
obj
object
he gradient ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 679
gradientStop Properties Property:
Type:
Access:
Description:
index
integer
read only
index of the gradientStop within its parent gradient
location
number
read/write
he location of the gradient stop, as a percentage of the length of the gradient ramp.
midpoint
number
read/write
he mid-point of the gradient stop, as a percentage of the distance from the gradient stop to the next gradient stop.
parent
gradient
read only
he parent of the object.
stopColor
color
read/write
he color of the gradient stop.
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
680
JavaScript Reference
InDesign CS Scripting Guide
gradientStops Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of gradientStops
Methods Method:
Parameters:
Return:
add
None
gradientStop
Create a new gradient stop.
anyItem
None
object
Returns any gradientStop.
firstItem
None
object
Returns the first gradientStop.
objects
Returns the gradientStops within the specified range.
itemByRange
Name:
Type:
Description:
from
gradientStop object or number (index of the object in its containing object)
he gradientStop at the start of the range.
to
gradientStop object or number (index of the object in its containing object)
he gradientStop at the end of the range.
Description:
lastItem
None
object
Returns the last gradientStop.
middleItem
None
object
Returns the middle gradientStop.
object
Returns the next gradientStop.
object
Returns the previous gradientStop.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he gradientStop before the one desired.
Name:
Type:
Description:
obj
object
he gradientStop after the one desired.
InDesign CS Scripting Guide JavaScript Reference 681
graphic Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scale of the page item relative to its containing page item
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item
absoluteVerticalScale
number
read/write
he vertical scale of the page item relative to its containing page item
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
horizontalScale
number
read/write
he scale percentage in the horizontal direction
id
integer
read only
he graphic’s unique id
imageTypeName
string
read only
he type of image
index
integer
read only
index of the graphic within its parent pageItem, oval, rectangle, polygon, graphicline, state, group or button
itemLink
link
read only
link to a placed file
label
string
read/write
A label that can be set to any string
read/write
he display settings for this page item
localDisplaySetting
Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
parent
object
read only
he graphic’s parent as pageItem, oval, rectangle, polygon, graphicline, state, group or button
rotationAngle
number
read/write
Angle of rotation
shearAngle
number
read/write
he shear angle of the page item relative to the spread
verticalScale
number
read/write
he scale percentage in the vertical direction
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
682
JavaScript Reference
InDesign CS Scripting Guide
Methods Method: exportFile
extractLabel
insertLabel
move
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Return:
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
InDesign CS Scripting Guide JavaScript Reference 683
Method: place
remove
684
Parameters: Name:
Type:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
None
JavaScript Reference
InDesign CS Scripting Guide
Description:
Return:
Description:
object
Place a file.
nothing
Deletes the object.
Method: resize
Parameters: Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Return:
Description:
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
InDesign CS Scripting Guide JavaScript Reference 685
Method: rotate
686
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Rotate the page item.
Method: shear
unlink
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
from
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
Return:
Description:
nothing
Shear the page item.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
InDesign CS Scripting Guide JavaScript Reference 687
graphicLine Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item.
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item.
absoluteVerticalScale
number
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he type of content
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
blendMode
contentType
cornerEffect
688
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Name:
Decimal:
ContentType.unassigned
1970168179
ContentType.graphicType
1735553140
ContentType.textType
1952412773
Name:
Decimal:
CornerEffects.none
1852796517
CornerEffects.roundedCorner
1667592804
CornerEffects.inverseRoundedCorner
1667591798
CornerEffects.insetCorner
1667591795
CornerEffects.bevelCorner
1667588726
CornerEffects.fancyCorner
1667589742
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
cornerRadius
number
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs.
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
endCap
endJoin
epss featherCornerType
featherMode
Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
epss Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
featherWidth
number
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fillTint
number
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gapColor
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gapTint
number
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradientFillAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientFillLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
InDesign CS Scripting Guide JavaScript Reference 689
Property:
Type:
Access:
Description:
gradientStrokeAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientStrokeLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
graphicLines
graphicLines
read only
All graphic lines
graphics
graphics
read only
All graphics
groups
groups
read only
groups
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
images
images
read only
images
index
integer
read only
index of the graphicline within its parent spread, master spread, pageItem, oval, rectangle, polygon, graphicline, group, state, document, layer, page, button, textFrame, story, text, character, word, line, textcolumn, paragraph, textStyleRange, cell, table or insertion point
isolateBlending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
itemLayer
layer
read/write
he layer containing the page item.
knockoutGroup
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
letLineEnd
690
Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
JavaScript Reference
InDesign CS Scripting Guide
Property: localDisplaySetting
Type: Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
Access:
Description:
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miterLimit
number
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
nonprinting
boolean
read/write
If true, the page item is non-printing.
opacity
number
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the page item will overprint.
overprintGap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprintStroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overriddenMasterPageItem
pageItem
read only
A reference to the master page item linked to the page item (if any).
pageItems
pageItems
read only
All page items
parent
object
read only
he parent of the page item.
paths
paths
read only
All paths
pdfs
pdfs
read only
PDFs.
picts
picts
read only
Picts.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
read/write
he rotation angle of the page item.
rightLineEnd
rotationAngle
Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
number
InDesign CS Scripting Guide JavaScript Reference 691
Property: shadowBlendMode
Type: Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Access:
Description:
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadowBlurRadius
number
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadowColor
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadowxOffset
number
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadowyOffset
number
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shearAngle
number
read/write
he shear angle applied to the page item.
Name:
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
strokeAlignment
strokeColor
692
Decimal:
StrokeAlignment.centerAlignment
1936998723
StrokeAlignment.insideAlignment
1936998729
StrokeAlignment.outsideAlignment
1936998735
swatch object or swatch name as string
JavaScript Reference
InDesign CS Scripting Guide
Property: strokeCornerAdjustment
Type: Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
Access:
Description:
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
strokeDashAndGap
array of measurement strings or numbers as [dash, gap, dash, gap,...]
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
strokeTint
number
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
strokeType
strokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
strokeWeight
number
read/write
he weight (in points) of the stroke applied to the page item.
textFrames
textFrames
read only
text Frames
textPaths
textPaths
read only
All text paths
textWrapPreferences
textWrapPreference
read only
he text wrap applied to the page item.
verticalScale
number
read/write
he vertical scaling percentage of the page item.
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
wmfs
wmfs
read only
WMFs.
Methods Method: addPath
Parameters: Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
pageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (objects>p athfinder>Add).
bringForward
None
nothing
Brings the object forward.
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
pageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (objects>pathfinder> Exclude Overlap).
excludeOverlapPath
Name:
Type:
Description:
with
objects
he objects to exclude.
InDesign CS Scripting Guide JavaScript Reference 693
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
fit
insertLabel
intersectPath
694
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
Name:
Decimal:
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Fits content within the frame.
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions.proportionally
1667591779
FitOptions. contentToFrame
1668247152
nothing
Sets the string associated with the given key (label name).
pageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (objects>pathfinder>Intersect).
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
he objects to intersect with.
JavaScript Reference
Description:
nothing
Decimal:
to
given
Return:
InDesign CS Scripting Guide
Method:
Parameters:
makeCompoundPath
Name:
Type:
Description:
with
objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
minusBack
move
override
place
placeXML
Return:
Description:
pageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
pageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (objects>pathfi nder>Minus Back).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
pageItem
Overrides an item from the master page and places it on the page.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
InDesign CS Scripting Guide JavaScript Reference 695
Method:
Parameters:
Return:
Description:
releaseCompoundPath
None
objects
release compound path.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
resize
696
Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Method: rotate
select
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Rotate the page item.
nothing
Select this graphic line.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
InDesign CS Scripting Guide JavaScript Reference 697
Method: shear
store
subtractPath
698
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
pageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (objects>pathfinder>Subtract).
Method: unlink
Parameters: Name: from
Type:
Description:
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
InDesign CS Scripting Guide JavaScript Reference 699
graphicLines Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of graphiclines
Methods Method: add
Parameters: Name:
Type:
Description:
[layer]
layer object or layer name as string
he layer on which to create the graphicline as layer.
[at]
[reference]
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
graphicLine
Create a new graphic line.
Location.
Before/ater this graphicline or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
anyItem
None
object
Returns any graphicline.
firstItem
None
object
Returns the first graphicline.
object
Returns the graphicline with the specified ID.
objects
Returns the graphiclines within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
graphicLine object or number (index of the object in its containing object)
he graphicLine at the start of the range.
to
graphicLine object or number (index of the object in its containing object)
he graphicLine at the end of the range.
lastItem
None
object
Returns the last graphicline.
middleItem
None
object
Returns the middle graphicline.
object
Returns the next graphicline.
nextItem
700
Name:
Type:
Description:
obj
object
he graphicline before the one desired.
JavaScript Reference
InDesign CS Scripting Guide
Method: previousItem
Parameters: Name:
Type:
Description:
obj
object
he graphicline ater the one desired.
Return:
Description:
object
Returns the previous graphicline.
InDesign CS Scripting Guide JavaScript Reference 701
graphics Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of graphics
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any graphic.
firstItem
None
object
Returns the first graphic.
object
Returns the graphic with the specified ID.
objects
Returns the graphics within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
graphic object or number (index of the object in its containing object)
he graphic at the start of the range.
to
graphic object or number (index of the object in its containing object)
he graphic at the end of the range.
lastItem
None
object
Returns the last graphic.
middleItem
None
object
Returns the middle graphic.
object
Returns the next graphic.
object
Returns the previous graphic.
nextItem
previousItem
702
Name:
Type:
Description:
obj
object
he graphic before the one desired.
Name:
Type:
Description:
obj
object
he graphic ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
gridPreference Properties Property:
Type:
Access:
baselineColor
uiColor constant or array of colors as [r, g, b]
read/write
Description: he color of the baseline grid.
baselineDivision
number
read/write
he distance between baseline grid lines.
baselineGridShown
boolean
read/write
If true, display the baseline grid.
baselineStart
number
read/write
he distance from the top of the page to the first increment of the baseline grid.
baselineViewhreshold
number
read/write
Sets the threshold (as a magnification percentage) at which the baseline grid will appear. If this property is set to 75%, the baseline grid will appear at all magnifications greater than or equal to 75% (100%, 200%, etc.), but will not be visible at magnifications less than 75%.
documentGridShown
boolean
read/write
If true, display the document grid.
documentGridSnapto
boolean
read/write
If true, object edges snap to the nearest document grid intersection when drawing, moving or resizing objects on a page.
gridColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of the document grid.
gridsInBack
boolean
read/write
If true, to display grids behind all other objects.
horizontalGridlineDivision
number
read/write
A spacing value between major horizontal document grid lines.
horizontalGridSubdivision
integer
read/write
he number of evenly spaced minor horizontal document grid lines between major horizontal document grid lines.
parent
object
read only
he parent of the object.
verticalGridlineDivision
number
read/write
he distance between major vertical document grid lines.
verticalGridSubdivision
integer
read/write
he number of evenly spaced minor vertical document grid lines between major vertical document grid lines.
InDesign CS Scripting Guide JavaScript Reference 703
group Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item.
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item.
absoluteVerticalScale
number
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read only
Every button
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
blendMode
buttons cornerEffect
cornerRadius
704
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
buttons Name:
Decimal:
CornerEffects.none
1852796517
CornerEffects.roundedCorner
1667592804
CornerEffects.inverseRoundedCorner
1667591798
CornerEffects.insetCorner
1667591795
CornerEffects.bevelCorner
1667588726
CornerEffects.fancyCorner
1667589742
number
JavaScript Reference
InDesign CS Scripting Guide
Property: endCap
endJoin
epss featherCornerType
featherMode
Type: Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
epss Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
Access:
Description:
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs.
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
featherWidth
number
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fillTint
number
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
formFields
formFields
read only
Every form field item
gapColor
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gapTint
number
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradientFillAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientFillLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradientStrokeAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
InDesign CS Scripting Guide JavaScript Reference 705
Property:
Type:
Access:
Description:
gradientStrokeLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
graphicLines
graphicLines
read only
All graphic lines
graphics
graphics
read only
All graphics
groups
groups
read only
groups
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
images
images
read only
images
index
integer
read only
index of the group within its parent spread, master spread, pageItem, oval, rectangle, polygon, graphicline, group, state, document, layer, page, button, textFrame, story, text, character, word, line, textcolumn, paragraph, textStyleRange, cell, table or insertion point
isolateBlending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
itemLayer
layer
read/write
he layer containing the page item.
knockoutGroup
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
letLineEnd
706
Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
JavaScript Reference
InDesign CS Scripting Guide
Property: localDisplaySetting
Type: Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
Access:
Description:
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miterLimit
number
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
nonprinting
boolean
read/write
If true, the page item is non-printing.
opacity
number
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the page item will overprint.
overprintGap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprintStroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overriddenMasterPageItem
pageItem
read only
A reference to the master page item linked to the page item (if any).
pageItems
pageItems
read only
All page items
parent
object
read only
he parent of the page item.
pdf
pdfs
read only
PDFs.
picts
picts
read only
Picts.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
read/write
he rotation angle of the page item.
rightLineEnd
rotationAngle
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
number
InDesign CS Scripting Guide JavaScript Reference 707
Property: shadowBlendMode
Type: Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Access:
Description:
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadowBlurRadius
number
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadowColor
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadowxOffset
number
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadowyOffset
number
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shearAngle
number
read/write
he shear angle applied to the page item.
Name:
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
strokeAlignment
strokeColor
708
Decimal:
StrokeAlignment.centerAlignment
1936998723
StrokeAlignment.insideAlignment
1936998729
StrokeAlignment.outsideAlignment
1936998735
swatch object or swatch name as string
JavaScript Reference
InDesign CS Scripting Guide
Property: strokeCornerAdjustment
Type: Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
Access:
Description:
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
strokeDashAndGap
array of measurement strings or numbers as [dash, gap, dash, gap,...]
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
strokeTint
number
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
strokeType
strokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
strokeWeight
number
read/write
he weight (in points) of the stroke applied to the page item.
textFrames
textFrames
read only
text Frames
textWrapPreferences
textWrapPreference
read only
he text wrap applied to the page item.
verticalScale
number
read/write
he vertical scaling percentage of the page item.
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
wmfs
wmfs
read only
WMFs.
Methods Method: addPath
Parameters: Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
pageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (objects>p athfinder>Add). Brings the object forward.
bringForward
None
nothing
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
pageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (objects>pathfinder> Exclude Overlap).
excludeOverlapPath
Name:
Type:
Description:
with
objects
he objects to exclude.
InDesign CS Scripting Guide JavaScript Reference 709
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
fit
insertLabel
intersectPath
710
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
Name:
Decimal:
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Fits content within the frame.
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions. proportionally
1667591779
FitOptions. contentToFrame
1668247152
nothing
Sets the string associated with the given key (label name).
pageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (objects>pathfinder>Intersect).
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
he objects to intersect with.
JavaScript Reference
Description:
nothing
Decimal:
to
given
Return:
InDesign CS Scripting Guide
Method:
Parameters:
makeCompoundPath
Name:
Type:
Description:
with
objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
minusBack
move
override
place
placeXML
Return:
Description:
pageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
pageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (objects>pathfi nder>Minus Back).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
pageItem
Overrides an item from the master page and places it on the page.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
InDesign CS Scripting Guide JavaScript Reference 711
Method:
Parameters:
Return:
Description:
releaseCompoundPath
None
objects
release compound path.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
resize
712
Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Method: rotate
select
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Rotate the page item.
nothing
Select this group.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
InDesign CS Scripting Guide JavaScript Reference 713
Method: shear
store
subtractPath
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
pageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (objects>pathfinder>Subtract).
transformGroupContents
None
nothing
Move a group’s transform to its children
ungroup
None
nothing
Ungroups a grouped page item
714
JavaScript Reference
InDesign CS Scripting Guide
Method: unlink
Parameters: Name: from
Type:
Description:
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
InDesign CS Scripting Guide JavaScript Reference 715
groups Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of groups
Methods Method: add
Parameters: Name:
Type:
Description:
groupItems
objects
A list of page items to group.
[layer]
layer object or layer name as string
he layer on which to create the group as layer.
[at]
[reference]
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
group
Create a new group.
Location.
Before/ater this group or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
anyItem
None
object
Returns any group.
firstItem
None
object
Returns the first group.
object
Returns the group with the specified ID.
objects
Returns the groups within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
group object or number (index of the object in its containing object)
he group at the start of the range.
to
group object or number (index of the object in its containing object)
he group at the end of the range.
lastItem
None
object
Returns the last group.
middleItem
None
object
Returns the middle group.
object
Returns the next group.
nextItem
716
Name:
Type:
Description:
obj
object
he group before the one desired.
JavaScript Reference
InDesign CS Scripting Guide
Method: previousItem
Parameters: Name:
Type:
Description:
obj
object
he group ater the one desired.
Return:
Description:
object
Returns the previous group.
InDesign CS Scripting Guide JavaScript Reference 717
guide Properties Property:
Type:
Access:
Description:
fitToPage
boolean
read/write
If true, the guide is limited to the page, if false, the guide extends across the spread.
guideColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of the guide.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the guide within its parent spread, master spread, document, layer or page
itemLayer
layer
read/write
he layer containing the guide.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
location
number
read/write
he location of the guide, in current page coordinates.
locked
boolean
read/write
If true, the guide is locked.
Name:
read/write
he orientation of the guide.
orientation
Decimal:
HorizontalOrVertical.horizontal
1752134266
HorizontalOrVertical.vertical
1986359924
parent
object
read only
he parent of the object.
viewhreshold
number
read/write
Sets the threshold (as a magnification percentage) at which the guide will appear. If this property is set to 75%, the guide will appear at all magnifications greater than or equal to 75% (100%, 200%, etc.), but will not be visible at magnifications less than 75%.
Methods Method: extractLabel
insertLabel
override
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
pageItem
Overrides an item from the master page and places it on the page.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
718
JavaScript Reference
InDesign CS Scripting Guide
Method: select
Parameters: Name: [existingSelection]
Type:
Description:
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Select this guide.
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 719
guidePreference Properties Property:
Type:
Access:
Description:
guidesInBack
boolean
read/write
If true, display guides behind all other objects.
guidesLocked
boolean
read/write
If true, guides are locked.
guidesShown
boolean
read/write
If true, all types of guides are displayed.
guidesSnapto
boolean
read/write
If true, object edges snap to the nearest guide when drawing, moving or resizing an object.
parent
object
read only
he parent of the object.
rulerGuidesColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of ruler guides.
rulerGuidesViewhreshold
number
read/write
Sets the default threshold (as a magnification percentage) at which the guides will appear. If this property is set to 75%, the guides will appear at all magnifications greater than or equal to 75% (100%, 200%, etc.), but will not be visible at magnifications less than 75%. his property can be changed for individual guides.
720
JavaScript Reference
InDesign CS Scripting Guide
guides Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of guides
Methods Method: add
Parameters: Name:
Type:
Description:
[layer]
layer object or layer name as string
he layer on which to create the guide as layer.
Return:
Description:
guide
Create a new guide.
anyItem
None
object
Returns any guide.
firstItem
None
object
Returns the first guide.
object
Returns the guide with the specified ID.
objects
Returns the guides within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
guide object or number (index of the object in its containing object)
he guide at the start of the range.
to
guide object or number (index of the object in its containing object)
he guide at the end of the range.
lastItem
None
object
Returns the last guide.
middleItem
None
object
Returns the middle guide.
object
Returns the next guide.
object
Returns the previous guide.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he guide before the one desired.
Name:
Type:
Description:
obj
object
he guide ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 721
hyperlink Properties Property:
Type:
Access:
Description:
borderColor
Array of numbers as [r, g, b]
read/write
he border color of the hyperlink.
read/write
he border style of the hyperlink.
borderStyle
Name:
Decimal:
HyperlinkAppearanceStyle.solid
1936682084
HyperlinkAppearanceStyle.dashed
1684108136
destination
object
read/write
he destination of the hyperlink.
hidden
boolean
read only
If true, the hyperlink will be hidden in the exported version of the document.
read/write
he appearance of the hyperlink’s highlight.
highlight
Name:
Decimal:
HyperlinkAppearanceHighlight.none
1852796517
HyperlinkAppearanceHighlight.invert
1853256308
HyperlinkAppearanceHighlight.outline
1869900910
HyperlinkAppearanceHighlight.inset
1853056372
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlink within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink.
parent
document
read only
he parent of the page item.
source
object
read/write
he source of this hyperlink.
visible
boolean
read/write
If true, the hyperlink is visible.
width
Name:
Decimal:
read/write
he border width of the hyperlink.
HyperlinkAppearanceWidth.thin
1952999790
HyperlinkAppearanceWidth.medium
1701727588
HyperlinkAppearanceWidth.thick
1952999787
Methods Method:
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
None
nothing
Deletes the object.
showDestination
None
nothing
Go to hyperlink destination
showSource
None
nothing
Go to hyperlink source
extractLabel
insertLabel
remove
722
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
JavaScript Reference
InDesign CS Scripting Guide
hyperlinkExternalPageDestination Properties Property:
Type:
Access:
Description:
destinationPageIndex
integer
read/write
he index of the page this destination points to.
documentPath
string
read/write
he path to the document this destination points to.
hidden
boolean
read only
If true, the hyperlink external page destination will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlinkExternalpageDestination within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the hyperlink external page destination.
parent
document
read only
he parent of the object.
viewBounds
Array of numbers as [top, bottom, let, right]
read/write
he view rectangle (ignored unless view setting is fixed) of the hyperlink external page destination.
viewPercentage
number
read/write
he zoom percentage (ignored unless view setting is fixed).
read/write
he view setting for the target page.
viewSetting
Name:
Decimal:
HyperlinkDestinationPageSetting.fixed
1212437350
HyperlinkDestinationPageSetting.fitView
1212437366
HyperlinkDestinationPageSetting.fitWindow
1212437367
HyperlinkDestinationPageSetting.fitWidth
1212437335
HyperlinkDestinationPageSetting.fitHeight
1212437352
HyperlinkDestinationPageSetting.fitVisible
1212437334
HyperlinkDestinationPageSetting.inheritZoom
1212437370
Methods Method: extractLabel
insertLabel
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
remove
None
nothing
Deletes the object.
showDestination
None
nothing
Go to hyperlink destination
InDesign CS Scripting Guide JavaScript Reference 723
hyperlinkExternalPageDestinations Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of hyperlinkExternalpageDestinations
Methods Method: add
Parameters: Name:
Type:
Description:
[destination]
page
he destination page.
Return:
Description:
hyperlinkExternalPageDestination
Create a new hyperlink external page destination.
anyItem
None
object
Returns any hyperlinkExternalpageDestination.
firstItem
None
object
Returns the first hyperlinkExternalpageDestination.
object
Returns the hyperlinkExternalpageDestination with the specified ID.
objects
Returns the hyperlinkExternalpageDestinations within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
hyperlinkExternalPageDestination object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkExternalPageDestination at the start of the range.
to
hyperlinkExternalPageDestination object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkExternalPageDestination at the end of the range.
lastItem
None
object
Returns the last hyperlinkExternalpageDestination.
middleItem
None
object
Returns the middle hyperlinkExternalpageDestination.
object
Returns the next hyperlinkExternalpageDestination.
object
Returns the previous hyperlinkExternalpageDestination.
nextItem
previousItem
724
Name:
Type:
Description:
obj
object
he hyperlinkExternalpageDestination before the one desired.
Name:
Type:
Description:
obj
object
he hyperlinkExternalpageDestination ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
hyperlinkPageDestination Properties Property:
Type:
Access:
Description:
destinationPage
page
read/write
he page this destination points to.
hidden
boolean
read only
If true, the hyperlink page destination will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlinkpageDestination within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink page destination.
nameManually
boolean
read/write
If true, use a user supplied name for the destination.
parent
document
read only
he parent of the object.
viewBounds
Array of numbers [top, let, bottom, right]
read/write
he view rectangle (ignored unless view setting is fixed) of the hyperlink page destination.
viewPercentage
number
read/write
he zoom percentage (ignored unless view setting is fixed).
read/write
he view setting for the target page.
viewSetting
Name:
Decimal:
HyperlinkDestinationPageSetting.fixed
1212437350
HyperlinkDestinationPageSetting.fitView
1212437366
HyperlinkDestinationPageSetting.fitWindow
1212437367
HyperlinkDestinationPageSetting.fitWidth
1212437335
HyperlinkDestinationPageSetting.fitHeight
1212437352
HyperlinkDestinationPageSetting.fitVisible
1212437334
HyperlinkDestinationPageSetting.inheritZoom
1212437370
Methods Method: extractLabel
insertLabel
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
remove
None
nothing
Deletes the object.
showDestination
None
nothing
Go to hyperlink destination
InDesign CS Scripting Guide JavaScript Reference 725
hyperlinkPageDestinations Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of hyperlinkpageDestinations
Methods Method: add
Parameters: Name:
Type:
Description:
[destination]
page
he destination page.
Return:
Description:
hyperlinkPageDestination
Create a new hyperlink page destination.
anyItem
None
object
Returns any hyperlinkpageDestination.
firstItem
None
object
Returns the first hyperlinkpageDestination.
object
Returns the hyperlinkpageDestination with the specified ID.
objects
Returns the hyperlinkpageDestinations within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
hyperlinkPageDestination object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkPageDestination at the start of the range.
to
hyperlinkPageDestination object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkPageDestination at the end of the range.
lastItem
None
object
Returns the last hyperlinkpageDestination.
middleItem
None
object
Returns the middle hyperlinkpageDestination.
object
Returns the next hyperlinkpageDestination.
object
Returns the previous hyperlinkpageDestination.
nextItem
previousItem
726
Name:
Type:
Description:
obj
object
he hyperlinkpageDestination before the one desired.
Name:
Type:
Description:
obj
object
he hyperlinkpageDestination after the one desired.
JavaScript Reference
InDesign CS Scripting Guide
hyperlinkPageItemSource Properties Property:
Type:
Access:
Description:
hidden
boolean
read only
If true, the hyperlink page item source will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlinkpageItemSource within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink page item source.
parent
document
read only
he parent of the object.
sourcePageItem
pageItem
read/write
he page item this source resides on
Methods Method: extractLabel
insertLabel
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
remove
None
nothing
Deletes the object.
showSource
None
nothing
Go to hyperlink source
InDesign CS Scripting Guide JavaScript Reference 727
hyperlinkPageItemSources Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of hyperlinkpageItemSources
Methods Method: add
Parameters: Name:
Type:
Description:
source
pageItem
he source page item.
Return:
Description:
hyperlinkPageItemSource
Create a new hyperlink page item source.
anyItem
None
object
Returns any hyperlinkpageItemSource.
firstItem
None
object
Returns the first hyperlinkpageItemSource.
object
Returns the hyperlinkpageItemSource with the specified ID.
objects
Returns the hyperlinkpageItemSources within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
hyperlinkPageItemSource object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkPageItemSource at the start of the range.
to
hyperlinkPageItemSource object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkPageItemSource at the end of the range.
lastItem
None
object
Returns the last hyperlinkpageItemSource.
middleItem
None
object
Returns the middle hyperlinkpageItemSource.
object
Returns the next hyperlinkpageItemSource.
object
Returns the previous hyperlinkpageItemSource.
nextItem
previousItem
728
Name:
Type:
Description:
obj
object
he hyperlinkpageItemSource before the one desired.
Name:
Type:
Description:
obj
object
he hyperlinkpageItemSource ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
hyperlinks Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of hyperlinks
Methods Method: add
Parameters: Name:
Type:
Description:
hyperlinkSource
object
he hyperlink source as hyperlinkpageItemSource or hyperlinktextSource.
[hyperlinkDestination]
object
he hyperlink destination as hyperlinktextDestination, hyperlinkpageDestination, hyperlinkExternalpageDestination or hyperlinkURLDestination.
Return:
Description:
hyperlink
Create a new hyperlink.
anyItem
None
object
Returns any hyperlink.
firstItem
None
object
Returns the first hyperlink.
object
Returns the hyperlink with the specified ID.
objects
Returns the hyperlinks within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
hyperlink object, number (index of the object in its containing object), or string (name of the object)
he hyperlink at the start of the range.
to
hyperlink object, number (index of the object in its containing object), or string (name of the object)
he hyperlink at the end of the range.
lastItem
None
object
Returns the last hyperlink.
middleItem
None
object
Returns the middle hyperlink.
object
Returns the next hyperlink.
object
Returns the previous hyperlink.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he hyperlink before the one desired.
Name:
Type:
Description:
obj
object
he hyperlink ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 729
hyperlinkTextDestination Properties Property:
Type:
Access:
Description:
destinationText
insertionPoint
read/write
he insertion point this destination points to.
hidden
boolean
read only
If true, the hyperlink text destination will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlinktextDestination within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink text destination.
parent
document
read only
he parent of the object.
Methods Method: extractLabel
insertLabel
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
remove
None
nothing
Deletes the object.
showDestination
None
nothing
Go to hyperlink destination
730
JavaScript Reference
InDesign CS Scripting Guide
hyperlinkTextDestinations Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of hyperlinktextDestinations
Methods Method: add
Parameters: Name:
Type:
Description:
destination
text
he destination text.
Return:
Description:
hyperlinkTextDestination
Create a new hyperlink text destination.
anyItem
None
object
Returns any hyperlinktextDestination.
firstItem
None
object
Returns the first hyperlinktextDestination.
object
Returns the hyperlinktextDestination with the specified ID.
objects
Returns the hyperlinktextDestinations within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
hyperlinkTextDestination object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkTextDestination at the start of the range.
to
hyperlinkTextDestination object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkTextDestination at the end of the range.
lastItem
None
object
Returns the last hyperlinktextDestination.
middleItem
None
object
Returns the middle hyperlinktextDestination.
object
Returns the next hyperlinktextDestination.
object
Returns the previous hyperlinktextDestination.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he hyperlinktextDestination before the one desired.
Name:
Type:
Description:
obj
object
he hyperlinktextDestination ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 731
hyperlinkTextSource Properties Property:
Type:
Access:
Description:
hidden
boolean
read only
If true, the hyperlink text source will be hidden in the exported version of the document.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the hyperlinktextSource within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the hyperlink text source.
parent
document
read only
he parent of the object.
sourceText
text
read/write
he text in which this hyperlink text source is located.
Methods Method: extractLabel
insertLabel
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
remove
None
nothing
Deletes the object.
showSource
None
nothing
Go to hyperlink source
732
JavaScript Reference
InDesign CS Scripting Guide
hyperlinkTextSources Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of hyperlinktextSources
Methods Method: add
Parameters: Name:
Type:
Description:
source
text
he source text.
Return:
Description:
hyperlinkTextSource
Create a new hyperlink text source.
anyItem
None
object
Returns any hyperlinktextSource.
firstItem
None
object
Returns the first hyperlinktextSource.
object
Returns the hyperlinktextSource with the specified ID.
objects
Returns the hyperlinktextSources within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
hyperlinkTextSource object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkTextSource at the start of the range.
to
hyperlinkTextSource object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkTextSource at the end of the range.
lastItem
None
object
Returns the last hyperlinktextSource.
middleItem
None
object
Returns the middle hyperlinktextSource.
object
Returns the next hyperlinktextSource.
object
Returns the previous hyperlinktextSource.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he hyperlinktextSource before the one desired.
Name:
Type:
Description:
obj
object
he hyperlinktextSource ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 733
hyperlinkURLDestination Properties Property:
Type:
Access:
Description:
destinationurl
string
read/write
he URL this destination points to
hidden
boolean
read only
Is this object hidden in the UI
id
integer
read only
he hyperlinkURLDestination’s unique id
index
integer
read only
index of the hyperlinkURLDestination within its parent document
label
string
read/write
A label that can be set to any string
name
string
read/write
he name of the hyperlinkURLDestination
parent
document
read only
he hyperlinkURLDestination’s parent
Methods Method: extractLabel
insertLabel
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
remove
None
nothing
Deletes the object.
showDestination
None
nothing
Go to hyperlink destination
734
JavaScript Reference
InDesign CS Scripting Guide
hyperlinkURLDestinations Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of hyperlinkURLDestinations
Methods Method: add
Parameters:
Return:
Name:
Type:
Description:
[destination]
string
he destination URL.
Description:
hyperlinkURL- Create a new hyperlinkURLDestination Destination.
anyItem
None
hyperlinkURL- Returns any hyperlinkURLDestination Destination.
firstItem
None
hyperlinkURL- Returns the first hyperlinkURLDestination Destination.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
hyperlinkURLDestination object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkURLDestination at the start of the range.
to
hyperlinkURLDestination object, number (index of the object in its containing object), or string (name of the object)
he hyperlinkURLDestination at the end of the range.
hyperlinkURL- Returns the hyperlinkURLDestination Destination with the specified ID. hyperlinkURL- Returns the hyperlinkURLDestinations Destination within the specified range.
lastItem
None
hyperlinkURL- Returns the last hyperDestination linkURLDestination.
middleItem
None
hyperlinkURL- Returns the middle hyperDestination linkURLDestination.
nextItem
previousItem
Name:
Type:
Description:
obj
hyperlinkURLDestination
he hyperlinkURLDestination before the one desired.
Name:
Type:
Description:
obj
hyperlinkURLDestination
he hyperlinkURLDestination ater the one desired.
hyperlinkURL- Returns the next hyperDestination linkURLDestination.
hyperlinkURL- Returns the previous hyperDestination linkURLDestination.
InDesign CS Scripting Guide JavaScript Reference 735
hyphenationException Properties Property:
Type:
Access:
Description:
addedExceptions
array of strings
read/write
Hyphenation exceptions in the document.
index
integer
read only
index of the hyphenation exception within its parent document
name
string
read only
he name of the object.
parent
document
read only
he parent of the object.
removedExceptions
array of strings
read/write
Excluded words in the document.
Methods Method: addException
removeException
736
Parameters: Name:
Type:
Description:
addedExceptions
array of strings
he list of exceptions to add to the document.
[removedList]
boolean
If true, modify the ‘removed exceptions’ list, the ‘added exceptions’ list is modified by default.
Name:
Type:
Description:
removedExceptions
array of strings
he list of exceptions to remove from document.
[removedList]
boolean
If true, modify the ‘removed exceptions’ list, the ‘added exceptions’ list is modified by default.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Add an exception to the document.
nothing
Remove an exception from the document.
hyphenationExceptions Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of hyphenation exceptions
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any hyphenation exception.
firstItem
None
object
Returns the first hyphenation exception.
objects
Returns the hyphenation exceptions within the specified range.
itemByRange
Name:
Type:
Description:
from
hyphenationException object, number (index of the object in its containing object), or string (name of the object)
he hyphenationException at the start of the range.
to
hyphenationException object, number (index of the object in its containing object), or string (name of the object)
he hyphenationException at the end of the range.
lastItem
None
object
Returns the last hyphenation exception.
middleItem
None
object
Returns the middle hyphenation exception.
object
Returns the next hyphenation exception.
object
Returns the previous hyphenation exception.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he hyphenation exception before the one desired.
Name:
Type:
Description:
obj
object
he hyphenation exception ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 737
image Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item.
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item.
absoluteVerticalScale
number
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
actualPpi
Array of numbers as [horizontal ppi, vertical ppi]
read only
he resolution of the native graphic file.
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
blendMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
clippingPath
clippingPathSettings
read only
he clipping path settings
effectivePpi
Array of numbers as [horizontal ppi, vertical ppi]
read only
he resolution of the graphic ater it has been resized.
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
featherCornerType
featherMode
Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
featherWidth
number
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
738
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
fillTint
number
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
imageIOPreferences
imageIOPreferences
read only
Image IO preferences.
read/write
he rendering intent applied to the image
imageRenderingIntent
Name:
Decimal:
RenderingIntent.useColorSettings
1380541299
RenderingIntent.perceptual
1380544611
RenderingIntent.saturation
1380545377
RenderingIntent.relativeColorimetric
1380545123
RenderingIntent.absoluteColorimetric
1380540771
imageTypeName
string
read only
he type of image
index
integer
read only
index of the image within its parent XML element, sound, movie, pageItem, oval, rectangle, polygon, graphicline, state, group or button
isolateBlending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
itemLink
link
read only
link to a placed file
knockoutGroup
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he display setting for this page item.
localDisplaySetting
Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
nonprinting
boolean
read/write
Whether the page item is non-printing
opacity
number
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
overprintFill
boolean
read/write
If true, the fill of the page item will overprint.
parent
object
read only
he parent of the page item.
profile
string
read/write
he color profile to use. Either one the idProfile enumerations or a profile name
profileList
Array of strings
read only
he list of available RGB profiles
rotationAngle
number
read/write
he rotation angle of the page item.
InDesign CS Scripting Guide JavaScript Reference 739
Property: shadowBlendMode
Type: Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Access:
Description:
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadowBlurRadius
number
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadowColor
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadowxOffset
number
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadowyOffset
number
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shearAngle
number
read/write
he shear angle applied to the page item.
space
string
read only
he color space
textWrapPreferences
textWrapPreference
read only
he text wrap applied to the page item.
verticalScale
number
read/write
he vertical scaling percentage of the page item.
740
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
insertLabel
markup
move
Return:
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Markup layout content with XML preserving the existing content.
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
InDesign CS Scripting Guide JavaScript Reference 741
Method: place
placeXML
remove
742
Parameters: Name:
Type:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
None
JavaScript Reference
InDesign CS Scripting Guide
Description:
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
nothing
Deletes the object.
Method: resize
Parameters: Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Return:
Description:
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
InDesign CS Scripting Guide JavaScript Reference 743
Method: rotate
744
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Rotate the page item.
Method: shear
store
unlink
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
InDesign CS Scripting Guide JavaScript Reference 745
imageIOPreference Properties Property:
Type:
Access:
Description:
allowAutoEmbedding
boolean
read/write
If true, allow auto embedding.
alphaChannelName
string
read/write
Alpha channel name.
createClippingFrame
boolean
read/write
If true, create a clipping frame.
parent
object
read only
he imageIOPreference’s parent as application or image.
previewResolution
integer
read only
Preview resolution.
746
JavaScript Reference
InDesign CS Scripting Guide
images Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of images
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any image.
firstItem
None
object
Returns the first image.
object
Returns the image with the specified ID.
objects
Returns the images within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
image object or number (index of the object in its containing object)
he image at the start of the range.
to
image object or number (index of the object in its containing object)
he image at the end of the range.
lastItem
None
object
Returns the last image.
middleItem
None
object
Returns the middle image.
object
Returns the next image.
object
Returns the previous image.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he image before the one desired.
Name:
Type:
Description:
obj
object
he image ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 747
imePreference Properties Property:
Type:
Access:
Description:
inlineInput
boolean
read/write
Toggles inline and the bottom window text input methods
parent
application
read only
he ime preference’s parent
748
JavaScript Reference
InDesign CS Scripting Guide
index Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the index within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the XML tag
parent
document
read only
he parent of the object.
topics
topics
read only
All index topics
Methods Method: capitalize
Parameters: Name: [capitalization Option]
extractLabel
generate
importTopics
insertLabel
Type:
Description:
Name:
Decimal:
IndexCapitalizationOptions.selectedEntry
1398042725
IndexCapitalization Options.IncludeSubentries
1767072325
IndexCapitalizationOptions.allLevel1Entries
1095517556
IndexCapitalizationOptions.allEntries
1097624645
Return:
Description:
nothing
Applies capitalization options to the index entries.
string
Gets the label value associated with the given key (label name).
objects
Generate a new index story.
nothing
Imports a list of topics.
nothing
Sets the string associated with the given key (label name).
What to capitalize.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
[on]
object
he spread or page on which to place the index story.
[placePoint]
Array of numbers or measurement strings as [x, y]
he location at which to place the index story.
[destinationLayer]
layer object or layer name as string
he layer on which to place the index story.
[autoflowing]
boolean
If true, autoflow the placed index story.
[includeOverset]
boolean
If true, include index in overset.
Name:
Type:
Description:
from
string
he file to import topics from.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
InDesign CS Scripting Guide JavaScript Reference 749
Method:
Parameters:
Return:
Description:
removeUnusedTopics
None
nothing
Removes all unused index entries
update
None
nothing
Update the page numbers in the index
750
JavaScript Reference
InDesign CS Scripting Guide
indexes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of indexes
Methods Method:
Parameters:
Return:
add
None
index
Create a new index.
anyItem
None
object
Returns any index.
firstItem
None
object
Returns the first index.
object
Returns the index with the specified ID.
objects
Returns the indexes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
index object, number (index of the object in its containing object), or string (name of the object)
he index at the start of the range.
to
index object, number (index of the object in its containing object), or string (name of the object)
he index at the end of the range.
Description:
lastItem
None
object
Returns the last index.
middleItem
None
object
Returns the middle index.
object
Returns the next index.
object
Returns the previous index.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he index before the one desired.
Name:
Type:
Description:
obj
object
he index ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 751
indexOptions Properties Property:
Type:
Access:
Description:
beforeCrossReferenceSeparator
string
read/write
he string following each index topic.
betweenEntriesSeparator
string
read/write
he string between each index entry.
betweenPageNumbersSeparator
string
read/write
he string between page numbers or page ranges.
crossReferenceStyle
characterStyle
read/write
he style to apply to cross references.
crossReferenceTopicStyle
characterStyle
read/write
he style to apply to cross reference topics.
entryEndSeparator
string
read/write
he string to insert at the end of each index entry.
followingTopicSeparator
string
read/write
he string following each index topic.
includeBookDocuments
boolean
read/write
If true, include all documents of a book publication.
includeEmptyIndexSections
boolean
read/write
If true, and if include index section headings is true, include headings for empty index sections.
includeHiddenEntries
boolean
read/write
If true, include text on hidden layers.
includeSectionHeadings
boolean
read/write
If true, include index section headings (“A,” “B,” etc.).
read/write
he index format to use in the generated index.
indexFormat
Name:
Decimal:
IndexFormat.runinFormat
1382631782
IndexFormat.nestedFormat
1316243814
level1Style
paragraphStyle
read/write
he style to apply to level 1 topics of each page reference
level2Style
paragraphStyle
read/write
he style to apply to level 2 topics of each page reference
level3Style
paragraphStyle
read/write
he style to apply to level 3 topics of each page reference
level4Style
paragraphStyle
read/write
he style to apply to level 4 topics of each page reference
pageNumberStyle
characterStyle
read/write
he character style to apply to page numbers.
pageRangeSeparator
string
read/write
he string entered between page numbers to indicate a page range.
parent
object
read only
he parent of the object.
replaceExistingIndex
boolean
read/write
If true, replace the existing index instance.
sectionHeadingStyle
paragraphStyle
read/write
he paragraph style to apply to index section headings.
title
string
read/write
he title of the generated index.
titleStyle
paragraphStyle object or paragraph style name as string
read/write
he paragraph style to apply to the index title.
752
JavaScript Reference
InDesign CS Scripting Guide
ink Properties Property:
Type:
Access:
Description:
aliasInkName
string
read/write
he name of the alias ink.
angle
number
read/write
he screen angle at which to print the ink.
convertToProcess
boolean
read/write
If true, convert a spot ink to a process color simulation.
frequency
number
read/write
he haltone screen frequency at which to print the ink.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the ink within its parent application or document
read/write
he type of the ink.
inkType
Name:
Decimal:
InkTypes.normal
1852797549
InkTypes.opaque
1769230192
InkTypes.transparent
1769231474
InkTypes.opaqueIgnore
1769228647
isProcessInk
boolean
read only
If true, the ink is a process ink.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the ink.
neutralDensity
number
read/write
he neutral density of the ink. his value represents the relative darkness and/or opacity of the ink, and is used by the trapping system. ink neutral densities range from XXX (lightest/least opaque) to XXX (darkest/most opaque).
parent
object
read only
he parent of the object.
printInk
boolean
read/write
If true, print the ink.
solidity
number
read only
he solidity value of the ink.
trapOrder
integer
read/write
he trapping order of the ink.
Methods Method: extractLabel
insertLabel
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
InDesign CS Scripting Guide JavaScript Reference 753
inks Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of inks
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any ink.
firstItem
None
object
Returns the first ink.
object
Returns the ink with the specified ID.
objects
Returns the inks within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
image object or number (index of the object in its containing object)
he image at the start of the range.
to
image object or number (index of the object in its containing object)
he image at the end of the range.
lastItem
None
object
Returns the last ink.
middleItem
None
object
Returns the middle ink.
object
Returns the next ink.
object
Returns the previous ink.
nextItem
previousItem
754
Name:
Type:
Description:
obj
object
he ink before the one desired.
Name:
Type:
Description:
obj
object
he ink ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
insertionPoint Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
ascent
measurement string or number
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associatedXMLElements
objects
read only
Returns the associated XML elements
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
measurement string or number
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
buttons
buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
characters
capitalization
characters
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
characters
InDesign CS Scripting Guide JavaScript Reference 755
Property:
Type:
Access:
Description:
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
measurement string or number
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradientStrokeAngle
number
read/write
he angle of the gradient applied to the stroke of the text.
gradientStrokeLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
756
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
graphicLines
graphicLines
read only
All graphic lines
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
groups
groups
read only
groups
horizontalOffset
measurement string or number
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
index
integer
read only
index of the object within its parent object.
insertionPoints
insertionPoints
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
InDesign CS Scripting Guide JavaScript Reference 757
Property:
Type:
Access:
Description:
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
lines
lines
read only
lines
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
openTypeFeatures
array of integers
read/write
open type features as Array of integers
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
758
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
parentStory
story
read only
he story containing the text object.
parentTextFrame
textFrame
read only
he text frame containing the text object.
pointSize
number
read/write
he size of the text in points.
polygons
polygons
read only
All polygons
position
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
otfFigureStyle
otfFraction
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
rectangles
rectangles
read only
All rectangles
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
InDesign CS Scripting Guide JavaScript Reference 759
Property:
Type:
Access:
Description:
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
ruleBelowWidth
singleWordJustification
760
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tables
tables
read only
All tables
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
InDesign CS Scripting Guide JavaScript Reference 761
Property:
Type:
Access:
Description:
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
words
words
read only
words
Methods Method: applyStyle
changecase
Parameters: Name:
Type:
Description:
using
style object or style name as string
he paragraph style or character style to apply.
[clearingOverrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
762
JavaScript Reference
Name:
Decimal:
ChangecaseMode. uppercase
1667462499
ChangecaseMode. lowercase
1667460195
ChangecaseMode. titlecase
1667462243
ChangecaseMode. sentencecase
1667461987
InDesign CS Scripting Guide
Case option to use.
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
Method: convertToTable
createOutlines
exportFile
Parameters: Name:
Type:
Description:
[columnSeparator]
string or specialCharacter constant
he character to interpret as the column separator.
[rowSeparator]
string or specialCharacter constant
he character to interpret as the row separator.
[numberOfColumns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original text.
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
markup
Return:
Description:
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
using
xmlElement
he XML element to associate with the text.
InDesign CS Scripting Guide JavaScript Reference 763
Method: move
Parameters: Name:
Type:
to
place
remove
764
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
JavaScript Reference
InDesign CS Scripting Guide
Description:
nothing
Moves the text.
object
Place a file.
nothing
Deletes the object.
Where to move the text, relative to the reference object (before/ater).
[reference]
None
Return:
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects text.
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 765
insertionPoints Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of insertion points
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any insertion point.
firstItem
None
object
Returns the first insertion point.
objects
Returns the insertion points within the specified range.
itemByRange
Name:
Type:
Description:
from
insertionPoint object or number (index of the object in its containing object)
he insertionPoint at the start of the range.
to
insertionPoint object or number (index of the object in its containing object)
he insertionPoint at the end of the range.
lastItem
None
object
Returns the last insertion point.
middleItem
None
object
Returns the middle insertion point.
object
Returns the next insertion point.
object
Returns the previous insertion point.
nextItem
previousItem
766
Name:
Type:
Description:
obj
object
he insertion point before the one desired.
Name:
Type:
Description:
obj
object
he insertion point ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
integerCombobox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
editValue
number
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the integer combobox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
stringList
array of strings
read/write
A list of the strings that appear on the menu of the control.
InDesign CS Scripting Guide JavaScript Reference 767
integerComboboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of integer comboboxes
Methods Method:
Parameters:
Return:
Description:
add
None
integerCombobox
Create a new integer combobox.
anyItem
None
object
Returns any integer combobox.
firstItem
None
object
Returns the first integer combobox.
object
Returns the integer combobox with the specified ID.
objects
Returns the integer comboboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
integerCombobox object or number (index of the object in its containing object)
he integerCombobox at the start of the range.
to
integerCombobox object or number (index of the object in its containing object)
he integerCombobox at the end of the range.
lastItem
None
object
Returns the last integer combobox.
middleItem
None
object
Returns the middle integer combobox.
object
Returns the next integer combobox.
object
Returns the previous integer combobox.
nextItem
previousItem
768
Name:
Type:
Description:
obj
object
he integer combobox before the one desired.
Name:
Type:
Description:
obj
object
he integer combobox ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
integerEditbox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
editValue
number
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the integer editbox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
InDesign CS Scripting Guide JavaScript Reference 769
integerEditboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of integer editboxes
Methods Method:
Parameters:
Return:
Description:
add
None
integerEditbox
Create a new integer editbox.
anyItem
None
object
Returns any integer editbox.
firstItem
None
object
Returns the first integer editbox.
object
Returns the integer editbox with the specified ID.
objects
Returns the integer editboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
integerEditbox object or number (index of the object in its containing object)
he integerEditbox at the start of the range.
to
integerEditbox object or number (index of the object in its containing object)
he integerEditbox at the end of the range.
lastItem
None
object
Returns the last integer editbox.
middleItem
None
object
Returns the middle integer editbox.
object
Returns the next integer editbox.
object
Returns the previous integer editbox.
nextItem
previousItem
770
Name:
Type:
Description:
obj
object
he integer editbox before the one desired.
Name:
Type:
Description:
obj
object
he integer editbox ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
jpegExportPreference Properties Property:
Type:
Access:
Description:
exportingSelection
boolean
read/write
Whether selection is being exported in the JPEG
exportingSpread
boolean
read/write
Whether full spread is being exported in the JPEG
read/write
Specifies the compression quality of output JPEG file
read/write
Rendering style
jpegQuality
jpegRenderingStyle
Name:
Decimal:
JPEGOptionsQuality.low
1701727351
JPEGOptionsQuality.medium
1701727588
JPEGOptionsQuality.high
1701726313
JPEGOptionsQuality.maximum
1701727608
Name:
Decimal:
JPEGOptionsFormat.baselineEncoding
1785751394
JPEGOptionsFormat.progressiveEncoding
1785751408
pageString
string
read/write
page number if not exporting selection
parent
application
read only
he jpeg export preference’s parent
InDesign CS Scripting Guide JavaScript Reference 771
language Properties Property:
Type:
Access:
Description:
doubleQuotes
string
read/write
number quotes pair for the language.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the language within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the language.
parent
document
read only
he parent of the object.
singleQuotes
string
read/write
Single quotes pair for the language.
Methods Method: extractLabel
insertLabel
772
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
languages Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of languages
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any language.
firstItem
None
object
Returns the first language.
object
Returns the language with the specified ID.
objects
Returns the languages within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
language object, number (index of the object in its containing object), or string (name of the object)
he language at the start of the range.
to
language object, number (index of the object in its containing object), or string (name of the object)
he language at the end of the range.
lastItem
None
object
Returns the last language.
middleItem
None
object
Returns the middle language.
object
Returns the next language.
object
Returns the previous language.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he language before the one desired.
Name:
Type:
Description:
obj
object
he language ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 773
languagesWithVendors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of languagesWithVendors
Methods Method:
Parameters:
Return:
Description:
anyItem
None
languageWithVendors
Returns any languageWithVendors.
firstItem
None
languageWithVendors
Returns the first languageWithVendors.
languageWithVendors
Returns the languageWithVendors with the specified ID.
languagesWithVendors
Returns the languagesWithVendors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
languageWithVendors object or number (index of the object in its containing object)
he languageWithVendors at the start of the range.
to
languageWithVendors object or number (index of the object in its containing object)
he languageWithVendors at the end of the range.
lastItem
None
languageWithVendors
Returns the last languageWithVendors.
middleItem
None
languageWithVendors
Returns the middle languageWithVendors.
languageWithVendors
Returns the next languageWithVendors.
languageWithVendors
Returns the previous languageWithVendors.
nextItem
previousItem
774
Name:
Type:
Description:
obj
languageWithVendors
he languageWithVendors before the one desired.
Name:
Type:
Description:
obj
languageWithVendors
he languageWithVendors ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
languageWithVendors Properties Property:
Type:
Access:
Description:
doubleQuotes
string
read/write
number quotes pair for the language with vendors.
hyphenationVendor
string
read/write
Hyphenation vendor of the language.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the languageWithVendors within its parent application
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the language with vendors.
parent
application
read only
he parent of the object.
singleQuotes
string
read/write
Single quotes pair for the language with vendors.
spellingVendor
string
read/write
Spelling vendor of the language.
thesaurusVendor
string
read/write
hesaurus vendor of the language.
Methods Method: extractLabel
insertLabel
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
InDesign CS Scripting Guide JavaScript Reference 775
layer Properties Property:
Type:
Access:
Description:
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items in the layer, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
buttons
buttons
read only
Every button
formFields
formFields
read only
Every form field item
graphicLines
graphicLines
read only
All graphic lines
groups
groups
read only
groups
guides
guides
read only
Every guide
id
integer
read only
A unique number identifying the object.
ignoreWrap
boolean
read/write
If true, the text wrap on any items on this layer will be ignored when the layer is hidden.
index
integer
read only
index of the layer within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
layerColor
swatch object or swatch name as string
read/write
he layer highlight color.
locked
boolean
read/write
If true, the layer is locked.
lockGuides
boolean
read/write
If true, lock the guides on the layer.
name
string
read/write
he name of the layer.
ovals
ovals
read only
All ovals
pageItems
pageItems
read only
All page items
parent
document
read only
he parent of the layer.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
showGuides
boolean
read/write
If true, display the guides on this layer.
textFrames
textFrames
read only
text Frames
visible
boolean
read/write
If true, the layer is visible.
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
layer
Merge with another layer.
extractLabel
insertLabel
merge
776
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
hey layer(s) with which to merge.
JavaScript Reference
InDesign CS Scripting Guide
Method: move
Parameters: Name: to
[reference] remove
None
Type: Name:
Description: Decimal:
LocationOptions.before
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions. atBeginning
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
layer
Move the layer before/ater another layer, or to beginning/end.
nothing
Deletes the object.
location.
Before/ater this layer.
InDesign CS Scripting Guide JavaScript Reference 777
layers Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of layers
Methods Method:
Parameters:
Return:
Description:
add
None
layer
Create a new layer.
anyItem
None
object
Returns any layer.
firstItem
None
object
Returns the first layer.
object
Returns the layer with the specified ID.
objects
Returns the layers within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
layer object, number (index of the object in its containing object), or string (name of the object)
he layer at the start of the range.
to
layer object, number (index of the object in its containing object), or string (name of the object)
he layer at the end of the range.
lastItem
None
object
Returns the last layer.
middleItem
None
object
Returns the middle layer.
object
Returns the next layer.
object
Returns the previous layer.
nextItem
previousItem
778
Name:
Type:
Description:
obj
object
he layer before the one desired.
Name:
Type:
Description:
obj
object
he layer ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
layoutAdjustmentPreference Properties Property:
Type:
Access:
Description:
allowGraphicsToResize
boolean
read/write
If true, allow graphics to resize in response to layout changes.
allowRulerGuidesToMove
boolean
read/write
If true, allow ruler guides to move to adjust to layout changes.
enableLayoutAdjustment
boolean
read/write
If true, enable layout adjustment. When layout adjustment is active, objects and guides can change position when page margins change, or when page size or page orientation changes.
ignoreObjectOrLayerLocks
boolean
read/write
If true, ignore object or layer locks when adjusting the layout.
ignoreRulerGuideAlignments
boolean
read/write
If true, ignore ruler guide alignments when adjusting layout.
parent
object
read only
he parent of the object.
snapZone
number
read/write
he range (distance, in current measurement units) within which an object snaps to a guide or margin during layout adjustment.
InDesign CS Scripting Guide JavaScript Reference 779
layoutWindow Properties Property:
Type:
Access:
Description:
activeLayer
layer
read/write
he active layer
activePage
page
read/write
he active page
activeSpread
spread
read/write
he active spread
bounds
array of numbers or measurement strings as [y1, x1, y2, x2]
read/write
he bounds of the layout window, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
index
integer
read only
index of the layout window within its parent document or application
name
string
read only
he name of the layout window
overprintPreview
boolean
read/write
If true, display a simulation of overprinting
parent
object
read only
he layout window’s parent as document or application
proofingProfile
string
read/write
he profile used for proofing
read/write
he method of proofing
proofingType
Name:
Decimal:
ProofingType.proofOff
1347710822
ProofingType.documentCMYK
1347708003
ProofingType.workingCMYK
1347712867
ProofingType.custom
1131639917
selection
array of objects
read/write
he selection of the front-most window as Object, Array of objects or idNothingEnum
simulateInkBlack
boolean
read/write
Determine whether to adjust for the black point
simulatePaperWhite
boolean
read/write
Determine whether to adjust for white point
transformReferencePoint
array of numbers or measurement strings as [x, y], or one of the following constants
read/write
he default anchor point to transform objects around.
read/write
he local Display Performance settings for this view
read/write
he current zoom
viewDisplaySetting
zoomPercentage
780
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.topCenterAnchor
1095660643
AnchorPoint.topLetAnchor
1095660652
AnchorPoint.topRightAnchor
1095660658
Name:
Decimal:
ViewDisplaySettings.highQuality
1346922866
ViewDisplaySettings.typical
1349810544
ViewDisplaySettings.optimized
1349480564
number
JavaScript Reference
InDesign CS Scripting Guide
Methods Method:
Parameters:
Return:
Description:
bringToFront
None
nothing
Brings the object to the top
close
None
nothing
Close the layout window
maximize
None
nothing
Maximize the window
minimize
None
nothing
Minimize the window
restore
None
nothing
Restore the window
nothing
Select one or more objects.
nothing
Zoom the window.
select
Name:
Type:
Description:
selectableItems
array of objects
he object(s) to select as Object, Array of objects or idNothingEnum.
[existingSelection]
zoom
Name: given
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Type: Name:
How to handle the existing selection.
Description: Decimal:
ZoomOptions.zoomIn
2053990766
ZoomOptions.zoomOut
2054124916
ZoomOptions.fitSpread
2053534835
ZoomOptions.fitPage
2053534832
ZoomOptions. showPasteboard
2054385762
ZoomOptions. actualSize
2053206906
Zoom size.
InDesign CS Scripting Guide JavaScript Reference 781
layoutWindows Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of layout windows
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any layout window.
firstItem
None
object
Returns the first layout window.
objects
Returns the layout windows within the specified range.
itemByRange
Name:
Type:
Description:
from
layoutWindow object, number (index of the object in its containing object), or string (name of the object)
he layoutWindow at the start of the range.
to
layoutWindow object, number (index of the object in its containing object), or string (name of the object)
he layoutWindow at the end of the range.
lastItem
None
object
Returns the last layout window.
middleItem
None
object
Returns the middle layout window.
object
Returns the next layout window.
object
Returns the previous layout window.
nextItem
previousItem
782
Name:
Type:
Description:
obj
object
he layout window before the one desired.
Name:
Type:
Description:
obj
object
he layout window ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
libraries Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of libraries
Methods Method: add
Parameters: Name:
Type:
Description:
fullName
string
he path and file name.
Return:
Description:
library
Create a new libary.
anyItem
None
object
Returns any library.
firstItem
None
object
Returns the first library.
objects
Returns the libraries within the specified range.
itemByRange
Name:
Type:
Description:
from
library object, number (index of the object in its containing object), or string (name of the object)
he library at the start of the range.
to
library object, number (index of the object in its containing object), or string (name of the object)
he library at the end of the range.
lastItem
None
object
Returns the last library.
middleItem
None
object
Returns the middle library.
object
Returns the next library.
object
Returns the previous library.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he library before the one desired.
Name:
Type:
Description:
obj
object
he library ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 783
library Properties Property:
Type:
Access:
Description:
assets
assets
read only
Every library asset
filePath
string
read only
he file path to the folder containing the library file (does not include the file name).
fullName
string
read only
he file path to the library file, including the file name.
index
integer
read only
index of the library within its parent application
name
string
read only
he name of the library file.
parent
application
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
close
None
nothing
Close the library
asset
Store page item(s) in a library.
store
784
Name:
Type:
Description:
using
style object or style name as string
he page item(s) to store.
JavaScript Reference
InDesign CS Scripting Guide
line Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
ascent
measurement string or number
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associatedXMLElements
objects
read only
Returns the associated XML elements
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
measurement string or number
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
buttons
buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
characters
capitalization
characters
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
characters
InDesign CS Scripting Guide JavaScript Reference 785
Property:
Type:
Access:
Description:
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
measurement string or number
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradientStrokeAngle
number
read/write
he angle of the gradient applied to the stroke of the text.
gradientStrokeLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
786
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
graphicLines
graphicLines
read only
All graphic lines
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
groups
groups
read only
groups
horizontalOffset
measurement string or number
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
index
integer
read only
index of the object within its parent object.
insertionPoints
insertionPoints
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
InDesign CS Scripting Guide JavaScript Reference 787
Property:
Type:
Access:
Description:
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
lines
lines
read only
lines
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
openTypeFeatures
array of integers
read/write
open type features as Array of integers
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
788
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
parentStory
story
read only
he story containing the text object.
parentTextFrame
textFrame
read only
he text frame containing the text object.
pointSize
number
read/write
he size of the text in points.
polygons
polygons
read only
All polygons
position
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
otfFigureStyle
otfFraction
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
rectangles
rectangles
read only
All rectangles
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
InDesign CS Scripting Guide JavaScript Reference 789
Property:
Type:
Access:
Description:
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
ruleBelowWidth
singleWordJustification
790
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tables
tables
read only
All tables
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
InDesign CS Scripting Guide JavaScript Reference 791
Property:
Type:
Access:
Description:
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
words
words
read only
words
Methods Method: applyStyle
changecase
Parameters: Name:
Type:
Description:
using
style object or style name as string
he paragraph style or character style to apply.
[clearingOverrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
792
JavaScript Reference
Name:
Decimal:
ChangecaseMode. uppercase
1667462499
ChangecaseMode. lowercase
1667460195
ChangecaseMode. titlecase
1667462243
ChangecaseMode. sentencecase
1667461987
InDesign CS Scripting Guide
Case option to use.
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
Method: convertToTable
createOutlines
exportFile
Parameters: Name:
Type:
Description:
[columnSeparator]
string or specialCharacter constant
he character to interpret as the column separator.
[rowSeparator]
string or specialCharacter constant
he character to interpret as the row separator.
[numberOfColumns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original text.
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
markup
Return:
Description:
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
using
xmlElement
he XML element to associate with the text.
InDesign CS Scripting Guide JavaScript Reference 793
Method: move
Parameters: Name:
Type:
to
place
remove
794
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
JavaScript Reference
InDesign CS Scripting Guide
Description:
nothing
Moves the text.
object
Place a file.
nothing
Deletes the object.
Where to move the text, relative to the reference object (before/ater).
[reference]
None
Return:
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects text.
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 795
lines Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of lines
Methods Method:
Parameters:
Return:
Description:
anyItem
None
line
Returns any line.
firstItem
None
line
Returns the first line.
lines
Returns the lines within the specified range.
itemByRange
Name:
Type:
Description:
from
line or number (index of the object in its containing object)
he line at the start of the range.
to
line or number (index of the object in its containing object)
he line at the end of the range.
lastItem
None
line
Returns the last line.
middleItem
None
line
Returns the middle line.
line
Returns the next line.
line
Returns the previous line.
nextItem
previousItem
796
Name:
Type:
Description:
obj
line
he line before the one desired.
Name:
Type:
Description:
obj
line
he line ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
link Properties Property:
Type:
Access:
Description:
assetEtag
string
read only
he asset etag of the link.
assetid
Array of integers or strings
read only
he asset ID of the link.
asseturl
string
read only
he asset URL of the link
date
date
read only
he date and time the link was created.
edited
boolean
read only
If true, the link file has been modified since it was last updated.
filePath
string
read only
he file path to the folder containing the link file (does not include the file name).
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the link within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
linkType
string
read only
he type of the link.
name
string
read only
he name of the link file.
needed
boolean
read only
If true, the link is needed for printing or export.
parent
document
read only
he parent of the object.
size
integer
read only
he size of the link file on disk.
read only
he status of the link.
status
Name:
Decimal:
LinkStatus.normal
1852797549
LinkStatus.linkOutOfDate
1819242340
LinkStatus.linkMissing
1819109747
LinkStatus.linkEmbedded
1282237028
Methods Method:
Parameters:
Return:
editOriginal
None
nothing
Edit original
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Set the link.
nothing
Show link
nothing
Unembed data and link to new file or link to original.
extractLabel
insertLabel
relink
show unembed
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
to
string
to.
None Name:
Type:
Description:
[to]
Folder object or string
Folder where new files are created.
Description:
unlink
None
nothing
Unlink text or embed images
update
None
link
Update link.
InDesign CS Scripting Guide JavaScript Reference 797
links Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of links
Methods Method:
Parameters:
Return:
Description:
anyItem
None
link
Returns any link.
firstItem
None
link
Returns the first link.
link
Returns the link with the specified ID.
links
Returns the links within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
link or number (index of the object in its containing object)
he link at the start of the range.
to
link or number (index of the object in its containing object)
he link at the end of the range.
lastItem
None
link
Returns the last link.
middleItem
None
link
Returns the middle link.
link
Returns the next link.
link
Returns the previous link.
nextItem
previousItem
798
Name:
Type:
Description:
obj
link
he link before the one desired.
Name:
Type:
Description:
obj
link
he link ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
marginPreference Properties Property:
Type:
Access:
Description:
bottom
measurement string or number
read/write
he height of the bottom margin.
columnCount
integer
read/write
he number of column guides on the page. Note that these column guides have no effect on the number of columns in a single text frame.
columnGutter
measurement string or number
read/write
he distance between columns on the page.
let
measurement string or number
read/write
he width of the let margin.
parent
object
read only
he parent of the object.
right
measurement string or number
read/write
he width of the right margin.
top
measurement string or number
read/write
he height of the top margin.
InDesign CS Scripting Guide JavaScript Reference 799
masterSpread Properties Property:
Type:
Access:
Description:
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items on the master spread, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
appliedMaster
masterSpread object or master spread name as string
read/write
he master spread applied to this master spread (if any).
baseName
string
read/write
he base name of the master spread.
buttons
buttons
read only
Every button
formFields
formFields
read only
Every form field item
graphicLines
graphicLines
read only
All graphic lines
groups
groups
read only
groups
guides
guides
read only
Every guide
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the master spread within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read only
he name of the master spread.
namePrefix
string
read/write
he name prefix of the master spread.
ovals
ovals
read only
All ovals
pageItems
pageItems
read only
All page items
pages
pages
read only
Every page
parent
document
read only
he parent of the object.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
showMasterItems
boolean
read/write
If true, show page items from the master spread applied to this master spread (if any).
textFrames
textFrames
read only
text Frames
800
JavaScript Reference
InDesign CS Scripting Guide
Methods Method: createGuides
duplicate extractLabel
insertLabel
Parameters: Name:
Type:
Description:
[numberOfRows]
integer
Number of rows of guides on a page.
[numberOfColumns]
integer
Number of columns of guides on a page.
[rowGutter]
measurement string or number
he height of the gutter between rows.
[columnGutter]
measurement string or number
he width of the gutter between columns.
[guideColor]
uiColor constant or array of numbers as [r, g, b]
he guide color.
[fitMargins]
boolean
Whether the guides should fit to margins or fit to page.
[removeExisting]
boolean
If true, remove existing guides.
[layer]
layer object or layer name as string
he layer on which to create the master spread as layer.
None Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Return:
Description:
nothing
Create multiple guides on all pages of a spread.
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
InDesign CS Scripting Guide JavaScript Reference 801
Method: place
remove
802
Parameters: Name:
Type:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
None
JavaScript Reference
InDesign CS Scripting Guide
Description:
Return:
Description:
object
Place a file.
nothing
Deletes the object.
masterSpreads Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of master spreads
Methods Method: add
Parameters: Name:
Type:
Description:
[pagesPerSpread]
integer
Number of pages of the master spread.
Return:
Description:
masterSpread
Create a new master spread.
anyItem
None
object
Returns any master spread.
firstItem
None
object
Returns the first master spread.
object
Returns the master spread with the specified ID.
objects
Returns the master spreads within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
masterSpread object, number (index of the object in its containing object), or string (name of the object)
he masterSpread at the start of the range.
to
masterSpread object, number (index of the object in its containing object), or string (name of the object)
he masterSpread at the end of the range.
lastItem
None
object
Returns the last master spread.
middleItem
None
object
Returns the middle master spread.
object
Returns the next master spread.
object
Returns the previous master spread.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he master spread before the one desired.
Name:
Type:
Description:
obj
object
he master spread ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 803
measurementCombobox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
read/write
he measurement unit to use for the editbox or combobox
editUnits
Name:
Decimal:
MeasurementUnits.points
2054188905
MeasurementUnits.picas
2054187363
MeasurementUnits.inches
2053729891
MeasurementUnits.inchesDecimal
2053729892
MeasurementUnits.millimeters
2053991795
MeasurementUnits.centimeters
2053336435
MeasurementUnits.ciceros
2053335395
editValue
number
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the measurement combobox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
stringList
array of strings
read/write
A list of the strings that appear on the menu of the control.
804
JavaScript Reference
InDesign CS Scripting Guide
measurementComboboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of measurement comboboxes
Methods Method:
Parameters:
Return:
Description:
add
None
measurementCombobox
Create a new measurement combobox.
anyItem
None
object
Returns any measurement combobox.
firstItem
None
object
Returns the first measurement combobox.
object
Returns the measurement combobox with the specified ID.
objects
Returns the measurement comboboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
measurementCombobox object or number (index of the object in its containing object)
he measurementCombobox at the start of the range.
to
measurementCombobox object or number (index of the object in its containing object)
he measurementCombobox at the end of the range.
lastItem
None
object
Returns the last measurement combobox.
middleItem
None
object
Returns the middle measurement combobox.
object
Returns the next measurement combobox.
object
Returns the previous measurement combobox.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he measurement combobox before the one desired.
Name:
Type:
Description:
obj
object
he measurement combobox ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 805
measurementEditbox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
read/write
he measurement unit to use for the editbox or combobox
editUnits
Name:
Decimal:
MeasurementUnits.points
2054188905
MeasurementUnits.picas
2054187363
MeasurementUnits.inches
2053729891
MeasurementUnits.inchesDecimal
2053729892
MeasurementUnits.millimeters
2053991795
MeasurementUnits.centimeters
2053336435
MeasurementUnits.ciceros
2053335395
editValue
number
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the measurement editbox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
806
JavaScript Reference
InDesign CS Scripting Guide
measurementEditboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of measurement editboxes
Methods Method:
Parameters:
Return:
Description:
add
None
measurementEditbox
Create a new measurement editbox.
anyItem
None
object
Returns any measurement editbox.
firstItem
None
object
Returns the first measurement editbox.
object
Returns the measurement editbox with the specified ID.
objects
Returns the measurement editboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
measurementEditbox object or number (index of the object in its containing object)
he measurementEditbox at the start of the range.
to
measurementEditbox object or number (index of the object in its containing object)
he measurementEditbox at the end of the range.
lastItem
None
object
Returns the last measurement editbox.
middleItem
None
object
Returns the middle measurement editbox.
object
Returns the next measurement editbox.
object
Returns the previous measurement editbox.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he measurement editbox before the one desired.
Name:
Type:
Description:
obj
object
he measurement editbox ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 807
metadataPreference Properties Property:
Type:
Access:
Description:
author
string
read/write
document author
copyrightInfourl
string
read/write
Copyright statement URL
copyrightNotice
string
read/write
Copyright text.
read/write
Copyright status of the document
date
read only
document creation date.
creator
string
read only
he application that created the document
description
string
read/write
A description of the document.
documentTitle
string
read/write
he document title
format
string
read only
he document format
jobName
string
read/write
Customer-assigned job name.
keywords
array of strings
read/write
he keywords associated with the document.
modificationDate
date
read only
he most recent document modification date.
parent
document
read only
he parent of the object.
serverurl
string
read only
Location of the document on asset management server
copyrightStatus
creationDate
Name:
Decimal:
CopyrightStatus.unknown
1433299822
CopyrightStatus.yes
2036691744
CopyrightStatus.no
1852776480
Methods Method: append
countContainer
createContainerItem
Parameters: Name:
Type:
Description:
from
string
File from which to append.
[affectAll]
boolean
If true, treat all properties as external (defaults to false).
Name:
Type:
Description:
namespace
string
he namespace.
path
string
he path.
Name:
Type:
Description:
namespace
string
he namespace.
path
string
he path.
[index]
integer
he index of the item (starts from 1, default is 0 meaning append to the end).
[container]
808
JavaScript Reference
Name:
Decimal:
ContainerType.bag
1298424423
ContainerType.seq
1298428785
ContainerType.alt
1298424180
InDesign CS Scripting Guide
he container type (only required if the new item is the first one in the container).
Return:
Description:
nothing
Append information from external file.
integer
Count the number of items in the container.
nothing
Create an empty container item.
Method: getProperty
replace
save
setProperty
Parameters: Name:
Type:
Description:
namespace
string
he namespace.
path
string
he path.
Name:
Type:
Description:
from
string
File from which to replace.
[affectAll]
boolean
If true, treat all properties as external (defaults to false).
Name:
Type:
Description:
to
string
Where to save.
Name:
Type:
Description:
namespace
string
he namespace.
path
string
he path.
value
string
he value of the property, pass an empty string to remove the property.
Return:
Description:
string
Get the XMP property value associated with the given path.
nothing
Read information from external file and replace current metadata.
nothing
Save information to file.
nothing
Set the XMP property associated with the given path.
InDesign CS Scripting Guide JavaScript Reference 809
mixedInk Properties Property:
Type:
Access:
Description:
baseColor
mixedInkGroup
read only
he mixed ink group that a mixed ink swatch is based on.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the Mixedink within its parent application or document
inkList
objects
read only
he inks used in the mixed ink.
inkPercentages
array of numbers
read/write
he array of tint percentages for the mixed ink.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he color model of the mixed ink.
he name of the mixed ink.
model
Name:
Decimal:
ColorModel.spot
1936748404
ColorModel.process
1886548851
ColorModel.registration
1919248243
ColorModel.mixedinkmodel
1768844664
name
string
read/write
parent
object
read only
he parent of the object.
read/write
he color space of the color.
space
Name:
Decimal:
ColorSpace.rgb
1666336578
ColorSpace.cmyk
1129142603
ColorSpace.lab
1665941826
ColorSpace.mixedInk
1666009432
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Merge one or more other swatches into this one.
nothing
Deletes the object.
extractLabel
insertLabel
merge
remove
810
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
object or object name as string
he swatches to merge.
None
JavaScript Reference
InDesign CS Scripting Guide
mixedInkGroup Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the Mixedinkgroup within its parent application or document
inkList
objects
read only
he inks used in the mixed ink group.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he color model of the mixed ink group.
model
Name:
Decimal:
ColorModel.spot
1936748404
ColorModel.process
1886548851
ColorModel.registration
1919248243
ColorModel.mixedinkmodel
1768844664
name
string
read/write
he name of the mixed ink group.
parent
object
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Merge one or more other swatches into this one.
nothing
Deletes the object.
extractLabel
insertLabel
merge
remove
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
object or object name as string
he swatches to merge.
None
InDesign CS Scripting Guide JavaScript Reference 811
mixedInkGroups Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of Mixedinkgroups
Methods Method: add
Parameters: Name:
Type:
Description:
inkList
objects
A list of ink items.
[inkPercentages]
array of numbers
A list of initial percentages for each ink in the ink list as Array of numbers.
[repeatValues]
array of numbers
A list specifying the repeat amount for each ink in the ink list as Array of integers.
[incrementValues]
array of numbers
A list specifying the increment percentages for each ink in the ink list as Array of numbers.
Return:
Description:
mixedInkGroup
Create a new mixed ink group.
anyItem
None
object
Returns any Mixedinkgroup.
firstItem
None
object
Returns the first Mixedinkgroup.
object
Returns the Mixedinkgroup with the specified ID.
objects
Returns the Mixedinkgroups within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
mixedInkGroup object, number (index of the object in its containing object), or string (name of the object)
he mixedInkGroup at the start of the range.
to
mixedInkGroup object, number (index of the object in its containing object), or string (name of the object)
he mixedInkGroup at the end of the range.
lastItem
None
object
Returns the last Mixedinkgroup.
middleItem
None
object
Returns the middle Mixedinkgroup.
object
Returns the next Mixedinkgroup.
object
Returns the previous Mixedinkgroup.
nextItem
previousItem
812
Name:
Type:
Description:
obj
object
he Mixedinkgroup before the one desired.
Name:
Type:
Description:
obj
object
he Mixedinkgroup ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
mixedInks Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of Mixedinks
Methods Method: add
Parameters: Name:
Type:
Description:
inkList
array of inks or ink names as strings
he list of ink items or the mixed ink base swatch as Array of inks or Mixedinkgroup.
inkPercentages
array of numbers
he list of ink contributions for the ink items specified as Array of numbers.
Return:
Description:
mixedInk
Create a new mixed ink.
anyItem
None
object
Returns any Mixedink.
firstItem
None
object
Returns the first Mixedink.
object
Returns the Mixedink with the specified ID.
objects
Returns the Mixedinks within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
mixedInk object, number (index of the object in its containing object), or string (name of the object)
he mixedInk at the start of the range.
to
mixedInk object, number (index of the object in its containing object), or string (name of the object)
he mixedInk at the end of the range.
lastItem
None
object
Returns the last Mixedink.
middleItem
None
object
Returns the middle Mixedink.
object
Returns the next Mixedink.
object
Returns the previous Mixedink.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he Mixedink before the one desired.
Name:
Type:
Description:
obj
object
he Mixedink ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 813
movie Properties Property:
Type:
Access:
Description:
associatedXMLElement
xmlElement
read only
Returns the associated XML element
description
string
read/write
Description
embedInPDF
boolean
read/write
Embed content in PDF
filePath
string
read/write
he file path
floatingWindow
boolean
read/write
Floating window
read/write
Floating window position
read/write
Floating window size
floatingWindowPosition
floatingWindowSize
Name:
Decimal:
FloatingWindowPosition.upperLet
1668183118
FloatingWindowPosition.upperMiddle
1299541348
FloatingWindowPosition.upperRight
1299542644
FloatingWindowPosition.centerLet
1298361446
FloatingWindowPosition.center
1298359662
FloatingWindowPosition.centerRight
1298362996
FloatingWindowPosition.lowerLet
1298951270
FloatingWindowPosition.lowerMiddle
1298951524
FloatingWindowPosition.lowerRight
1298952820
Name:
Decimal:
FloatingWindowSize.oneFith
1298557286
FloatingWindowSize.oneFourth
1298558834
FloatingWindowSize.oneHalf
1298686316
FloatingWindowSize.full
1298560364
FloatingWindowSize.double
1299476344
FloatingWindowSize.triple
1299477112
FloatingWindowSize.quadruple
1299281272
FloatingWindowSize.max
1299014008
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
images
images
read only
images
index
integer
read only
index of the movie within its parent pageItem, oval, rectangle or polygon
itemLayer
layer
read/write
he layer containing the page item.
itemLink
link
read only
link to a placed file
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
locked
boolean
read/write
If true, the page item is locked.
814
JavaScript Reference
InDesign CS Scripting Guide
Property: moviePosterType
Type: Name:
Decimal:
MoviePosterTypes.none
1852796517
MoviePosterTypes.standard
2020623970
MoviePosterTypes.fromMovie
1298558310
MoviePosterTypes.proxyImage
1299216505
Access:
Description:
read/write
he current poster type (‘proxy image’ is read-only)
name
string
read/write
he name of the movie
parent
object
read only
he parent of the page item.
read/write
Play mode
playMode
Name:
Decimal:
PlayMode.once
1399811685
PlayMode.stayOpen
1299148910
PlayMode.repeatPlay playOnPageTurn
boolean
read/write
Play on page turn
posterFile
string
read/write
Poster file
showControls
boolean
read/write
Show controls
url
string
read/write
he URL
verticalScale
number
read/write
he vertical scaling percentage of the page item.
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method:
Parameters:
Return:
Description:
bringForward
None
nothing
Brings the object forward.
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Fits content within the frame.
nothing
Sets the string associated with the given key (label name).
nothing
Markup layout content with XML preserving the existing content.
extractLabel
fit
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
insertLabel
markup
Name:
Decimal:
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions. proportionally
1667591779
FitOptions. contentToFrame
1668247152
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
xmlElement
he element to mark up.
InDesign CS Scripting Guide JavaScript Reference 815
Method: move
Parameters: Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Return:
Description:
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
remove
None
nothing
Deletes the object.
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
resize
816
Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Method: select
Parameters: Name: [existingSelection]
Type:
Description:
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Select this movie.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
boolean
Verify movie URL.
store
unlink
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
verifyurl
None
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
InDesign CS Scripting Guide JavaScript Reference 817
movieBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the moviebehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
movieItem
movie
read/write
he movie page item.
name
string
read only
he name of the behavior.
read/write
he movie operation to perform.
read only
he parent of the object.
operation
parent
Name:
Decimal:
PlayOperations.play
1886151033
PlayOperations.stop
1937010544
PlayOperations.pause
1885435251
PlayOperations.resume
1919251317
object
Methods Method: extractLabel
insertLabel
remove
818
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
movieBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of moviebehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
movieBehavior
Create a new movie behavior.
anyItem
None
object
Returns any moviebehavior.
firstItem
None
object
Returns the first moviebehavior.
object
Returns the moviebehavior with the specified ID.
objects
Returns the moviebehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
movieBehavior object, number (index of the object in its containing object), or string (name of the object)
he movieBehavior at the start of the range.
to
movieBehavior object, number (index of the object in its containing object), or string (name of the object)
he movieBehavior at the end of the range.
lastItem
None
object
Returns the last moviebehavior.
middleItem
None
object
Returns the middle moviebehavior.
object
Returns the next moviebehavior.
object
Returns the previous moviebehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he moviebehavior before the one desired.
Name:
Type:
Description:
obj
object
he moviebehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 819
movies Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of movies
Methods Method: add
Parameters: Name:
Type:
Description:
[layer]
layer object or layer name as string
he layer on which to create the movie as layer.
[at]
[reference]
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
movie
Create a new movie.
Location.
Before/ater this movie or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
anyItem
None
object
Returns any movie.
firstItem
None
object
Returns the first movie.
object
Returns the movie with the specified ID.
objects
Returns the movies within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
movie object, number (index of the object in its containing object), or string (name of the object)
he movie at the start of the range.
to
movie object, number (index of the object in its containing object), or string (name of the object)
he movie at the end of the range.
lastItem
None
object
Returns the last movie.
middleItem
None
object
Returns the middle movie.
object
Returns the next movie.
object
Returns the previous movie.
nextItem
previousItem
820
Name:
Type:
Description:
obj
object
he movie before the one desired.
Name:
Type:
Description:
obj
object
he movie ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
nestedStyle Properties Property:
Type:
Access:
Description:
appliedCharacterStyle
style object or style name as string
read/write
he applied character style as characterStyle or string
delimiter
string or one of the following constants:
read/write
he delimiting expression as string or idnested styleDelimiters
Name:
Decimal:
NestedStyleDelimiters.anyCharacter
1380541539
NestedStyleDelimiters.anyWord
1380541559
NestedStyleDelimiters.autoPageNumber
1396797550
NestedStyleDelimiters.digits
1380541540
NestedStyleDelimiters.dropcap
1380541507
NestedStyleDelimiters.emSpace
1397058899
NestedStyleDelimiters.endNestedStyle
1396855379
NestedStyleDelimiters.enSpace
1397059155
NestedStyleDelimiters.forcedLineBreak
1397124194
NestedStyleDelimiters.indentHereTab
1397319796
NestedStyleDelimiters.inlineGraphic
1380541545
NestedStyleDelimiters.letters
1380541548
NestedStyleDelimiters.nonbreakingSpace
1397645907
NestedStyleDelimiters.sectionMarker
1400073805
NestedStyleDelimiters.sentence
1380541555
NestedStyleDelimiters.tabs
1380541556
inclusive
boolean
read/write
Include the last delimiter
index
integer
read only
index of the nested style within its parent textDefault, paragraph, paragraphStyle, text, character, word, line, textcolumn, textStyleRange, insertion point or story
parent
object
read only
he nested style’s parent as textDefault, paragraph, paragraphStyle, text, character, word, line, textcolumn, textStyleRange, insertion point or story
repetition
integer
read/write
How many delimiters
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 821
nestedStyles Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of nested styles
Methods Method:
Parameters:
Return:
add
None
nestedStyle
Create a new nested style.
anyItem
None
object
Returns any nested style.
firstItem
None
object
Returns the first nested style.
objects
Returns the nested styles within the specified range.
itemByRange
Name:
Type:
Description:
from
nestedStyle object or number (index of the object in its containing object)
he nestedStyle at the start of the range.
to
nestedStyle object or number (index of the object in its containing object)
he nestedStyle at the end of the range.
Description:
lastItem
None
object
Returns the last nested style.
middleItem
None
object
Returns the middle nested style.
object
Returns the next nested style.
object
Returns the previous nested style.
nextItem
previousItem
822
Name:
Type:
Description:
obj
object
he nested style before the one desired.
Name:
Type:
Description:
obj
object
he nested style after the one desired.
JavaScript Reference
InDesign CS Scripting Guide
objects Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the Object with the specified index (as integer) or label (as string).
length
integer
read only
he number of objects
Methods Method: add
Parameters: Name:
Type:
Description:
object
object
he object to add.
[index]
integer or object name as string
Before this index as integer.
Return:
Description:
nothing
Add an object to the collection.
anyItem
None
object
Returns any object.
firstItem
None
object
Returns the first object.
object
Returns the object with the specified ID.
objects
Returns the objects within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
object or number (index of the object in its containing object)
he object at the start of the range.
to
object or number (index of the object in its containing object)
he object at the end of the range.
lastItem
None
object
Returns the last object.
middleItem
None
object
Returns the middle object.
object
Returns the next object.
object
Returns the previous object.
nothing
Remove an object from the collection.
nextItem
previousItem
remove
Name:
Type:
Description:
obj
object
he object before the one desired.
Name:
Type:
Description:
obj
object
he object ater the one desired.
Name:
Type:
Description:
index
integer
he index of the object to remove.
InDesign CS Scripting Guide JavaScript Reference 823
openFileBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
filePath
string
read/write
he file path to the file being opened.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the OpenFilebehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the behavior.
parent
object
read only
he parent of the object.
Methods Method: extractLabel
insertLabel
remove
824
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
openFileBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of OpenFilebehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
openFileBehavior
Create a new open file behavior.
anyItem
None
object
Returns any OpenFilebehavior.
firstItem
None
object
Returns the first OpenFilebehavior.
object
Returns the OpenFilebehavior with the specified ID.
objects
Returns the OpenFilebehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
openFileBehavior object, number (index of the object in its containing object), or string (name of the object)
he openFileBehavior at the start of the range.
to
openFileBehavior object, number (index of the object in its containing object), or string (name of the object)
he openFileBehavior at the end of the range.
lastItem
None
object
Returns the last OpenFilebehavior.
middleItem
None
object
Returns the middle OpenFilebehavior.
object
Returns the next OpenFilebehavior.
object
Returns the previous OpenFilebehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he OpenFilebehavior before the one desired.
Name:
Type:
Description:
obj
object
he OpenFilebehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 825
oval Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item.
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item.
absoluteVerticalScale
number
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he type of content
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
blendMode
contentType
cornerEffect
826
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Name:
Decimal:
ContentType.unassigned
1970168179
ContentType.graphicType
1735553140
ContentType.textType
1952412773
Name:
Decimal:
CornerEffects.none
1852796517
CornerEffects.roundedCorner
1667592804
CornerEffects.inverseRoundedCorner
1667591798
CornerEffects.insetCorner
1667591795
CornerEffects.bevelCorner
1667588726
CornerEffects.fancyCorner
1667589742
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
cornerRadius
number
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs.
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
endCap
endJoin
epss featherCornerType
featherMode
Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
epss Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
featherWidth
number
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fillTint
number
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gapColor
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gapTint
number
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradientFillAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientFillLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
InDesign CS Scripting Guide JavaScript Reference 827
Property:
Type:
Access:
Description:
gradientStrokeAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientStrokeLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
graphicLines
graphicLines
read only
All graphic lines
graphics
graphics
read only
All graphics
groups
groups
read only
groups
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
images
images
read only
images
index
integer
read only
index of the oval within its parent spread, master spread, pageItem, oval, rectangle, polygon, graphicline, group, state, document, layer, page, button, textFrame, story, text, character, word, line, textcolumn, paragraph, textStyleRange, cell, table or insertion point
isolateBlending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
itemLayer
layer
read/write
he layer containing the page item.
knockoutGroup
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
letLineEnd
828
Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
JavaScript Reference
InDesign CS Scripting Guide
Property: localDisplaySetting
Type: Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
Access:
Description:
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miterLimit
number
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
movies
movies
read only
Every movie
nonprinting
boolean
read/write
If true, the page item is non-printing.
opacity
number
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the page item will overprint.
overprintGap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprintStroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overriddenMasterPageItem
pageItem
read only
A reference to the master page item linked to the page item (if any).
pageItems
pageItems
read only
All page items
parent
object
read only
he parent of the page item.
paths
paths
read only
All paths
pdfs
pdfs
read only
PDFs.
picts
picts
read only
Picts.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rightLineEnd
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
InDesign CS Scripting Guide JavaScript Reference 829
Property:
Type:
Access:
Description:
rotationAngle
number
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadowBlendMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
shadowBlurRadius
number
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadowColor
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadowxOffset
number
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadowyOffset
number
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shearAngle
number
read/write
he shear angle applied to the page item.
sounds
sounds
read only
Every sound
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
strokeAlignment
830
Name:
Decimal:
StrokeAlignment.centerAlignment
1936998723
StrokeAlignment.insideAlignment
1936998729
StrokeAlignment.outsideAlignment
1936998735
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
strokeColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
strokeCornerAdjustment
Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
strokeDashAndGap
array of measurement strings or numbers as [dash, gap, dash, gap,...]
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
strokeTint
number
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
strokeType
strokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
strokeWeight
number
read/write
he weight (in points) of the stroke applied to the page item.
textFrames
textFrames
read only
text Frames
textPaths
textPaths
read only
All text paths
textWrapPreferences
textWrapPreference
read only
he text wrap applied to the page item.
verticalScale
number
read/write
he vertical scaling percentage of the page item.
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
wmfs
wmfs
read only
WMFs.
Methods Method: addPath
Parameters: Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
pageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (objects>p athfinder>Add).
bringForward
None
nothing
Brings the object forward.
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
pageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (objects>pathfinder> Exclude Overlap).
excludeOverlapPath
Name:
Type:
Description:
with
objects
he objects to exclude.
InDesign CS Scripting Guide JavaScript Reference 831
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
fit
insertLabel
intersectPath
832
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
Name:
Decimal:
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Fits content within the frame.
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions. proportionally
1667591779
FitOptions. contentToFrame
1668247152
nothing
Sets the string associated with the given key (label name).
pageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (objects>pathfinder>Intersect).
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
he objects to intersect with.
JavaScript Reference
Description:
nothing
Decimal:
to
given
Return:
InDesign CS Scripting Guide
Method:
Parameters:
makeCompoundPath
Name:
Type:
Description:
with
objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
minusBack
move
override
place
placeXML
Return:
Description:
pageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
pageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (objects>pathfi nder>Minus Back).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
pageItem
Overrides an item from the master page and places it on the page.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
InDesign CS Scripting Guide JavaScript Reference 833
Method:
Parameters:
Return:
Description:
releaseCompoundPath
None
objects
release compound path.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
resize
834
Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Method: rotate
select
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Rotate the page item.
nothing
Select this oval.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
InDesign CS Scripting Guide JavaScript Reference 835
Method: shear
store
subtractPath
836
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
pageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (objects>pathfinder>Subtract).
Method: unlink
Parameters: Name: from
Type:
Description:
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
InDesign CS Scripting Guide JavaScript Reference 837
ovals Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of ovals
Methods Method: add
Parameters: Name:
Type:
Description:
[layer]
layer object or layer name as string
he layer on which to create the oval as layer.
[at]
[reference]
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
oval
Create a new oval.
Location.
Before/ater this oval or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
anyItem
None
object
Returns any oval.
firstItem
None
object
Returns the first oval.
object
Returns the oval with the specified ID.
objects
Returns the ovals within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
oval object or number (index of the object in its containing object)
he oval at the start of the range.
to
oval object or number (index of the object in its containing object)
he oval at the end of the range.
lastItem
None
object
Returns the last oval.
middleItem
None
object
Returns the middle oval.
object
Returns the next oval.
object
Returns the previous oval.
nextItem
previousItem
838
Name:
Type:
Description:
obj
object
he oval before the one desired.
Name:
Type:
Description:
obj
object
he oval ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
packageForGoLivePreference Properties Property:
Type:
Access:
Description:
copyFormattedImages
boolean
read/write
If true, copy formatted images to images sub folder
copyOptimizedImages
boolean
read/write
If true, copy optimized images to images sub folder
copyOriginalImages
boolean
read/write
If true, copy original images to images sub folder
excludeDtd
boolean
read/write
If true, exclude the dtd from the exported XML
exportFromSelected
boolean
read/write
If true, export from a selected element (otherwise export the entire document)
read/write
File encoding to be used when exporting
read/write
Generate interlaced GIFs
read/write
color palette to use for GIF conversion
read/write
Type of image to generate for optimized and formatted images
read/write
Format of converted JPEG image
read/write
Quality of converted JPEG image
fileEncoding
gifOptionsInterlaced gifOptionsPalette
imageConversion
jpegOptionsFormat
jpegOptionsQuality
Name:
Decimal:
XMLFileEncoding.utf8
1937134904
XMLFileEncoding.utf16
1937125686
XMLFileEncoding.shitJIS
1249077875
boolean Name:
Decimal:
GIFOptionsPalette.adaptivePalette
1886151024
GIFOptionsPalette.macintoshPalette
1886154096
GIFOptionsPalette.webPalette
1886156656
GIFOptionsPalette.windowsPalette
1886156644
Name:
Decimal:
ImageConversion.automatic
1768059764
ImageConversion.jpeg
1785751398
ImageConversion.gif
1734960742
Name:
Decimal:
JPEGOptionsFormat.baselineEncoding
1785751394
JPEGOptionsFormat.progressiveEncoding
1785751408
Name:
Decimal:
JPEGOptionsQuality.low
1701727351
JPEGOptionsQuality.medium
1701727588
JPEGOptionsQuality.high
1701726313
JPEGOptionsQuality.maximum
1701727608
parent
object
read only
he package for go live preference’s parent as application or document
preferredBrowser
string
read/write
he preferred browser for viewing XML
ruby
boolean
read/write
If true, include Ruby in the exported XML
viewAterExport
boolean
read/write
If true, view exported XML in a default viewer
InDesign CS Scripting Guide JavaScript Reference 839
page Properties Property:
Type:
Access:
Description:
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items on the page, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
appliedMaster
masterSpread object or master spread name as string
read/write
he master spread applied to the page.
appliedSection
section
read only
he section associated with this page.
appliedTrapPreset
trapPreset object or name of trap preset as string
read/write
he trap preset associated with this page.
bounds
array of numbers or measurement strings as [y1, x1, y2, x2]
read only
he bounds of the page.
buttons
buttons
read only
Every button.
documentOffset
integer
read only
Offset of the page in the document.
formFields
formFields
read only
Every form field item.
graphicLines
graphicLines
read only
All graphic lines.
groups
groups
read only
All groups.
guides
guides
read only
All guides
id
integer
read only
A unique number identifying the object.
index
integer
read only
Index of the object within its parent spread.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
marginPreferences
marginPreference
read only
he margin preferences for the page.
masterPageItems
objects
read only
All items on the applied master spread(s) that have not been overridden.
name
string
read only
he name of the page.
ovals
ovals
read only
All ovals
pageItems
pageItems
read only
All page items
parent
object
read only
he parent of the object.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
tabOrder
objects
read/write
he order of tabbing among the form fields on the page.
textFrames
textFrames
read only
text Frames
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
extractLabel
insertLabel
840
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
JavaScript Reference
InDesign CS Scripting Guide
Method: move
Parameters: Name: [to]
[reference]
[binding]
place
Type: Name:
Description: Decimal:
LocationOptions.before
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions. atBeginning
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
page
Move page.
object
Place a file.
Location.
A page or spread. Before/ater the page or at the beginning/end of the spread.
Name:
Decimal:
BindingOptions.default
1650812527
BindingOptions. letAlign
1634104421
BindingOptions.rightAlign
1919379572
Binding options.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
InDesign CS Scripting Guide JavaScript Reference 841
pageItem Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item.
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item.
absoluteVerticalScale
number
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
blendMode
cornerEffect
cornerRadius
842
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Name:
Decimal:
CornerEffects.none
1852796517
CornerEffects.roundedCorner
1667592804
CornerEffects.inverseRoundedCorner
1667591798
CornerEffects.insetCorner
1667591795
CornerEffects.bevelCorner
1667588726
CornerEffects.fancyCorner
1667589742
number
JavaScript Reference
InDesign CS Scripting Guide
Property: endCap
endJoin
epss featherCornerType
featherMode
Type: Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
epss Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
Access:
Description:
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs.
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
featherWidth
number
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fillTint
number
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gapColor
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gapTint
number
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradientFillAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientFillLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradientStrokeAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
InDesign CS Scripting Guide JavaScript Reference 843
Property:
Type:
Access:
Description:
gradientStrokeLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
graphicLines
graphicLines
read only
All graphic lines
graphics
graphics
read only
All graphics
groups
groups
read only
groups
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
images
images
read only
images
index
integer
read only
index of the pageItem within its parent XML element, spread, master spread, pageItem, oval, rectangle, polygon, graphicline, group, state, textFrame, story, text, character, word, line, textcolumn, paragraph, textStyleRange, cell, table, document, layer, page, button or insertion point
isolateBlending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
itemLayer
layer
read/write
he layer containing the page item.
knockoutGroup
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
letLineEnd
844
Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
JavaScript Reference
InDesign CS Scripting Guide
Property: localDisplaySetting
Type: Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
Access:
Description:
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miterLimit
number
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
movies
movies
read only
Every movie
nonprinting
boolean
read/write
If true, the page item is non-printing.
opacity
number
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the page item will overprint.
overprintGap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprintStroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overriddenMasterPageItem
pageItem
read only
A reference to the master page item linked to the page item (if any).
pageItems
pageItems
read only
All page items
parent
object
read only
he parent of the page item.
paths
paths
read only
All paths
pdfs
pdfs
read only
PDFs.
picts
picts
read only
Picts.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rightLineEnd
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
InDesign CS Scripting Guide JavaScript Reference 845
Property:
Type:
Access:
Description:
rotationAngle
number
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadowBlendMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
shadowBlurRadius
number
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadowColor
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadowxOffset
number
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadowyOffset
number
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shearAngle
number
read/write
he shear angle applied to the page item.
sounds
sounds
read only
Every sound
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
strokeAlignment
846
Name:
Decimal:
StrokeAlignment.centerAlignment
1936998723
StrokeAlignment.insideAlignment
1936998729
StrokeAlignment.outsideAlignment
1936998735
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
strokeColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
strokeCornerAdjustment
Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
strokeDashAndGap
array of measurement strings or numbers as [dash, gap, dash, gap,...]
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
strokeTint
number
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
strokeType
strokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
strokeWeight
number
read/write
he weight (in points) of the stroke applied to the page item.
textFrames
textFrames
read only
text Frames
textPaths
textPaths
read only
All text paths
textWrapPreferences
textWrapPreference
read only
he text wrap applied to the page item.
verticalScale
number
read/write
he vertical scaling percentage of the page item.
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
wmfs
wmfs
read only
WMFs.
Methods Method: addPath
Parameters: Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
pageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (objects>p athfinder>Add).
bringForward
None
nothing
Brings the object forward.
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
pageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (objects>pathfinder> Exclude Overlap).
excludeOverlapPath
Name:
Type:
Description:
with
objects
he objects to exclude.
InDesign CS Scripting Guide JavaScript Reference 847
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
fit
insertLabel
intersectPath
848
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
Name:
Decimal:
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Fits content within the frame.
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions. proportionally
1667591779
FitOptions. contentToFrame
1668247152
nothing
Sets the string associated with the given key (label name).
pageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (objects>pathfinder>Intersect).
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
he objects to intersect with.
JavaScript Reference
Description:
nothing
Decimal:
to
given
Return:
InDesign CS Scripting Guide
Method:
Parameters:
makeCompoundPath
Name:
Type:
Description:
with
objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
minusBack
move
override
place
Return:
Description:
pageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
pageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (objects>pathfi nder>Minus Back).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
pageItem
Overrides an item from the master page and places it on the page.
object
Place a file.
InDesign CS Scripting Guide JavaScript Reference 849
Method: placeXML
Parameters: Name:
Type:
Description:
using
xmlElement
he element in which to insert the incoming XML elements.
Return:
Description:
nothing
Places XML content from the specified element replacing the existing content.
releaseCompoundPath
None
objects
release compound path.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
resize
850
Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Method: rotate
select
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Rotate the page item.
nothing
Select this page item.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
InDesign CS Scripting Guide JavaScript Reference 851
Method: shear
store
subtractPath
852
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
pageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (objects>pathfinder>Subtract).
Method: unlink
Parameters: Name: from
Type:
Description:
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
InDesign CS Scripting Guide JavaScript Reference 853
pageItems Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of pageItems
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any pageItem.
firstItem
None
object
Returns the first pageItem.
object
Returns the pageItem with the specified ID.
objects
Returns the pageItems within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
pageItem object or number (index of the object in its containing object)
he pageItem at the start of the range.
to
pageItem object or number (index of the object in its containing object)
he pageItem at the end of the range.
lastItem
None
object
Returns the last pageItem.
middleItem
None
object
Returns the middle pageItem.
object
Returns the next pageItem.
object
Returns the previous pageItem.
nextItem
previousItem
854
Name:
Type:
Description:
obj
object
he pageItem before the one desired.
Name:
Type:
Description:
obj
object
he pageItem ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
pageReference Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the pageReference within its parent topic
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
pageNumberStyleOverride
characterStyle
read/write
he style override replacing the standard generation option.
pageReferenceLimit
number, paragraphStyle object, or paragraph style name as string
read/write
he page reference limit.
read/write
he page reference type.
pageReferenceType
Name:
Decimal:
PageReferenceType.currentPage
1668444263
PageReferenceType.toNextStyleChange
1953395555
PageReferenceType.toNextUseOfStyle
1953396083
PageReferenceType.toEndOfStory
1701802868
PageReferenceType.toEndOfDocument
1701799011
PageReferenceType.toEndOfSection
1701802851
PageReferenceType.forNextNParagraphs
1718513778
PageReferenceType.forNextNPages
1718513767
PageReferenceType.suppressPageNumbers
1852863079
parent
topic
read only
he parent of the object.
parentStory
story
read only
he story containing the page reference.
storyOffset
integer
read only
he location of the page reference from the beginning of the story.
Methods Method: extractLabel
insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 855
pageReferences Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of pageReferences
Methods Method: add
Parameters: Name:
Type:
Description:
parentStory
story
he parent story.
storyOffset
insertionPoint object or integer
Offset within the story.
[pageReferenceType]
Name:
Decimal:
PageReferenceType. currentPage
1668444263
PageReferenceType. toNextStyleChange
1953395555
PageReferenceType. toNextUseOfStyle
1953396083
PageReferenceType. toEndOfStory
1701802868
PageReferenceType. toEndOfDocument
1701799011
PageReferenceType. toEndOfSection
1701802851
PageReferenceType. forNextNParagraphs
1718513778
PageReferenceType. forNextNPages
1718513767
PageReferenceType.suppressPageNumbers
1852863079
Return:
Description:
pageReference
Create a new page reference.
he type of page reference.
[pageReferenceLimit]
integer, paragraphStyle object, or paragraph style name as string
he page range limit.
[pageNumberStyleOverride]
characterStyle or character style name as string
he style override for the page number.
anyItem
None
object
Returns any pageReference.
firstItem
None
object
Returns the first pageReference.
object
Returns the pageReference with the specified ID.
objects
Returns the pageReferences within the specified range.
object
Returns the last pageReference.
itemByID
itemByRange
lastItem
856
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
pageReference object or number (index of the object in its containing object)
he pageReference at the start of the range.
to
pageReference object or number (index of the object in its containing object)
he pageReference at the end of the range.
None
JavaScript Reference
InDesign CS Scripting Guide
Method:
Parameters:
Return:
Description:
middleItem
None
object
Returns the middle pageReference.
object
Returns the next pageReference.
object
Returns the previous pageReference.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he pageReference before the one desired.
Name:
Type:
Description:
obj
object
he pageReference ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 857
pages Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of pages
Methods Method: add
Parameters: Name: [at]
[reference]
Type:
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
page, spread, masterSpread, or document
Return:
Description:
page
Create a new page.
Location.
Before/ater an existing page or at the beginning/end of this object.
anyItem
None
page
Returns any page.
firstItem
None
page
Returns the first page.
page
Returns the page with the specified ID.
pages
Returns the pages within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
page or number (index of the object in its containing object)
he page at the start of the range.
to
page object or number (index of the object in its containing object)
he page at the end of the range.
lastItem
None
page
Returns the last page.
middleItem
None
page
Returns the middle page.
page
Returns the next page.
page
Returns the previous page.
nextItem
previousItem
858
Name:
Type:
Description:
obj
object
he page before the one desired.
Name:
Type:
Description:
obj
object
he page ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
paragraph Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
ascent
measurement string or number
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associatedXMLElements
objects
read only
Returns the associated XML elements
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
measurement string or number
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
buttons
buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
characters
capitalization
characters
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
characters
InDesign CS Scripting Guide JavaScript Reference 859
Property:
Type:
Access:
Description:
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
measurement string or number
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradientStrokeAngle
number
read/write
he angle of the gradient applied to the stroke of the text.
gradientStrokeLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
860
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
graphicLines
graphicLines
read only
All graphic lines
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
groups
groups
read only
groups
horizontalOffset
measurement string or number
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
index
integer
read only
index of the object within its parent object.
insertionPoints
insertionPoints
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
InDesign CS Scripting Guide JavaScript Reference 861
Property:
Type:
Access:
Description:
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
lines
lines
read only
lines
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
openTypeFeatures
array of integers
read/write
open type features as Array of integers
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
862
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
parentStory
story
read only
he story containing the text object.
parentTextFrame
textFrame
read only
he text frame containing the text object.
pointSize
number
read/write
he size of the text in points.
polygons
polygons
read only
All polygons
position
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
otfFigureStyle
otfFraction
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
rectangles
rectangles
read only
All rectangles
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
InDesign CS Scripting Guide JavaScript Reference 863
Property:
Type:
Access:
Description:
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
ruleBelowWidth
singleWordJustification
864
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tables
tables
read only
All tables
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
InDesign CS Scripting Guide JavaScript Reference 865
Property:
Type:
Access:
Description:
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
words
words
read only
words
Methods Method: applyStyle
changecase
Parameters: Name:
Type:
Description:
using
style object or style name as string
he paragraph style or character style to apply.
[clearingOverrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
866
JavaScript Reference
Name:
Decimal:
ChangecaseMode. uppercase
1667462499
ChangecaseMode. lowercase
1667460195
ChangecaseMode. titlecase
1667462243
ChangecaseMode. sentencecase
1667461987
InDesign CS Scripting Guide
Case option to use.
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
Method: convertToTable
createOutlines
exportFile
Parameters: Name:
Type:
Description:
[columnSeparator]
string or specialCharacter constant
he character to interpret as the column separator.
[rowSeparator]
string or specialCharacter constant
he character to interpret as the row separator.
[numberOfColumns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original text.
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
markup
Return:
Description:
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
using
xmlElement
he XML element to associate with the text.
InDesign CS Scripting Guide JavaScript Reference 867
Method: move
Parameters: Name:
Type:
to
place
remove
868
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
JavaScript Reference
InDesign CS Scripting Guide
Description:
nothing
Moves the text.
object
Place a file.
nothing
Deletes the object.
Where to move the text, relative to the reference object (before/ater).
[reference]
None
Return:
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects text.
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 869
paragraphs Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of paragraphs
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any paragraph.
firstItem
None
object
Returns the first paragraph.
objects
Returns the paragraphs within the specified range.
itemByRange
Name:
Type:
Description:
from
paragraph object or number (index of the object in its containing object)
he paragraph at the start of the range.
to
paragraph object or number (index of the object in its containing object)
he paragraph at the end of the range.
lastItem
None
object
Returns the last paragraph.
middleItem
None
object
Returns the middle paragraph.
object
Returns the next paragraph.
object
Returns the previous paragraph.
nextItem
previousItem
870
Name:
Type:
Description:
obj
object
he paragraph before the one desired.
Name:
Type:
Description:
obj
object
he paragraph ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
paragraphStyle Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
basedOn
style object or style name as string
read/write
he paragraph style this style is based on.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
capitalization
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
InDesign CS Scripting Guide JavaScript Reference 871
Property:
Type:
Access:
Description:
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
id
integer
read only
A unique number identifying the object.
imported
boolean
read only
Whether this style was imported from another document
index
integer
read only
index of the paragraphStyle within its parent document or application
read/write
Alignment of the paragraph containing the text.
justification
872
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
label
string
read/write
A label that can be set to any string
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
name
string
read/write
he name of the paragraph style.
InDesign CS Scripting Guide JavaScript Reference 873
Property:
Type:
Access:
Description:
nestedStyles
nestedStyles
read only
Nested styles
nextStyle
paragraphStyle
read/write
he style of the next paragraph. Note that this property only applies when you are entering text--if you are not entering text, setting this property to a given paragraph style will not affect the style applied to the next paragraph.
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
otfFigureStyle
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
otfFraction
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
pointSize
number
read/write
he size of the text in points.
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
position
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
874
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleBelowWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
InDesign CS Scripting Guide JavaScript Reference 875
Property: singleWordJustification
Type: Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
Access:
Description:
read/write
Justification for lines containing a single word.
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
876
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
Methods Method: extractLabel
insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 877
paragraphStyles Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of paragraphStyles
Methods Method:
Parameters:
Return:
Description:
add
None
paragraphStyle
Create a new paragraph style.
anyItem
None
object
Returns any paragraphStyle.
firstItem
None
object
Returns the first paragraphStyle.
object
Returns the paragraphStyle with the specified ID.
objects
Returns the paragraphStyles within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
paragraphStyle object, number (index of the object in its containing object), or string (name of the object)
he paragraphStyle at the start of the range.
to
paragraphStyle object, number (index of the object in its containing object), or string (name of the object)
he paragraphStyle at the end of the range.
lastItem
None
object
Returns the last paragraphStyle.
middleItem
None
object
Returns the middle paragraphStyle.
object
Returns the next paragraphStyle.
object
Returns the previous paragraphStyle.
nextItem
previousItem
878
Name:
Type:
Description:
obj
object
he paragraphStyle before the one desired.
Name:
Type:
Description:
obj
object
he paragraphStyle ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
pasteboardPreference Properties Property:
Type:
Access:
Description:
bleedGuideColor
swatch object or swatch name as string
read/write
he color of bleed guides.
minimumSpaceAboveAndBelow
measurement string or number
read/write
he minimum space above and below a page.
parent
object
read only
he parent of the object.
pasteboardColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of the pasteboard.
previewBackgroundColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of the preview background.
slugGuideColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of slug guides.
InDesign CS Scripting Guide JavaScript Reference 879
path Properties Property:
Type:
Access:
Description:
entirePath
array of anchor locations as numbers in the form [[x, y], [x, y], ...] or array of anchor, let direction, and right direction locations in the form [[[x1, y1], [x2, y2], [x3, y3]], [[x1, y1], [x2, y2], [x3, y3]], ...]
read/write
he positions of all of the anchor points on the path.
index
integer
read only
index of the path within its parent pageItem, oval, rectangle, graphicline, textFrame, polygon, clipping path settings or textWrapPreference
parent
object
read only
he parent of the object.
pathPoints
pathPoints
read only
All path points
Name:
Decimal:
read/write
he path type (open or closed).
PathType.openPath
1869639280
PathType.closedPath
1668051812
pathType
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
reverse
None
nothing
Reverse the path
880
JavaScript Reference
InDesign CS Scripting Guide
pathPoint Properties Property:
Type:
Access:
Description:
anchor
array of numbers or measurement strings as [x, y]
read/write
he location of the anchor point, in page coordinates.
index
integer
read only
index of the pathPoint within its parent path
letDirection
array of numbers or measurement strings as [x, y]
read/write
he location of the incoming (let) direction point (or “control handle”).
parent
path
read only
he parent of the object.
read/write
he type of the point (corner/smooth).
read/write
he location of the outgoing (right) direction point (or “control handle”).
pointType
rightDirection
Name:
Decimal:
PointType.lineType
1818848869
PointType.smooth
1936553064
PointType.corner
1668443762
array of numbers or measurement strings as [x, y]
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 881
pathPoints Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of pathPoints
Methods Method:
Parameters:
Return:
add
None
pathPoint
Create a new path point.
anyItem
None
object
Returns any pathPoint.
firstItem
None
object
Returns the first pathPoint.
objects
Returns the pathPoints within the specified range.
itemByRange
Name:
Type:
Description:
from
pathPoint object or number (index of the object in its containing object)
he pathPoint at the start of the range.
to
pathPoint object or number (index of the object in its containing object)
he pathPoint at the end of the range.
Description:
lastItem
None
object
Returns the last pathPoint.
middleItem
None
object
Returns the middle pathPoint.
object
Returns the next pathPoint.
object
Returns the previous pathPoint.
nextItem
previousItem
882
Name:
Type:
Description:
obj
object
he pathPoint before the one desired.
Name:
Type:
Description:
obj
object
he pathPoint ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
paths Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of paths
Methods Method:
Parameters:
Return:
Description:
add
None
path
Create a new path.
anyItem
None
path
Returns any path.
firstItem
None
path
Returns the first path.
paths
Returns the paths within the specified range.
itemByRange
Name:
Type:
Description:
from
path or number (index of the object in its containing object)
he path at the start of the range.
to
path or number (index of the object in its containing object)
he path at the end of the range.
lastItem
None
path
Returns the last path.
middleItem
None
path
Returns the middle path.
path
Returns the next path.
path
Returns the previous path.
nextItem
previousItem
Name:
Type:
Description:
obj
path
he path before the one desired.
Name:
Type:
Description:
obj
path
he path ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 883
pdf Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scale of the page item relative to its containing page item
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item
absoluteVerticalScale
number
read/write
he vertical scale of the page item relative to its containing page item
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he blend mode used to combine the object’s color with the background
blendMode
clippingPath featherCornerType
featherMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
clippingPathSettings Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
read only
he clipping path settings
read/write
he type of feathering to apply
read/write
he feather mode
featherWidth
number
read/write
he width of the feathering
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
horizontalScale
number
read/write
he scale percentage in the horizontal direction
id
integer
read only
he PDF’s unique id
imageTypeName
string
read only
he type of image
884
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
index
integer
read only
index of the PDF within its parent XML element, pageItem, oval, rectangle, polygon, graphicline, state, group or button
isolateBlending
boolean
read/write
Indicates whether the object should blend in isolation
itemLink
link
read only
link to a placed file
knockoutGroup
boolean
read/write
Indicates whether the object is a knockout group
label
string
read/write
A label that can be set to any string
read/write
he display settings for this page item
localDisplaySetting
Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
nonprinting
boolean
read/write
Whether the page item is non-printing
opacity
number
read/write
he opacity of the object
parent
object
read only
he PDF’s parent as XML element, pageItem, oval, rectangle, polygon, graphicline, state, group or button
rotationAngle
number
read/write
Angle of rotation
read/write
he blend mode to use for drawing the shadow
shadowBlendMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
shadowBlurRadius
number
read/write
he radius of the blur to apply to the shadow
shadowColor
swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the shadow
shadowxOffset
number
read/write
he horizontal offset of the shadow
shadowyOffset
number
read/write
he vertical offset of the shadow
shearAngle
number
read/write
he shear angle of the page item relative to the spread
InDesign CS Scripting Guide JavaScript Reference 885
Property:
Type:
Access:
Description:
verticalScale
number
read/write
he scale percentage in the vertical direction
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
Methods Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
insertLabel
markup
move
886
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Markup layout content with XML preserving the existing content.
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
JavaScript Reference
Return:
InDesign CS Scripting Guide
Method: place
placeXML
remove
Parameters: Name:
Type:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
None
Description:
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 887
Method: resize
888
Parameters: Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
Method: rotate
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Return:
Description:
nothing
Rotate the page item.
InDesign CS Scripting Guide JavaScript Reference 889
Method: shear
store
unlink
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
890
Name:
JavaScript Reference
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
pdfExportPreference Properties Property: acrobatCompatibility
Type: Name:
Decimal:
AcrobatCompatibility.acrobat4
1097020464
AcrobatCompatibility.acrobat5
1097020720
AcrobatCompatibility.acrobat6
1097020976
Access:
Description:
read/write
What version of Acrobat the PDF is compatible with
appliedFlattenerPreset
flattenerPreset
read/write
he flattener preset
bleedBottom
measurement string or number
read/write
Amount to image below the defined page size as Unit (number or string)
bleedInside
measurement string or number
read/write
Amount to image inside the defined page size as Unit (number or string)
bleedMarks
boolean
read/write
Adds fine rules that define the amount of extra area to image outside the define page size
bleedOutside
measurement string or number
read/write
Amount to image outside the defined page size as Unit (number or string)
bleedTop
measurement string or number
read/write
Amount to image above the defined page size as Unit (number or string)
changeSecurityPassword
string
read/write
When changing the security settings of the exported PDF, the user will be asked for this password. You can only set this value. Getting the value will always fail
colorBars
boolean
read/write
Adds small squares of color representing the CMYK inks and tints of gray in 10% increments
read/write
color bitmap compression
read/write
color bitmap quality
read/write
he kind of resampling to apply to color bitmap images
colorBitmapCompression
colorBitmapQuality
colorBitmapSampling
Name:
Decimal:
BitmapCompresssion.none
1852796517
BitmapCompresssion.autoCompression
1631808880
BitmapCompresssion.jpeg
1785751398
BitmapCompresssion.zip
2053730371
BitmapCompresssion.jpeg2000
1785751346
Name:
Decimal:
CompressionQuality.minimum
1701727598
CompressionQuality.low
1701727351
CompressionQuality.medium
1701727588
CompressionQuality.high
1701726313
CompressionQuality.maximum
1701727608
CompressionQuality.fourBit
1701721186
CompressionQuality.eightBit
1701722210
Name:
Decimal:
Sampling.none
1852796517
Sampling.downsample
1684951917
Sampling.subsample
1935823725
Sampling.bicubicDownsample
1650742125
colorBitmapSamplingdpi
integer
read/write
he resolution for resampling
colorTileSize
integer
read/write
color tile size for JPEG 2000 compression.
InDesign CS Scripting Guide JavaScript Reference 891
Property: compressionType
compressTextAndLineArt contentToEmbed
Type: Name:
Decimal:
PDFCompressionType.compressNone
1131368047
PDFCompressionType.compressStructure
1131369332
PDFCompressionType.compressObjects
1131368290
boolean Name:
Decimal:
PDFContentToEmbed.useObjectSettings
1164791635
PDFContentToEmbed.linkAll
1164790849
PDFContentToEmbed.embedAll
1164788076
Access:
Description:
read/write
he type of compression to apply to the PDF file.
read/write
If true, compress text and line art using ZIP compression
read/write
he interactive content to embed in the PDF file.
cropImagesToFrames
boolean
read/write
Export only image data that falls within the visible portion of the frame
cropMarks
boolean
read/write
Adds fine horizontal and vertical rules that define where the page should be trimmed
disallowChanging
boolean
read/write
Should the user be disallowed from changing the document
disallowCopying
boolean
read/write
Should the user be disallowed from copying items from the exported PDF
disallowDocumentAssembly
boolean
read/write
Disallow document assembly in the exported PDF
disallowExtractionForAccessibility
boolean
read/write
Disallow the user to extract content for accessibility in the exported PDF
disallowFormFillIn
boolean
read/write
Disallow the user to change form fields in the exported PDF
disallowHiResPrinting
boolean
read/write
Disallow high resolution printing in the exported PDF
disallowNotes
boolean
read/write
Should the user be disallowed from changing notes and form fields in the exported PDF
disallowPlaintextMetadata
boolean
read/write
Disallow plaintext metadata in the exported PDF
disallowPrinting
boolean
read/write
Should the user be disallowed from printing the exported PDF
exportGuidesAndGrids
boolean
read/write
If true, include visible guides and baseline grids in the PDF
exportLayers
boolean
read/write
If true, include layers in the PDF.
exportNonprintingObjects
boolean
read/write
If true, include non-printing objects in the PDF
exportReaderSpreads
boolean
read/write
If true, export pages together as if they were bound on the same sheet
generatehumbnails
boolean
read/write
Generate thumbnails for each page or spread
read/write
Grayscale bitmap compression
grayscaleBitmapCompression
892
Name:
Decimal:
BitmapCompresssion.none
1852796517
BitmapCompresssion.autoCompression
1631808880
BitmapCompresssion.jpeg
1785751398
BitmapCompresssion.zip
2053730371
BitmapCompresssion.jpeg2000
1785751346
JavaScript Reference
InDesign CS Scripting Guide
Property:
Access:
Description:
read/write
Grayscale bitmap quality
read/write
he kind of resampling to apply to grayscale bitmap images
integer
read/write
he resolution for resampling
grayTileSize
integer
read/write
Gray tile size for JPEG 2000 compression.
ignoreSpreadOverrides
boolean
read/write
If true, ignore flattener spread overrides
includeBookmarks
boolean
read/write
If true, include bookmarks in the PDF
includeHyperlinks
boolean
read/write
If true, include hyperlinks in the PDF
includeiccProfiles
boolean
read/write
If true, embed ICC profiles in the exported PDF
includeSlugWithPDF
boolean
read/write
If true, include the slug area in the PDF.
includeStructure
boolean
read/write
If true, include structure in the PDF
interactiveElements
boolean
read/write
If true, include interactive elements in the PDF
read/write
Monochrome bitmap compression
read/write
he kind of resampling to apply to monochrome bitmap images
grayscaleBitmapQuality
grayscaleBitmapSampling
grayscaleBitmapSamplingdpi
monochromeBitmapCompression
monochromeBitmapSampling
Type: Name:
Decimal:
CompressionQuality.minimum
1701727598
CompressionQuality.low
1701727351
CompressionQuality.medium
1701727588
CompressionQuality.high
1701726313
CompressionQuality.maximum
1701727608
CompressionQuality.fourBit
1701721186
CompressionQuality.eightBit
1701722210
Name:
Decimal:
Sampling.none
1852796517
Sampling.downsample
1684951917
Sampling.subsample
1935823725
Sampling.bicubicDownsample
1650742125
Name:
Decimal:
MonoBitmapCompression.none
1852796517
MonoBitmapCompression.ccit3
1128879155
MonoBitmapCompression.ccit4
1128879156
MonoBitmapCompression.zip
2053730371
MonoBitmapCompression.runLength
1919839299
Name:
Decimal:
Sampling.none
1852796517
Sampling.downsample
1684951917
Sampling.subsample
1935823725
Sampling.bicubicDownsample
1650742125
monochromeBitmapSamplingdpi
integer
read/write
he resolution for resampling.
omitBitmaps
boolean
read/write
Replace bitmap images with OPI links.
omitEPS
boolean
read/write
Replace EPS images with OPI links.
omitPDF
boolean
read/write
Replace PDF images with OPI links.
openDocumentPassword
string
read/write
When opening the exported PDF, the user will be asked for this password. You can only set this value. Getting the value will always fail.
optimizePDF
boolean
read/write
If true, optimize the exported PDF.
InDesign CS Scripting Guide JavaScript Reference 893
Property:
Type:
Access:
Description:
outputCondition
string or one of the following constants:
read/write
PDF/X output condition.
Name:
Decimal:
OutputCondition.cgatstr001
1329808199
OutputCondition.custom
1131639917
pageInformationMarks
boolean
read/write
Prints the filename, page number, current date and time and color separation name.
pageMarksOffset
number or measurement string
read/write
How far from the edge of the page InDesign will draw page marks.
pageRange
page range as string
read/write
he range of pages.
parent
application
read only
he parent of the object.
read/write
Specifies how to represent the color information in the exported PDF.
read/write
Destination color profile.
read/write
he type of PDF printer’s mark to use.
read/write
PDF/X color profile.
read/write
he weight of the printer mark.
pdfColorSpace
pdfDestinationProfile pdfMarkType
pdfxProfile
printerMarkWeight
Name:
Decimal:
PDFColorSpace.rgb
1666336578
PDFColorSpace.cmyk
1129142603
PDFColorSpace.unchangedColorSpace
1970161251
string Name:
Decimal:
MarkTypes.default
1147563124
color profile name as string or one of the following constants: Name:
Decimal:
PDFProfileSelector.useCompositeProfile
1668236368
PDFProfileSelector.useMonitorProfile
1836008528
PDFProfileSelector.useNoProfile
1851868240
PDFProfileSelector.useSeparationProfile
1936016464
Name:
Decimal:
PDFMarkWeight.p125pt
825374064
PDFMarkWeight.p25pt
842346608
PDFMarkWeight.p50pt
892350576
PDFMarkWeight.p10mm
825257325
PDFMarkWeight.p15mm
825585005
PDFMarkWeight.p20mm
842034541
PDFMarkWeight.p30mm
858811757
registrationMarks
boolean
read/write
Adds small ‘targets’ outside the page area for aligning the different separations.
simulateOverprint
boolean
read/write
If true, simulate overprint.
Name:
Decimal:
read/write
PDF/X Standards compliance.
PDFXStandards.none
1852796517
PDFXStandards.pdfx1a2001Standard
1396912481
PDFXStandards.pdfx32002Standard
1396922419
standardsCompliance
subsetFontsBelow
integer
read/write
he threshold point at which InDesign embeds all characters of a font.
thresholdToCompressColor
integer
read/write
Dots per inch threshold which causes color image compression.
thresholdToCompressGray
integer
read/write
Dots per inch threshold which causes gray image compression.
thresholdToCompressMonochrome
integer
read/write
Dots per inch threshold which causes monochrome image compression.
894
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
useDocumentBleedWithPDF
boolean
read/write
If true, use the document bleed area in the PDF.
useSecurity
boolean
read/write
If true, use the security settings when exporting a PDF.
viewPDF
boolean
read/write
If true, open the PDF file ater exporting.
InDesign CS Scripting Guide JavaScript Reference 895
pdfExportPreset Properties Property: acrobatCompatibility
Type: Name:
Decimal:
AcrobatCompatibility.acrobat4
1097020464
AcrobatCompatibility.acrobat5
1097020720
AcrobatCompatibility.acrobat6
1097020976
Access:
Description:
read/write
What version of Acrobat the PDF is compatible with.
appliedFlattenerPreset
flattenerPreset
read/write
he flattener preset.
bleedBottom
measurement string or number
read/write
Amount to image below the defined page size as Unit (number or string).
bleedInside
measurement string or number
read/write
Amount to image inside the defined page size as Unit (number or string).
bleedMarks
boolean
read/write
Adds fine rules that define the amount of extra area to image outside the define page size.
bleedOutside
measurement string or number
read/write
Amount to image outside the defined page size as Unit (number or string).
bleedTop
measurement string or number
read/write
Amount to image above the defined page size as Unit (number or string).
colorBars
boolean
read/write
Adds small squares of color representing the CMYK inks and tints of gray in 10% increments.
read/write
Color bitmap compression.
read/write
Color bitmap quality.
read/write
he kind of resampling to apply to color bitmap images.
colorBitmapCompression
colorBitmapQuality
colorBitmapSampling
Name:
Decimal:
BitmapCompresssion.none
1852796517
BitmapCompresssion.autoCompression
1631808880
BitmapCompresssion.jpg
1785751398
BitmapCompresssion.zip
2053730371
BitmapCompresssion.jpeg2000
1785751346
Name:
Decimal:
CompressionQuality.minimum
1701727598
CompressionQuality.low
1701727351
CompressionQuality.medium
1701727588
CompressionQuality.high
1701726313
CompressionQuality.maximum
1701727608
CompressionQuality.fourBit
1701721186
CompressionQuality.eightBit
1701722210
Name:
Decimal:
Sampling.none
1852796517
Sampling.downsample
1684951917
Sampling.subsample
1935823725
Sampling.bicubicDownsample
1650742125
colorBitmapSamplingdpi
integer
read/write
he resolution for resampling.
colorTileSize
integer
read/write
Color tile size for JPEG 2000 compression.
896
JavaScript Reference
InDesign CS Scripting Guide
Property: compressionType
compressTextAndLineArt contentToEmbed
Type: Name:
Decimal:
PDFCompressionType.compressNone
1131368047
PDFCompressionType.compressStructure
1131369332
PDFCompressionType.compressObjects
1131368290
boolean Name:
Decimal:
PDFContentToEmbed.useObjectSettings
1164791635
PDFContentToEmbed.linkAll
1164790849
PDFContentToEmbed.embedAll
1164788076
Access:
Description:
read/write
he type of compression to apply to the PDF file.
read/write
If true, compress text and line art using ZIP compression
read/write
he interactive content to embed in the PDF file.
cropImagesToFrames
boolean
read/write
Export only image data that falls within the visible portion of the frame
cropMarks
boolean
read/write
Adds fine horizontal and vertical rules that define where the page should be trimmed
exportGuidesAndGrids
boolean
read/write
If true, include visible guides and baseline grids in the PDF
exportLayers
boolean
read/write
If true, include layers in the PDF.
exportNonprintingObjects
boolean
read/write
If true, include non-printing objects in the PDF
exportReaderSpreads
boolean
read/write
If true, export pages together as if they were bound on the same sheet
generatehumbnails
boolean
read/write
Generate thumbnails for each page or spread
read/write
Grayscale bitmap compression
read/write
Grayscale bitmap quality
read/write
he kind of resampling to apply to grayscale bitmap images
integer
read/write
he resolution for resampling
grayTileSize
integer
read/write
Gray tile size for JPEG 2000 compression.
ignoreSpreadOverrides
boolean
read/write
If true, ignore flattener spread overrides
includeBookmarks
boolean
read/write
If true, include bookmarks in the PDF
grayscaleBitmapCompression
grayscaleBitmapQuality
grayscaleBitmapSampling
grayscaleBitmapSamplingdpi
Name:
Decimal:
BitmapCompresssion.none
1852796517
BitmapCompresssion.autoCompression
1631808880
BitmapCompresssion.jpeg
1785751398
BitmapCompresssion.zip
2053730371
BitmapCompresssion.jpeg2000
1785751346
Name:
Decimal:
CompressionQuality.minimum
1701727598
CompressionQuality.low
1701727351
CompressionQuality.medium
1701727588
CompressionQuality.high
1701726313
CompressionQuality.maximum
1701727608
CompressionQuality.fourBit
1701721186
CompressionQuality.eightBit
1701722210
Name:
Decimal:
Sampling.none
1852796517
Sampling.downsample
1684951917
Sampling.subsample
1935823725
Sampling.bicubicDownsample
1650742125
InDesign CS Scripting Guide JavaScript Reference 897
Property:
Type:
Access:
Description:
includeHyperlinks
boolean
read/write
If true, include hyperlinks in the PDF
includeiccProfiles
boolean
read/write
If true, embed ICC profiles in the exported PDF
includeSlugWithPDF
boolean
read/write
If true, include the slug area in the PDF.
includeStructure
boolean
read/write
If true, include structure in the PDF
index
integer
read only
index of the PDFExportPreset within its parent application
interactiveElements
boolean
read/write
If true, include interactive elements in the PDF
read/write
Monochrome bitmap compression
read/write
he kind of resampling to apply to monochrome bitmap images
monochromeBitmapCompression
monochromeBitmapSampling
Name:
Decimal:
MonoBitmapCompression.none
1852796517
MonoBitmapCompression.ccit3
1128879155
MonoBitmapCompression.ccit4
1128879156
MonoBitmapCompression.zip
2053730371
MonoBitmapCompression.runLength
1919839299
Name:
Decimal:
Sampling.none
1852796517
Sampling.downsample
1684951917
Sampling.subsample
1935823725
Sampling.bicubicDownsample
1650742125
monochromeBitmapSamplingdpi
integer
read/write
he resolution for resampling
name
string
read/write
he name of the PDFExportPreset
omitBitmaps
boolean
read/write
Replace bitmap images with OPI links
omitEPS
boolean
read/write
Replace EPS images with OPI links
omitPDF
boolean
read/write
Replace PDF images with OPI links
optimizePDF
boolean
read/write
If true, optimize the exported PDF
outputCondition
string or one of the following constants:
read/write
PDF/X output condition.
Name:
Decimal:
OutputCondition.cgatstr001
1329808199
OutputCondition.custom
1131639917
pageInformationMarks
boolean
read/write
Prints the filename, page number, current date and time and color separation name
pageMarksOffset
number or measurement string
read/write
How far from the edge of the page InDesign will draw page marks.
parent
application
read only
he PDFExportPreset’s parent
read/write
Specifies how to represent the color information in the exported PDF.
read/write
Destination color profile
read/write
he type of PDF printer’s mark to use
pdfColorSpace
pdfDestinationProfile pdfMarkType
898
Name:
Decimal:
PDFColorSpace.rgb
1666336578
PDFColorSpace.cmyk
1129142603
PDFColorSpace.unchangedColorSpace
1970161251
string Name:
Decimal:
MarkTypes.default
1147563124
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
pdfxProfile
color profile name as string or one of the following constants:
read/write
PDF/X color profile.
read/write
he weight of the printer mark
printerMarkWeight
Name:
Decimal:
PDFProfileSelector.useCompositeProfile
1668236368
PDFProfileSelector.useMonitorProfile
1836008528
PDFProfileSelector.useNoProfile
1851868240
PDFProfileSelector.useSeparationProfile
1936016464
Name:
Decimal:
PDFMarkWeight.p125pt
825374064
PDFMarkWeight.p25pt
842346608
PDFMarkWeight.p50pt
892350576
PDFMarkWeight.p10mm
825257325
PDFMarkWeight.p15mm
825585005
PDFMarkWeight.p20mm
842034541
PDFMarkWeight.p30mm
858811757
registrationMarks
boolean
read/write
Adds small ‘targets’ outside the page area for aligning the different separations
simulateOverprint
boolean
read/write
If true, simulate overprint
Name:
Decimal:
read/write
PDF/X Standards compliance.
PDFXStandards.none
1852796517
standardsCompliance
PDFXStandards.pdfx1a2001Standard
1396912481
PDFXStandards.pdfx32002Standard
1396922419
subsetFontsBelow
integer
read/write
he threshold point at which InDesign embeds all characters of a font
thresholdToCompressColor
integer
read/write
Dots per inch threshold which causes color image compression.
thresholdToCompressGray
integer
read/write
Dots per inch threshold which causes gray image compression.
thresholdToCompressMonochrome
integer
read/write
Dots per inch threshold which causes monochrome image compression.
useDocumentBleedWithPDF
boolean
read/write
If true, use the document bleed area in the PDF.
viewPDF
boolean
read/write
If true, open the PDF file ater exporting
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
remove
None
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 899
pdfExportPresets Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of PDFExportPresets
Methods Method:
Parameters:
Return:
Description:
add
None
pdfExportPreset
Create a new PDF export preset.
anyItem
None
object
Returns any PDFExportPreset.
firstItem
None
object
Returns the first PDFExportPreset.
objects
Returns the PDFExportPresets within the specified range.
itemByRange
Name:
Type:
Description:
from
pdfExportPreset object, number (index of the object in its containing object), or string (name of the object)
he pdfExportPreset at the start of the range.
to
pdfExportPreset object, number (index of the object in its containing object), or string (name of the object)
he pdfExportPreset at the end of the range.
lastItem
None
object
Returns the last PDFExportPreset.
middleItem
None
object
Returns the middle PDFExportPreset.
object
Returns the next PDFExportPreset.
object
Returns the previous PDFExportPreset.
nextItem
previousItem
900
Name:
Type:
Description:
obj
object
he PDFExportPreset before the one desired.
Name:
Type:
Description:
obj
object
he PDFExportPreset ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
pdfPlacePreference Properties Property:
Type:
Access:
Description:
openDocumentPassword
string
read/write
When opening the exported PDF, the user will be asked for this password. You can only set this value. Getting the value will always fail.
pageNumber
integer
read/write
Which page of the PDF should be placed.
parent
application
read only
he PDFPlacePreference’s parent.
read/write
Specifies how much of the PDF page to place.
read/write
If true, the background of the PDF is transparent.
pdfCrop
transparentBackground
Name:
Decimal:
PDFCrop.cropContent
1131573315
PDFCrop.cropArt
1131573313
PDFCrop.cropPDF
1131573328
PDFCrop.cropTrim
1131573332
PDFCrop.cropBleed
1131573314
PDFCrop.cropMedia
1131573325
boolean
InDesign CS Scripting Guide JavaScript Reference 901
pdfs Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of PDFs
Methods Method:
Parameters:
Return:
Description:
anyItem
None
pdf
Returns any PDF.
firstItem
None
pdf
Returns the first PDF.
pdf
Returns the PDF with the specified ID.
pdfs
Returns the PDFs within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
pdf object or number (index of the object in its containing object)
he pdf at the start of the range.
to
pdf object or number (index of the object in its containing object)
he pdf at the end of the range.
lastItem
None
pdf
Returns the last PDF.
middleItem
None
pdf
Returns the middle PDF.
pdf
Returns the next PDF.
pdf
Returns the previous PDF.
nextItem
previousItem
902
Name:
Type:
Description:
obj
pdf
he pdf before the one desired.
Name:
Type:
Description:
obj
pdf
he pdf ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
percentCombobox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
editValue
number
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the percent combobox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
stringList
array of strings
read/write
A list of the strings that appear on the menu of the control.
InDesign CS Scripting Guide JavaScript Reference 903
percentComboboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of percent comboboxes
Methods Method:
Parameters:
Return:
Description:
add
None
percentCombobox
Create a new percent combobox.
anyItem
None
object
Returns any percent combobox.
firstItem
None
object
Returns the first percent combobox.
object
Returns the percent combobox with the specified ID.
objects
Returns the percent comboboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
percentCombobox object or number (index of the object in its containing object)
he percentCombobox at the start of the range.
to
percentCombobox object or number (index of the object in its containing object)
he percentCombobox at the end of the range.
lastItem
None
object
Returns the last percent combobox.
middleItem
None
object
Returns the middle percent combobox.
object
Returns the next percent combobox.
object
Returns the previous percent combobox.
nextItem
previousItem
904
Name:
Type:
Description:
obj
object
he percent combobox before the one desired.
Name:
Type:
Description:
obj
object
he percent combobox ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
percentEditbox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
editValue
number
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the percent editbox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
InDesign CS Scripting Guide JavaScript Reference 905
percentEditboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of percent editboxes
Methods Method:
Parameters:
Return:
Description:
add
None
percentEditbox
Create a new percent editbox.
anyItem
None
object
Returns any percent editbox.
firstItem
None
object
Returns the first percent editbox.
object
Returns the percent editbox with the specified ID.
objects
Returns the percent editboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
percentEditbox object or number (index of the object in its containing object)
he percentEditbox at the start of the range.
to
percentEditbox object or number (index of the object in its containing object)
he percentEditbox at the end of the range.
lastItem
None
object
Returns the last percent editbox.
middleItem
None
object
Returns the middle percent editbox.
object
Returns the next percent editbox.
object
Returns the previous percent editbox.
nextItem
previousItem
906
Name:
Type:
Description:
obj
object
he percent editbox before the one desired.
Name:
Type:
Description:
obj
object
he percent editbox ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
pict Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scale of the page item relative to its containing page item
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item
absoluteVerticalScale
number
read/write
he vertical scale of the page item relative to its containing page item
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he blend mode used to combine the object’s color with the background
blendMode
clippingPath featherCornerType
featherMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
clippingPathSettings Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
read only
he clipping path settings
read/write
he type of feathering to apply
read/write
he feather mode
featherWidth
number
read/write
he width of the feathering
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
horizontalScale
number
read/write
he scale percentage in the horizontal direction
id
integer
read only
he pict’s unique id
imageTypeName
string
read only
he type of image
InDesign CS Scripting Guide JavaScript Reference 907
Property:
Type:
Access:
Description:
index
integer
read only
index of the pict within its parent XML element, pageItem, oval, rectangle, polygon, graphicline, state, group or button
isolateBlending
boolean
read/write
Indicates whether the object should blend in isolation
itemLink
link
read only
link to a placed file
knockoutGroup
boolean
read/write
Indicates whether the object is a knockout group
label
string
read/write
A label that can be set to any string
read/write
he display settings for this page item
localDisplaySetting
Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
nonprinting
boolean
read/write
Whether the page item is non-printing
opacity
number
read/write
he opacity of the object
parent
object
read only
he pict’s parent as XML element, pageItem, oval, rectangle, polygon, graphicline, state, group or button
rotationAngle
number
read/write
Angle of rotation
read/write
he blend mode to use for drawing the shadow
shadowBlendMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
shadowBlurRadius
number
read/write
he radius of the blur to apply to the shadow
shadowColor
swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the shadow
shadowxOffset
number
read/write
he horizontal offset of the shadow
shadowyOffset
number
read/write
he vertical offset of the shadow
shearAngle
number
read/write
he shear angle of the page item relative to the spread
908
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
textWrapPreferences
textWrapPreference
read only
he text wrap preferences
verticalScale
number
read/write
he scale percentage in the vertical direction
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
Methods Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
insertLabel
move
Return:
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
InDesign CS Scripting Guide JavaScript Reference 909
Method: place
remove
910
Parameters: Name:
Type:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
None
JavaScript Reference
InDesign CS Scripting Guide
Description:
Return:
Description:
object
Place a file.
nothing
Deletes the object.
Method: resize
Parameters: Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Return:
Description:
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
InDesign CS Scripting Guide JavaScript Reference 911
Method: rotate
912
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Rotate the page item.
Method: shear
store
unlink
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
InDesign CS Scripting Guide JavaScript Reference 913
picts Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of picts
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any pict.
firstItem
None
object
Returns the first pict.
object
Returns the pict with the specified ID.
objects
Returns the picts within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
pict object or number (index of the object in its containing object)
he pict at the start of the range.
to
pict object or number (index of the object in its containing object)
he pict at the end of the range.
lastItem
None
object
Returns the last pict.
middleItem
None
object
Returns the middle pict.
object
Returns the next pict.
object
Returns the previous pict.
nextItem
previousItem
914
Name:
Type:
Description:
obj
object
he pict before the one desired.
Name:
Type:
Description:
obj
object
he pict ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
polygon Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item.
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item.
absoluteVerticalScale
number
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he type of content
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
blendMode
contentType
cornerEffect
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Name:
Decimal:
ContentType.unassigned
1970168179
ContentType.graphicType
1735553140
ContentType.textType
1952412773
Name:
Decimal:
CornerEffects.none
1852796517
CornerEffects.roundedCorner
1667592804
CornerEffects.inverseRoundedCorner
1667591798
CornerEffects.insetCorner
1667591795
CornerEffects.bevelCorner
1667588726
CornerEffects.fancyCorner
1667589742
InDesign CS Scripting Guide JavaScript Reference 915
Property:
Type:
Access:
Description:
cornerRadius
number
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs.
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
endCap
endJoin
epss
Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
epss
featherCornerType
featherMode
Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
featherWidth
number
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fillTint
number
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gapColor
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gapTint
number
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradientFillAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientFillLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
916
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradientStrokeAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientStrokeLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
graphicLines
graphicLines
read only
All graphic lines
graphics
graphics
read only
All graphics
groups
groups
read only
groups
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
images
images
read only
images
index
integer
read only
index of the polygon within its parent spread, master spread, pageItem, oval, rectangle, polygon, graphicline, group, state, document, layer, page, button, textFrame, story, text, character, word, line, textcolumn, paragraph, textStyleRange, cell, table or insertion point
isolateBlending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
itemLayer
layer
read/write
he layer containing the page item.
knockoutGroup
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
letLineEnd
Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
InDesign CS Scripting Guide JavaScript Reference 917
Property: localDisplaySetting
Type: Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
Access:
Description:
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miterLimit
number
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
movies
movies
read only
Every movie
nonprinting
boolean
read/write
If true, the page item is non-printing.
opacity
number
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the page item will overprint.
overprintGap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprintStroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overriddenMasterPageItem
pageItem
read only
A reference to the master page item linked to the page item (if any).
pageItems
pageItems
read only
All page items
parent
object
read only
he parent of the page item.
paths
paths
read only
All paths
pdfs
pdfs
read only
PDFs.
picts
picts
read only
Picts.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rightLineEnd
918
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rotationAngle
number
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadowBlendMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
shadowBlurRadius
number
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadowColor
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadowxOffset
number
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadowyOffset
number
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shearAngle
number
read/write
he shear angle applied to the page item.
sounds
sounds
read only
Every sound
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
strokeAlignment
Name:
Decimal:
StrokeAlignment.centerAlignment
1936998723
StrokeAlignment.insideAlignment
1936998729
StrokeAlignment.outsideAlignment
1936998735
InDesign CS Scripting Guide JavaScript Reference 919
Property:
Type:
Access:
Description:
strokeColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
strokeCornerAdjustment
Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
strokeDashAndGap
array of measurement strings or numbers as [dash, gap, dash, gap,...]
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
strokeTint
number
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
strokeType
strokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
strokeWeight
number
read/write
he weight (in points) of the stroke applied to the page item.
textFrames
textFrames
read only
text Frames
textPaths
textPaths
read only
All text paths
textWrapPreferences
textWrapPreference
read only
he text wrap applied to the page item.
verticalScale
number
read/write
he vertical scaling percentage of the page item.
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
wmfs
wmfs
read only
WMFs.
Methods Method: addPath
Parameters: Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
pageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (objects>p athfinder>Add).
bringForward
None
nothing
Brings the object forward.
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
pageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (objects>pathfinder> Exclude Overlap).
excludeOverlapPath
920
Name:
Type:
Description:
with
objects
he objects to exclude.
JavaScript Reference
InDesign CS Scripting Guide
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
fit
insertLabel
intersectPath
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Fits content within the frame.
nothing
Sets the string associated with the given key (label name).
pageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (objects>pathfinder>Intersect).
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
Return:
Name:
Decimal:
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions. proportionally
1667591779
FitOptions. contentToFrame
1668247152
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
he objects to intersect with.
InDesign CS Scripting Guide JavaScript Reference 921
Method:
Parameters:
makeCompoundPath
Name:
Type:
Description:
with
objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
minusBack
move
override
place
placeXML
922
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
pageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
pageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (objects>pathfi nder>Minus Back).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
pageItem
Overrides an item from the master page and places it on the page.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
Method:
Parameters:
Return:
Description:
releaseCompoundPath
None
objects
release compound path.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
resize
Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
InDesign CS Scripting Guide JavaScript Reference 923
Method: rotate
select
Parameters: Name:
Type:
Description:
by
number
angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
[consideringCurrentRotation]
boolean
if true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
if true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
if true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Rotate the page item.
nothing
Select this polygon.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
924
JavaScript Reference
InDesign CS Scripting Guide
Method: shear
store
subtractPath
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
pageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (objects>pathfinder>Subtract).
InDesign CS Scripting Guide JavaScript Reference 925
Method: unlink
Parameters: Name: from
926
JavaScript Reference
Type:
Description:
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
polygonPreference Properties Property:
Type:
Access:
Description:
insetPercentage
integer
read/write
he default star inset percentage for new polygons.
numberOfSides
integer
read/write
he default number of sides for new polygons.
parent
object
read only
he parent of the object.
InDesign CS Scripting Guide JavaScript Reference 927
polygons Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of polygons
Methods Method: add
Parameters: Name:
Type:
Description:
[layer]
layer object or layer name as string
he layer on which to create the polygon as layer.
[numberOfSides]
integer
he number of sides for the polygon.
[insetPercentage]
number
he star inset percentage for the polygon.
[at]
[reference]
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
polygon
Create a new polygon.
Location.
Before/ater this polygon or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
anyItem
None
object
Returns any polygon.
firstItem
None
object
Returns the first polygon.
object
Returns the polygon with the specified ID.
objects
Returns the polygons within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
polygon object or number (index of the object in its containing object)
he polygon at the start of the range.
to
polygon object or number (index of the object in its containing object)
he polygon at the end of the range.
lastItem
None
object
Returns the last polygon.
middleItem
None
object
Returns the middle polygon.
object
Returns the next polygon.
nextItem
928
Name:
Type:
Description:
obj
object
he polygon before the one desired.
JavaScript Reference
InDesign CS Scripting Guide
Method: previousItem
Parameters: Name:
Type:
Description:
obj
object
he polygon ater the one desired.
Return:
Description:
object
Returns the previous polygon.
InDesign CS Scripting Guide JavaScript Reference 929
printerPreset Properties Property:
Type:
Access:
Description:
allPrinterMarks
boolean
read/write
If true, print all types of printer’s marks
blackAngle
number
read/write
he angle of the black ink
blackFrequency
number
read/write
he frequency of the black ink
bleedBottom
measurement string or number
read/write
Amount to image below the defined page size as Unit (number or string)
bleedInside
measurement string or number
read/write
Amount to image inside the defined page size as Unit (number or string)
bleedMarks
boolean
read/write
Adds fine rules that define the amount of extra area to image outside the define page size
bleedOutside
measurement string or number
read/write
Amount to image outside the defined page size as Unit (number or string)
bleedTop
measurement string or number
read/write
Amount to image above the defined page size as Unit (number or string)
collating
boolean
read/write
Should printed copies be collated?
colorBars
boolean
read/write
Adds small squares of color representing the CMYK inks and tints of gray in 10% increments
read/write
he color output mode used to print
colorOutput
Name:
Decimal:
ColorOutputModes.compositeLeaveUnchanged
1668107349
ColorOutputModes.compositeGray
1668116583
ColorOutputModes.compositeRGB
1668108866
ColorOutputModes.compositeCMYK
1668105035
ColorOutputModes.separations
1936027745
ColorOutputModes.inRIPSeparations
1919512691
compositeAngle
number
read/write
he angle of the composite gray ink
compositeFrequency
number
read/write
he frequency of the composite gray ink
copies
integer
read/write
he number of copies of a document to be printed
crd
string
read/write
he color-rendering dictionary to use. Either one the CRD enumerations or a CRD name as idcolorRenderingDictionary or string
cropMarks
boolean
read/write
Adds fine horizontal and vertical rules that define where the page should be trimmed
cyanAngle
number
read/write
he angle of the cyan ink
cyanFrequency
number
read/write
he frequency of the cyan ink
Name:
Decimal:
read/write
he format of data sent to the printer.
DataFormat.ascii
1095975753
DataFormat.binary
1114534521
dataFormat
downloadppdFonts
boolean
read/write
If true, download PPD fonts
flattenerPresetName
string
read/write
he transparency flattener preset name
930
JavaScript Reference
InDesign CS Scripting Guide
Property: flip
fontDownloading
Type: Name:
Decimal:
Flip.none
1852796517
Flip.horizontal
1752134266
Flip.vertical
1986359924
Flip.horizontalAndVertical
1215977068
Name:
Decimal:
FontDownloading.none
1852796517
FontDownloading.complete
2003332197
FontDownloading.subset
1768842098
FontDownloading.subsetLarge
1818325607
Access:
Description:
read/write
he type of flip
read/write
Control how fonts are downloaded to the printer
ignoreSpreadOverrides
boolean
read/write
If true, ignore flattener spread overrides
includeSlugToPrint
boolean
read/write
If true, include the slug area to print.
index
integer
read only
index of the printer preset within its parent application
read/write
he rendering intent
intent
Name:
Decimal:
RenderingIntent.useColorSettings
1380541299
RenderingIntent.perceptual
1380544611
RenderingIntent.saturation
1380545377
RenderingIntent.relativeColorimetric
1380545123
RenderingIntent.absoluteColorimetric
1380540771
magentaAngle
number
read/write
he angle of the magenta ink
magentaFrequency
number
read/write
he frequency of the magenta ink
Name:
read/write
line weight of the printer’s mark
read/write
Amount to offset the page marks from the edge of the defined page size
read/write
he type of printer’s mark to use
markLineWeight
markOffset markType
Decimal:
MarkLineWeight.p125pt
825374064
MarkLineWeight.p25pt
842346608
MarkLineWeight.p50pt
892350576
MarkLineWeight.p05mm
808807789
MarkLineWeight.p07mm
808938861
MarkLineWeight.p10mm
825257325
MarkLineWeight.p15mm
825585005
MarkLineWeight.p20mm
842034541
MarkLineWeight.p30mm
858811757
number Name:
Decimal:
MarkTypes.default
1147563124
name
string
read/write
he name of the printer preset
negative
boolean
read/write
If true, print as negative
omitBitmaps
boolean
read/write
Replace bitmap images with OPI links
omitEPS
boolean
read/write
Replace EPS images with OPI links
omitPDF
boolean
read/write
Replace PDF images with OPI links
opiImageReplacement
boolean
read/write
If true, print graphics that are either linked using OPI comments or OPI comments stored in imported EPS files
pageInformationMarks
boolean
read/write
Prints the filename, page number, current date and time and color separation name
InDesign CS Scripting Guide JavaScript Reference 931
Property: pagePosition
Type: Name:
Decimal:
PagePositions.upperLet
1668183118
PagePositions.centerHorizontally
1668183112
PagePositions.centerVertically
1668183126
PagePositions.centered
1668183106
Access:
Description:
read/write
Where to position the page
paperGap
number
read/write
he amount of custom paper gap
paperHeight
measurement string or number
read/write
he custom paper height. Either one of the paper size enumerations or a value as idPaperSize or string
paperOffset
number
read/write
he amount of custom paper offset
paperSize
measurement string or number
read/write
he paper size. Either one of the paper size enumerations or a paper size name as idPaperSizes or string
paperSizeList
array of strings
read only
All available paper sizes as Array of strings
paperTransverse
boolean
read/write
If true, transverse the paper
paperWidth
measurement string or number
read/write
he custom paper width. Either one of the paper size enumerations or a value as idPaperSize or number
parent
application
read only
he printer preset’s parent
read/write
he level of PostScript to send to the printer
ppd name as string
read/write
Current PPD. Either one the PPD enumerations or a PPD model name as idPPDValues or string
ppdList
array of strings
read only
All available PPDs as Array of strings
printBlack
boolean
read/write
If true, print the black ink
printBlankPages
boolean
read/write
If true, print blank pages
printCyan
boolean
read/write
If true, print the cyan ink
printer
printer name as string
read/write
Current printer. Either to file or a printer name as idPrinter or string
printerList
array of strings
read only
All available printers as Array of strings
printFile
string
read/write
he path to the file used when printing to disk
printGuidesGrids
boolean
read/write
If true, print visible guides and baseline grids
printMagenta
boolean
read/write
If true, print the magenta ink
printMasterPages
boolean
read/write
If true, print master pages
printNonprinting
boolean
read/write
If true, print nonprinting objects
Name:
read/write
he orientation of the printed page
postScriptLevel
ppd
printPageOrientation
Name:
Decimal:
PostScriptLevels.level2
1347636274
PostScriptLevels.level3
1347636275
Decimal:
PrintPageOrientation.portrait
1751738216
PrintPageOrientation.landscape
2003395685
PrintPageOrientation.reversePortrait
1869771376
PrintPageOrientation.reverseLandscape
1869771372
printSpreads
boolean
read/write
If true, print spreads
printYellow
boolean
read/write
If true, print the yellow ink
profile
string
read/write
he color profile to use. Either one the idProfile enumerations or a profile name as idProfile or string
932
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
registrationMarks
boolean
read/write
Adds small ‘targets’ outside the page area for aligning the different separations
reverseOrder
boolean
read/write
If true, print in reverse order
scaleHeight
number
read/write
he percentage of scale to apply to the height of a page when printing
read/write
How to scale the page
scaleMode
Name:
Decimal:
ScaleModes.scaleWidthHeight
1935898745
ScaleModes.scaleToFit
1935897702
scaleProportional
boolean
read/write
If true, scale the width and height proportionally
scaleWidth
number
read/write
he percentage of scale to apply to the width of a page when printing
screening
string
read/write
he ink screening to use as idScreeening or string
screeningList
array of strings
read only
All available ink screenings in the PPD as Array of strings
read/write
Controls how much image data to send to the printer
read/write
Whether to print odd pages, even pages or both
read/write
If true, simulate overprint
read/write
he CMS source
sendImageData
sequence
simulateOverprint sourceSpace
Name:
Decimal:
ImageDataTypes.allImageData
1853058416
ImageDataTypes.optimizedSubsampling
1869640563
ImageDataTypes.proxyImageData
1819243130
ImageDataTypes.none
1852796517
Name:
Decimal:
Sequences.all
1634495520
Sequences.odd
1868850208
Sequences.even
1702258030
boolean Name:
Decimal:
SourceSpaces.useDocument
1967419235
SourceSpaces.proofSpace
1886548848
textAsBlack
boolean
read/write
If true, print text as black
thumbnails
boolean
read/write
If true, print thumbnails
Name:
Decimal:
read/write
humbnails per page.
humbsPerPage.k1x2
1949399090
humbsPerPage.k2x2
1949464626
humbsPerPage.k3x3
1949530163
humbsPerPage.k4x4
1949595700
humbsPerPage.k5x5
1949661237
humbsPerPage.k6x6
1949726774
humbsPerPage.k7x7
1949792311
thumbnailsPerPage
tile
boolean
read/write
If true, tile pages
tilingOverlap
number
read/write
he amount of tiling overlap for Auto or Auto Justified tiling
read/write
he type of tiling
tilingType
Name:
Decimal:
TilingTypes.auto
1635019116
TilingTypes.autoJustified
1634366324
TilingTypes.manual
1835955308
InDesign CS Scripting Guide JavaScript Reference 933
Property: trapping
Type: Name:
Decimal:
Trapping.off
1330005536
Trapping.applicationBuiltin
1114199152
Trapping.adobeInRIP
1919512660
Access:
Description:
read/write
he type of trapping
useDocumentBleedToPrint
boolean
read/write
If true, use the document bleed area to print.
yellowAngle
number
read/write
he angle of the yellow ink
yellowFrequency
number
read/write
he frequency of the yellow ink
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
remove
None
nothing
Deletes the object.
934
JavaScript Reference
InDesign CS Scripting Guide
printerPresets Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of printer presets
Methods Method:
Parameters:
Return:
Description:
add
None
printerPreset
Create a new printer preset.
anyItem
None
object
Returns any printer preset.
firstItem
None
object
Returns the first printer preset.
objects
Returns the printer presets within the specified range.
itemByRange
Name:
Type:
Description:
from
printerPreset object, number (index of the object in its containing object), or string (name of the object)
he printerPreset at the start of the range.
to
printerPreset object, number (index of the object in its containing object), or string (name of the object)
he printerPreset at the end of the range.
lastItem
None
object
Returns the last printer preset.
middleItem
None
object
Returns the middle printer preset.
object
Returns the next printer preset.
object
Returns the previous printer preset.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he printer preset before the one desired.
Name:
Type:
Description:
obj
object
he printer preset ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 935
printPreference Properties Property:
Type:
Access:
activePrinterPreset
printerPreset object or printer preset name as string
read/write
Current printer preset.
allPrinterMarks
boolean
read/write
If true, print all types of printer’s marks.
blackAngle
number
read/write
he haltone screen angle used to print black ink.
blackFrequency
number
read/write
he haltone screen frequency of the black ink.
bleedBottom
measurement string or number
read/write
Bleed amount to add at the bottom of the page.
bleedInside
measurement string or number
read/write
Bleed amount to add at the inside of the page.
bleedMarks
boolean
read/write
If true, add fine rules that define the bleed area outside the page size.
bleedOutside
measurement string or number
read/write
Bleed amount to add at the outside of the page.
bleedTop
measurement string or number
read/write
Bleed amount to add at the top of the page.
collating
boolean
read/write
If true, printed copies will be collated.
colorBars
boolean
read/write
If true, print small squares of filled with CMYK inks and tints of gray outside the page area (in the bleed area).
read/write
he color output mode used to print.
colorOutput
Name:
Decimal:
ColorOutputModes.compositeLeaveUnchanged
1668107349
ColorOutputModes.compositeGray
1668116583
ColorOutputModes.compositeRGB
1668108866
ColorOutputModes.compositeCMYK
1668105035
ColorOutputModes.separations
1936027745
ColorOutputModes.inRIPSeparations
1919512691
Description:
compositeAngle
number
read/write
he haltone screen angle used to print composite gray ink.
compositeFrequency
number
read/write
he haltone screen frequency used to print composite gray ink.
copies
integer
read/write
he number of copies to print.
crd
string
read/write
he color-rendering dictionary to use. Either one the CRD enumerations or a CRD name as idcolorRenderingDictionary or string
cropMarks
boolean
read/write
If true, InDesign prints fine horizontal and vertical rules that indicate where the page should be trimmed.
cyanAngle
number
read/write
he haltone screen angle used to print cyan ink.
cyanFrequency
number
read/write
he haltone screen frequency of the cyan ink.
read/write
he format of data sent to the printer.
dataFormat
Name:
Decimal:
DataFormat.ascii
1095975753
DataFormat.binary
1114534521
downloadppdFonts
boolean
read/write
If true, download PPD fonts
flattenerPresetName
string
read/write
he transparency flattener preset name
936
JavaScript Reference
InDesign CS Scripting Guide
Property: flip
fontDownloading
Type: Name:
Decimal:
Flip.none
1852796517
Flip.horizontal
1752134266
Flip.vertical
1986359924
Flip.horizontalAndVertical
1215977068
Name:
Decimal:
FontDownloading.none
1852796517
FontDownloading.complete
2003332197
FontDownloading.subset
1768842098
FontDownloading.subsetLarge
1818325607
Access:
Description:
read/write
he type of flip.
read/write
he method used to download fonts to the printer.
ignoreSpreadOverrides
boolean
read/write
If true, ignore flattener spread overrides.
includeSlugToPrint
boolean
read/write
If true, print the slug area.
read/write
he rendering intent.
intent
Name:
Decimal:
RenderingIntent.useColorSettings
1380541299
RenderingIntent.perceptual
1380544611
RenderingIntent.saturation
1380545377
RenderingIntent.relativeColorimetric
1380545123
RenderingIntent.absoluteColorimetric
1380540771
magentaAngle
number
read/write
he haltone screen angle used to print magenta ink.
magentaFrequency
number
read/write
he haltone screen frequency of the magenta ink.
read/write
line weight of the printer’s marks.
read/write
Amount to offset the page marks from the edge of the defined page size.
read/write
he type of printer’s mark to use.
markLineWeight
markOffset markType
Name:
Decimal:
MarkLineWeight.p125pt
825374064
MarkLineWeight.p25pt
842346608
MarkLineWeight.p50pt
892350576
MarkLineWeight.p05mm
808807789
MarkLineWeight.p07mm
808938861
MarkLineWeight.p10mm
825257325
MarkLineWeight.p15mm
825585005
MarkLineWeight.p20mm
842034541
MarkLineWeight.p30mm
858811757
number Name:
Decimal:
MarkTypes.default
1147563124
negative
boolean
read/write
If true, print as negative.
omitBitmaps
boolean
read/write
If true, omit bitmap images in the PDF (but include OPI link information for the omitted images).
omitEPS
boolean
read/write
Replace EPS images with OPI links
omitPDF
boolean
read/write
Replace PDF images with OPI links
opiImageReplacement
boolean
read/write
If true, print graphics that are either linked using OPI comments or OPI comments stored in imported EPS files
pageInformationMarks
boolean
read/write
If true, print the filename, page number, current date and time and color separation name in the bleed area.
InDesign CS Scripting Guide JavaScript Reference 937
Property: pagePosition
Type: Name:
Decimal:
PagePositions.upperLet
1668183118
PagePositions.centerHorizontally
1668183112
PagePositions.centerVertically
1668183126
PagePositions.centered
1668183106
Access:
Description:
read/write
Where to position the page relative to the paper dimensions.
pageRange
page range as string
read/write
he range of pages to print.
paperGap
number
read/write
he amount of custom paper gap.
paperHeight
measurement string or number
read/write
he custom paper height. Either one of the paper size constants or a value.
paperOffset
number
read/write
he amount of custom paper offset.
paperSize
measurement string or number
read/write
he paper size. Either one of the paper size constants or a paper size name.
paperSizeList
array of strings
read only
A list of the names of the available paper sizes.
paperTransverse
boolean
read/write
If true, rotate the image of the page 90 degrees when printing.
paperWidth
measurement string or number
read/write
he custom paper width. Either one of the paper size constants or a value (in points).
parent
object
read only
he parent of the object.
read/write
he level of PostScript to send to the printer
postScriptLevel
Name:
Decimal:
PostScriptLevels.level2
1347636274
PostScriptLevels.level3
1347636275
ppd
ppd name as string
read/write
Current PPD. Either one the PPD enumerations or a PPD model name as idPPDValues or string
ppdList
array of strings
read only
All available PPDs as Array of strings
printBlack
boolean
read/write
If true, print the black ink.
printBlankPages
boolean
read/write
If true, print blank pages.
printCyan
boolean
read/write
If true, print the cyan ink.
printer
printer name as string
read/write
he current printer. Either to file or a printer name.
printerList
array of strings
read only
A list of the names of available printers.
printFile
string
read/write
he path to the file used when printing to disk.
printGuidesGrids
boolean
read/write
If true, print visible guides and baseline grids.
printMagenta
boolean
read/write
If true, print the magenta ink.
printMasterPages
boolean
read/write
If true, print master pages.
printNonprinting
boolean
read/write
If true, print non-printing objects.
printPageOrientation
Name:
Decimal:
read/write
he orientation of the printed page.
PrintPageOrientation.portrait
1751738216
PrintPageOrientation.landscape
2003395685
PrintPageOrientation.reversePortrait
1869771376
PrintPageOrientation.reverseLandscape
1869771372
boolean
read/write
If true, print spreads.
printYellow
boolean
read/write
If true, print the yellow ink.
profile
string
read/write
he color profile to use. Either one the idProfile constants or a profile name.
registrationMarks
boolean
read/write
If true, add small ‘targets’ outside the page area for aligning separations.
printSpreads
938
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
reverseOrder
boolean
read/write
If true, print in reverse order.
scaleHeight
number
read/write
he vertical scaling percentage to apply when printing.
read/write
he method used to scale the page.
scaleMode
Name:
Decimal:
ScaleModes.scaleWidthHeight
1935898745
ScaleModes.scaleToFit
1935897702
scaleProportional
boolean
read/write
If true, scale the width and height proportionally when printing.
scaleWidth
number
read/write
he horizontal scaling percentage to apply when printing.
screening
string
read/write
he ink screening to use.
screeningList
array of strings
read only
A list of the names of the available ink screenings in the PPD.
read/write
Sets the method used to transmit image data to the printer.
read/write
Whether to print odd pages, even pages or both.
read/write
If true, simulate overprinting in the printed document.
read/write
he CMS source.
sendImageData
sequence
simulateOverprint sourceSpace
Name:
Decimal:
ImageDataTypes.allImageData
1853058416
ImageDataTypes.optimizedSubsampling
1869640563
ImageDataTypes.proxyImageData
1819243130
ImageDataTypes.none
1852796517
Name:
Decimal:
Sequences.all
1634495520
Sequences.odd
1868850208
Sequences.even
1702258030
boolean Name:
Decimal:
SourceSpaces.useDocument
1967419235
SourceSpaces.proofSpace
1886548848
textAsBlack
boolean
read/write
If true, print all text in black.
thumbnails
boolean
read/write
If true, print thumbnails.
Name:
Decimal:
read/write
humbnails per page.
humbsPerPage.k1x2
1949399090
humbsPerPage.k2x2
1949464626
humbsPerPage.k3x3
1949530163
humbsPerPage.k4x4
1949595700
humbsPerPage.k5x5
1949661237
humbsPerPage.k6x6
1949726774
humbsPerPage.k7x7
1949792311
thumbnailsPerPage
tile
boolean
read/write
If true, tile pages when printing.
tilingOverlap
number
read/write
he amount of tiling overlap for Auto or Auto Justified tiling.
read/write
he type of tiling to use when printing.
tilingType
Name:
Decimal:
TilingTypes.auto
1635019116
TilingTypes.autoJustified
1634366324
TilingTypes.manual
1835955308
InDesign CS Scripting Guide JavaScript Reference 939
Property: trapping
Type: Name:
Decimal:
Trapping.off
1330005536
Trapping.applicationBuiltin
1114199152
Trapping.adobeInRIP
1919512660
Access:
Description:
read/write
he type of trapping to use.
useDocumentBleedToPrint
boolean
read/write
If true, print the document bleed area.
yellowAngle
number
read/write
he haltone screen angle used to print yellow ink.
yellowFrequency
number
read/write
he frequency of the yellow ink
940
JavaScript Reference
InDesign CS Scripting Guide
quitBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the Quitbehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the quit behavior.
parent
object
read only
he parent of the object.
Methods Method: extractLabel
insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 941
quitBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of Quitbehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
quitBehavior
Create a new quit behavior.
anyItem
None
object
Returns any Quitbehavior.
firstItem
None
object
Returns the first Quitbehavior.
object
Returns the Quitbehavior with the specified ID.
objects
Returns the Quitbehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
quitBehavior object, number (index of the object in its containing object), or string (name of the object)
he quitBehavior at the start of the range.
to
quitBehavior object, number (index of the object in its containing object), or string (name of the object)
he quitBehavior at the end of the range.
lastItem
None
object
Returns the last Quitbehavior.
middleItem
None
object
Returns the middle Quitbehavior.
object
Returns the next Quitbehavior.
object
Returns the previous Quitbehavior.
nextItem
previousItem
942
Name:
Type:
Description:
obj
object
he Quitbehavior before the one desired.
Name:
Type:
Description:
obj
object
he Quitbehavior ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
radiobuttonControl Properties Property:
Type:
Access:
Description:
checkedState
boolean
read/write
If true, the radiobutton control is checked.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the radiobutton control within its parent Radiobuttongroup
minWidth
number
read/write
he minimum width of the control.
parent
radiobuttonGroup
read only
he parent of the object.
staticLabel
string
read/write
he static text label of the radiobutton control.
InDesign CS Scripting Guide JavaScript Reference 943
radiobuttonControls Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of radiobutton controls
Methods Method:
Parameters:
Return:
Description:
add
None
radiobuttonControl
Create a new radiobutton control.
anyItem
None
object
Returns any radiobutton control.
firstItem
None
object
Returns the first radiobutton control.
object
Returns the radiobutton control with the specified ID.
objects
Returns the radiobutton controls within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
radiobuttonControl object or number (index of the object in its containing object)
he radiobuttonControl at the start of the range.
to
radiobuttonControl object or number (index of the object in its containing object)
he radiobuttonControl at the end of the range.
lastItem
None
object
Returns the last radiobutton control.
middleItem
None
object
Returns the middle radiobutton control.
object
Returns the next radiobutton control.
object
Returns the previous radiobutton control.
nextItem
previousItem
944
Name:
Type:
Description:
obj
object
he radiobutton control before the one desired.
Name:
Type:
Description:
obj
object
he radiobutton control ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
radiobuttonGroup Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the Radiobuttongroup within its parent dialog column, dialog row, enabling group or border panel
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
radiobuttonControls
radiobuttonControls
read only
All radio button controls
selectedButton
integer
read/write
he index of the selected radiobutton control in the group.
InDesign CS Scripting Guide JavaScript Reference 945
radiobuttonGroups Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of Radiobuttongroups
Methods Method:
Parameters:
Return:
Description:
add
None
radiobuttonGroup
Create a new radiobutton group.
anyItem
None
object
Returns any Radiobuttongroup.
firstItem
None
object
Returns the first Radiobuttongroup.
object
Returns the Radiobuttongroup with the specified ID.
objects
Returns the Radiobuttongroups within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
radiobuttonGroup object or number (index of the object in its containing object)
he radiobuttonGroup at the start of the range.
to
radiobuttonGroup object or number (index of the object in its containing object)
he radiobuttonGroup at the end of the range.
lastItem
None
object
Returns the last Radiobuttongroup.
middleItem
None
object
Returns the middle Radiobuttongroup.
object
Returns the next Radiobuttongroup.
object
Returns the previous Radiobuttongroup.
nextItem
previousItem
946
Name:
Type:
Description:
obj
object
he Radiobuttongroup before the one desired.
Name:
Type:
Description:
obj
object
he Radiobuttongroup ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
realCombobox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
editValue
number
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the real combobox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
stringList
array of strings
read/write
A list of the strings that appear on the menu of the control.
InDesign CS Scripting Guide JavaScript Reference 947
realComboboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of real comboboxes
Methods Method:
Parameters:
Return:
Description:
add
None
realCombobox
Create a new real combobox.
anyItem
None
object
Returns any real combobox.
firstItem
None
object
Returns the first real combobox.
object
Returns the real combobox with the specified ID.
objects
Returns the real comboboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
realCombobox object or number (index of the object in its containing object)
he realCombobox at the start of the range.
to
realCombobox object or number (index of the object in its containing object)
he realCombobox at the end of the range.
lastItem
None
object
Returns the last real combobox.
middleItem
None
object
Returns the middle real combobox.
object
Returns the next real combobox.
object
Returns the previous real combobox.
nextItem
previousItem
948
Name:
Type:
Description:
obj
object
he real combobox before the one desired.
Name:
Type:
Description:
obj
object
he real combobox ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
realEditbox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
editValue
number
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the real editbox within its parent dialog column, dialog row, enabling group or border panel
largeNudge
number
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
maximumValue
number
read/write
he maximum value for this control.
minimumValue
number
read/write
he minimum value for this control.
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
smallNudge
number
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
InDesign CS Scripting Guide JavaScript Reference 949
realEditboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of real editboxes
Methods Method:
Parameters:
Return:
Description:
add
None
realEditbox
Create a new real editbox.
anyItem
None
object
Returns any real editbox.
firstItem
None
object
Returns the first real editbox.
object
Returns the real editbox with the specified ID.
objects
Returns the real editboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
realEditbox object or number (index of the object in its containing object)
he realEditbox at the start of the range.
to
realEditbox object or number (index of the object in its containing object)
he realEditbox at the end of the range.
lastItem
None
object
Returns the last real editbox.
middleItem
None
object
Returns the middle real editbox.
object
Returns the next real editbox.
object
Returns the previous real editbox.
nextItem
previousItem
950
Name:
Type:
Description:
obj
object
he real editbox before the one desired.
Name:
Type:
Description:
obj
object
he real editbox after the one desired.
JavaScript Reference
InDesign CS Scripting Guide
rectangle Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item.
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item.
absoluteVerticalScale
number
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he type of content
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
blendMode
contentType
cornerEffect
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Name:
Decimal:
ContentType.unassigned
1970168179
ContentType.graphicType
1735553140
ContentType.textType
1952412773
Name:
Decimal:
CornerEffects.none
1852796517
CornerEffects.roundedCorner
1667592804
CornerEffects.inverseRoundedCorner
1667591798
CornerEffects.insetCorner
1667591795
CornerEffects.bevelCorner
1667588726
CornerEffects.fancyCorner
1667589742
InDesign CS Scripting Guide JavaScript Reference 951
Property:
Type:
Access:
Description:
cornerRadius
number
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs.
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
endCap
endJoin
epss
Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
epss
featherCornerType
featherMode
Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
featherWidth
number
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fillTint
number
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
gapColor
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gapTint
number
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradientFillAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientFillLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
952
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradientStrokeAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientStrokeLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
graphicLines
graphicLines
read only
All graphic lines
graphics
graphics
read only
All graphics
groups
groups
read only
groups
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
images
images
read only
images
index
integer
read only
index of the rectangle within its parent spread, master spread, pageItem, oval, rectangle, polygon, graphicline, group, state, document, layer, page, button, textFrame, story, text, character, word, line, textcolumn, paragraph, textStyleRange, cell, table or insertion point
isolateBlending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
itemLayer
layer
read/write
he layer containing the page item.
knockoutGroup
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
letLineEnd
Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
InDesign CS Scripting Guide JavaScript Reference 953
Property: localDisplaySetting
Type: Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
Access:
Description:
read/write
he display setting for this page item.
locked
boolean
read/write
If true, the page item is locked.
miterLimit
number
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
movies
movies
read only
Every movie
nonprinting
boolean
read/write
If true, the page item is non-printing.
opacity
number
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the page item will overprint.
overprintGap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprintStroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overriddenMasterPageItem
pageItem
read only
A reference to the master page item linked to the page item (if any).
pageItems
pageItems
read only
All page items
parent
object
read only
he parent of the page item.
paths
paths
read only
All paths
pdfs
pdfs
read only
PDFs.
picts
picts
read only
Picts.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
rightLineEnd
954
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rotationAngle
number
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadowBlendMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
shadowBlurRadius
number
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadowColor
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadowxOffset
number
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadowyOffset
number
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shearAngle
number
read/write
he shear angle applied to the page item.
sounds
sounds
read only
Every sound
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
strokeAlignment
Name:
Decimal:
StrokeAlignment.centerAlignment
1936998723
StrokeAlignment.insideAlignment
1936998729
StrokeAlignment.outsideAlignment
1936998735
InDesign CS Scripting Guide JavaScript Reference 955
Property:
Type:
Access:
Description:
strokeColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
strokeCornerAdjustment
Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
strokeDashAndGap
array of measurement strings or numbers as [dash, gap, dash, gap,...]
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
strokeTint
number
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
strokeType
strokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
strokeWeight
number
read/write
he weight (in points) of the stroke applied to the page item.
textFrames
textFrames
read only
text Frames
textPaths
textPaths
read only
All text paths
textWrapPreferences
textWrapPreference
read only
he text wrap applied to the page item.
verticalScale
number
read/write
he vertical scaling percentage of the page item.
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
wmfs
wmfs
read only
WMFs.
Methods Method: addPath
Parameters: Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
pageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (objects>p athfinder>Add).
bringForward
None
nothing
Brings the object forward.
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
pageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (objects>pathfinder> Exclude Overlap).
excludeOverlapPath
956
Name:
Type:
Description:
with
objects
he objects to exclude.
JavaScript Reference
InDesign CS Scripting Guide
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format) or one of the following constants:
he export format.
Name:
extractLabel
fit
insertLabel
intersectPath
makeCompoundPath
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label).
nothing
Fits content within the frame.
nothing
Sets the string associated with the given key (label name).
pageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (objects>pathfinder>Intersect).
pageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
given
Return:
Name:
Decimal:
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions. proportionally
1667591779
FitOptions. contentToFrame
1668247152
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
he objects to intersect with.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
InDesign CS Scripting Guide JavaScript Reference 957
Method: markup
minusBack
move
override
place
placeXML
Parameters: Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
Return:
Description:
nothing
Markup layout content with XML preserving the existing content.
pageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (objects>pathfi nder>Minus Back).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
pageItem
Overrides an item from the master page and places it on the page.
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
releaseCompoundPath
None
objects
release compound path.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
958
JavaScript Reference
InDesign CS Scripting Guide
Method:
Parameters:
Return:
Description:
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
resize
Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item.
InDesign CS Scripting Guide JavaScript Reference 959
Method: rotate
select
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Rotate the page item.
nothing
Select this rectangle.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
960
JavaScript Reference
InDesign CS Scripting Guide
Method: shear
store
subtractPath
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
pageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (objects>pathfinder>Subtract).
InDesign CS Scripting Guide JavaScript Reference 961
Method: unlink
Parameters: Name: from
962
JavaScript Reference
Type:
Description:
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
rectangles Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of rectangles
Methods Method: add
Parameters: Name:
Type:
Description:
[layer]
layer object or layer name as string
he layer on which to create the rectangle as layer.
[at]
[reference]
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
Return:
Description:
rectangle
Create a new rectangle.
Location.
object
Before/ater this rectangle or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
anyItem
None
object
Returns any rectangle.
firstItem
None
object
Returns the first rectangle.
object
Returns the rectangle with the specified ID.
objects
Returns the rectangles within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
rectangle object or number (index of the object in its containing object)
he rectangle at the start of the range.
to
rectangle object or number (index of the object in its containing object)
he rectangle at the end of the range.
lastItem
None
object
Returns the last rectangle.
middleItem
None
object
Returns the middle rectangle.
object
Returns the next rectangle.
object
Returns the previous rectangle.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he rectangle before the one desired.
Name:
Type:
Description:
obj
object
he rectangle ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 963
row Properties Property:
Type:
Access:
Description:
autoGrow
boolean
read/write
If true, the cell will expand to display its content.
bottomEdgeStrokeColor
swatch
read/write
he stroke color of the bottom edge of the cell.
bottomEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the bottom edge of the cell.
bottomEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the bottom edge of the cell.
bottomEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottomEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the bottom edge of the cell.
bottomEdgeStrokePriority
integer
read/write
he stroke priority of the bottom edge
bottomEdgeStrokeTint
number
read/write
he tint applied to the stroke of the bottom edge of the cell (-1 indicates 100%, or no tint override).
bottomEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the bottom edge of the cell.
bottomEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the bottom edge of the cell.
bottomInset
measurement string or number
read/write
he bottom inset the cell.
cells
cells
read only
cells
clipContentToCell
boolean
read/write
If true, clip the content of the cell to the boundaries of the cell.
columns
columns
read only
All columns
columnSpan
integer
read only
he number of columns that this cell spans
contents
string
read/write
he text contents of the cell.
diagonalLineInFront
boolean
read/write
If true, the diagonal line will draw in front of the contents of the cell.
diagonalLineStrokeColor
swatch
read/write
he stroke color of the diagonal line(s) applied to the cell.
diagonalLineStrokeGapColor
swatch
read/write
he gap color of the diagonal line(s).
diagonalLineStrokeGapOverprint
boolean
read/write
If true, overprint the color of the gap of the diagonal line(s).
diagonalLineStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonalLineStrokeOverprint
boolean
read/write
If true, overprint the diagonal line(s) applied to the cell.
diagonalLineStrokeTint
number
read/write
he tint applied to the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
diagonalLineStrokeType
strokeStyle
read/write
he type of stroke applied to the diagonal line(s) of the cell.
diagonalLineStrokeWeight
measurement string or number
read/write
he stroke weight of the diagonal line(s) of the cell.
964
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
fillColor
swatch object or swatch name as string
read/write
he swatch, color, gradient, tint, or mixed ink applied to the fill of the cell.
fillTint
number
read/write
he tint percentage applied to the fill of the cell (-1 indicates 100%, or no tint override).
read/write
he method used to calculate the distance from the first baseline of text in the cell and the top inset of the cell.
firstBaselineOffset
Name:
Decimal:
FirstBaseline.ascentOffset
1296135023
FirstBaseline.capHeight
1296255087
FirstBaseline.leadingOffset
1296852079
FirstBaseline.emboxHeight
1296386159
FirstBaseline.xHeight
1299728495
FirstBaseline.fixedHeight
1296451695
gradientFillAngle
number
read/write
Angle of a linear gradient on the fill
gradientFillLength
number
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
height
measurement string or number
read/write
he height of the cell.
index
integer
read only
index of the cell within its parent table.
innerColumnStrokeColor
swatch
read/write
he stroke color of the inner column of the cell.
innerColumnStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the inner column of the cell.
innerColumnStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the inner column of the cell.
innerColumnStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the inner column of the cell (-1 indicates 100%, or no tint override).
innerColumnStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the inner column of the cell.
innerColumnStrokeTint
number
read/write
he tint applied to the stroke of the inner column of the cell (-1 indicates 100%, or no tint override).
innerColumnStrokeType
strokeStyle
read/write
he type of stroke applied to the inner column of the cell.
innerColumnStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the inner column of the cell.
innerRowStrokeColor
swatch
read/write
he stroke color of the inner row of the cell.
innerRowStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the inner row of the cell.
innerRowStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the inner row
innerRowStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the inner row of the cell (-1 indicates 100%, or no tint override).
innerRowStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the inner row of the cell.
innerRowStrokeTint
number
read/write
he tint applied to the stroke of the inner row of the cell (-1 indicates 100%, or no tint override).
innerRowStrokeType
strokeStyle
read/write
he type of stroke applied to the inner row of the cell.
InDesign CS Scripting Guide JavaScript Reference 965
Property:
Type:
Access:
Description:
innerRowStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the inner row of the cell.
keepWithNextRow
boolean
read/write
If true, keep this row with the next row when the rows break between pages, text frames, or text columns.
letEdgeStrokeColor
swatch
read/write
he stroke color of the let edge of the cell.
letEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the let edge of the cell.
letEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the let edge of the cell.
letEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the let edge of the cell (-1 indicates 100%, or no tint override).
letEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the let edge of the cell.
letEdgeStrokePriority
integer
read/write
he stroke priority of the let edge
letEdgeStrokeTint
number
read/write
he tint of the color of the let edge
letEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the let edge of the cell.
letEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the let edge of the cell.
letInset
measurement string or number
read/write
he let inset of the cell.
maximumHeight
measurement string or number
read/write
Specifies the maximum height of the row containing the cell.
minimumFirstBaselineOffset
measurement string or number
read/write
he minimum distance (in points) between the first baseline of the text in the cell and the top inset of the frame or cell.
minimumHeight
measurement string or number
read/write
Constrains the row height to an amount no smaller than this value. he row may be larger than this amount, however, as the row height will continue to grow automatically as text is added.
name
string
read only
he name of the cell, in the form row number; column number. he third cell of the fourth row, for example, would have the name “R4:C3”.
overflows
boolean
read only
If true, the cell contains overset (i.e., uncomposed) text.
overprintFill
boolean
read/write
If true, overprint the fill of the cell.
paragraphSpacingLimit
measurement string or number
read/write
When the vertical justification of the cell is set to justified, this is the maximum amount of space that will be added between paragraphs. Increase this value to encourage spacing between paragraphs of vertically justified text; decrease it to increase the leading between lines of text in vertically justified text.
parent
object
read only
he parent of the object.
parentColumn
column
read only
he parent column of the cell.
parentRow
row
read only
he parent row of the cell.
rightEdgeStrokeColor
swatch
read/write
he stroke color of the right edge of the cell.
rightEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the right edge of the cell.
966
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
rightEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the right edge of the cell.
rightEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the right edge of the cell (-1 indicates 100%, or no tint override).
rightEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the right edge of the cell.
rightEdgeStrokePriority
integer
read/write
he stroke priority of the right edge
rightEdgeStrokeTint
number
read/write
he tint applied to the stroke of the right edge of the cell (-1 indicates 100%, or no tint override).
rightEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the right edge of the cell.
rightEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the right edge of the cell.
rightInset
measurement string or number
read/write
he right inset the cell.
rotationAngle
number
read/write
he rotation angle of the cell.
rows
rows
read only
All rows
rowSpan
integer
read only
he number of rows that this cell spans
read/write
he type of the row containing the cell.
read/write
Where to start the row
rowType
startRow
Name:
Decimal:
RowTypes.bodyRow
1161982583
RowTypes.headerRow
1162375799
RowTypes.footerRow
1162244727
RowTypes.mixedState
1162703479
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
textCellRotationFollowsStoryDirection
boolean
read/write
Whether text cell direction matches the story direction
topEdgeStrokeColor
swatch
read/write
he stroke color of the top edge of the cell.
topEdgeStrokeGapColor
swatch
read/write
he gap color of the stroke applied to the top edge of the cell.
topEdgeStrokeGapOverprint
boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the top edge of the cell.
topEdgeStrokeGapTint
number
read/write
he tint applied to the gap color of the stroke applied to the top edge of the cell (-1 indicates 100%, or no tint override).
topEdgeStrokeOverprint
boolean
read/write
If true, overprint the stroke applied to the top edge of the cell.
topEdgeStrokePriority
integer
read/write
he stroke priority of the top edge
topEdgeStrokeTint
number
read/write
he tint applied to the stroke of the top edge of the cell (-1 indicates 100%, or no tint override).
topEdgeStrokeType
strokeStyle
read/write
he type of stroke applied to the right edge of the cell.
InDesign CS Scripting Guide JavaScript Reference 967
Property:
Type:
Access:
Description:
topEdgeStrokeWeight
measurement string or number
read/write
he width of the stroke applied to the the top edge of the cell.
topInset
measurement string or number
read/write
he top inset the cell.
topLetDiagonalLine
boolean
read/write
If true, draw a diagonal line from the top let corner to the bottom right corner of the cell .
topRightDiagonalLine
boolean
read/write
If true, draw a diagonal line from the top right corner to the bottom let corner of the cell .
read/write
he vertical justification applied to the text in the cell.
read/write
he width of the cell.
verticalJustification
width
Name:
Decimal:
VerticalJustification.topAlign
1953460256
VerticalJustification.centerAlign
1667591796
VerticalJustification.bottomAlign
1651471469
VerticalJustification.justifyAlign
1785951334
measurement string or number
Methods Method: createOutlines
merge
redistribute
Parameters: Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original object.
Name:
Type:
Description:
with
cell
he cell to merge with.
Name:
Type:
Description:
using
[thru] remove
968
Name:
Decimal:
HorizontalOrVertical. horizontal
1752134266
HorizontalOrVertical. vertical
1986359924
object
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
objects
Create outlines from the text.
cell
Merge cells together.
nothing
Redistribute columns or rows.
nothing
Deletes the object.
Which direction to redistribute.
redistribute till this object.
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
split
Name: using
unmerge
None
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Type: Decimal:
HorizontalOrVertical. horizontal
1752134266
HorizontalOrVertical. vertical
1986359924
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Select this row.
nothing
Splits the cell horizontally or vertically.
objects
Unmerge the cells.
How to handle the existing selection.
Description:
Name:
Return:
Sets the direction in which to split the cell.
InDesign CS Scripting Guide JavaScript Reference 969
rows Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of rows
Methods Method: add
Parameters: Name: [at]
[reference]
Type:
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
row
Create a new row.
Location.
Before/ater an existing row or at the beginning/end of a parent as row or table.
anyItem
None
row
Returns any row.
firstItem
None
row
Returns the first row.
rows
Returns the rows within the specified range.
itemByRange
Name:
Type:
Description:
from
row or number (index of the object in its containing object)
he row at the start of the range.
to
row or number (index of the object in its containing object)
he row at the end of the range.
lastItem
None
row
Returns the last row.
middleItem
None
row
Returns the middle row.
row
Returns the next row.
row
Returns the previous row.
nextItem
previousItem
970
Name:
Type:
Description:
obj
row
he row before the one desired.
Name:
Type:
Description:
obj
row
he row ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
section Properties Property:
Type:
Access:
Description:
continueNumbering
boolean
read/write
If true, continue page numbering from the previous section.
id
integer
read only
A unique number identifying the object.
includeSectionPrefix
boolean
read/write
If true, include the section prefix as part of the page number.
index
integer
read only
index of the section within its parent document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
length
integer
read only
he number of pages in this section
marker
string
read/write
he section marker.
name
string
read/write
he name of the section.
pageNumberStart
integer
read/write
he number at which to start numbering pages (active when continue numbering property is set to false).
read/write
he type of numbering to use for page numbers in the section.
pageNumberStyle
Name:
Decimal:
PageNumberStyle.upperRoman
1297247605
PageNumberStyle.lowerRoman
1297247596
PageNumberStyle.upperLetters
1296855669
PageNumberStyle.lowerLetters
1296855660
PageNumberStyle.arabic
1298231906
pageStart
page
read/write
he first page in the section.
parent
document
read only
he parent of the object.
Methods Method: extractLabel
insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 971
sections Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of sections
Methods Method: add
Parameters: Name: [at]
[reference]
Type:
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
section
Create a new section.
Location.
Before/ater an existing section or at the beginning/end of a parent as section or document.
anyItem
None
object
Returns any section.
firstItem
None
object
Returns the first section.
object
Returns the section with the specified ID.
objects
Returns the sections within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
section object, number (index of the object in its containing object), or string (name of the object)
he section at the start of the range.
to
section object, number (index of the object in its containing object), or string (name of the object)
he section at the end of the range.
lastItem
None
object
Returns the last section.
middleItem
None
object
Returns the middle section.
object
Returns the next section.
object
Returns the previous section.
nextItem
previousItem
972
Name:
Type:
Description:
obj
object
he section before the one desired.
Name:
Type:
Description:
obj
object
he section ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
showHideFieldsBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
fieldsToHide
objects
read/write
he fields to hide.
fieldsToShow
objects
read/write
he fields to show.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the ShowHideFieldsbehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the show hide fields behavior.
parent
object
read only
he parent of the object.
Methods Method: extractLabel
insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 973
showHideFieldsBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of ShowHideFieldsbehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
showHideFieldsBehavior
Create a new show hide fields behavior.
anyItem
None
object
Returns any ShowHideFieldsbehavior.
firstItem
None
object
Returns the first ShowHideFieldsbehavior.
object
Returns the ShowHideFieldsbehavior with the specified ID.
objects
Returns the ShowHideFieldsbehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
showHideFieldsBehavior object, number (index of the object in its containing object), or string (name of the object)
he showHideFieldsBehavior at the start of the range.
to
showHideFieldsBehavior object, number (index of the object in its containing object), or string (name of the object)
he showHideFieldsBehavior at the end of the range.
lastItem
None
object
Returns the last ShowHideFieldsbehavior.
middleItem
None
object
Returns the middle ShowHideFieldsbehavior.
object
Returns the next ShowHideFieldsbehavior.
object
Returns the previous ShowHideFieldsbehavior.
nextItem
previousItem
974
Name:
Type:
Description:
obj
object
he ShowHideFieldsbehavior before the one desired.
Name:
Type:
Description:
obj
object
he ShowHideFieldsbehavior ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
sound Properties Property:
Type:
Access:
Description:
associatedXMLElement
xmlElement
read only
Returns the associated XML element
description
string
read/write
Description
doNotPrintPoster
boolean
read/write
Does not print the sound poster
embedInPDF
boolean
read/write
Embed content in PDF
filePath
string
read/write
he file path
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
images
images
read only
images
index
integer
read only
index of the sound within its parent pageItem, oval, rectangle or polygon
itemLayer
layer
read/write
he layer containing the page item.
itemLink
link
read only
link to a placed file
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
locked
boolean
read/write
If true, the page item is locked.
name
string
read/write
he name of the sound.
parent
object
read only
he parent of the page item.
playOnPageTurn
boolean
read/write
Play on page turn
posterFile
string
read/write
Poster file
read/write
Current poster type (‘proxy image’ is read-only)
soundPosterType
Name:
Decimal:
SoundPosterTypes.none
1852796517
SoundPosterTypes.standard
2020623970
SoundPosterTypes.proxyImage
1299216505
verticalScale
number
read/write
he vertical scaling percentage of the page item.
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method:
Parameters:
Return:
Description:
bringForward
None
nothing
Brings the object forward.
bringToFront
None
nothing
Brings the object to the top
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
extractLabel
Name:
Type:
Description:
key
string
he key.
InDesign CS Scripting Guide JavaScript Reference 975
Method: fit
Parameters: Name: given
insertLabel
markup
move
Type:
Description:
Name:
Decimal:
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions. proportionally
1667591779
FitOptions. contentToFrame
1668247152
Return:
Description:
nothing
Fits content within the frame.
nothing
Sets the string associated with the given key (label name).
nothing
Markup layout content with XML preserving the existing content.
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
he fit option to use.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
remove
None
nothing
Deletes the object.
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
976
JavaScript Reference
InDesign CS Scripting Guide
Method: resize
select
Parameters: Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
nothing
Select this sound.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
InDesign CS Scripting Guide JavaScript Reference 977
Method: store
unlink
Parameters: Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
978
JavaScript Reference
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
soundBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the soundbehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the sound behavior.
read/write
he operation to perform when the sound behavior is activated.
operation
Name:
Decimal:
PlayOperations.play
1886151033
PlayOperations.stop
1937010544
PlayOperations.pause
1885435251
PlayOperations.resume
1919251317
parent
object
read only
he parent of the object.
soundItem
sound
read/write
he sound page item.
Methods Method: extractLabel
insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 979
soundBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of soundbehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
soundBehavior
Create a new sound behavior.
anyItem
None
object
Returns any soundbehavior.
firstItem
None
object
Returns the first soundbehavior.
object
Returns the soundbehavior with the specified ID.
objects
Returns the soundbehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
soundBehavior object, number (index of the object in its containing object), or string (name of the object)
he soundBehavior at the start of the range.
to
soundBehavior object, number (index of the object in its containing object), or string (name of the object)
he soundBehavior at the end of the range.
lastItem
None
object
Returns the last soundbehavior.
middleItem
None
object
Returns the middle soundbehavior.
object
Returns the next soundbehavior.
object
Returns the previous soundbehavior.
nextItem
previousItem
980
Name:
Type:
Description:
obj
object
he soundbehavior before the one desired.
Name:
Type:
Description:
obj
object
he soundbehavior ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
sounds Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of sounds
Methods Method: add
Parameters: Name:
Type:
Description:
[layer]
layer object or layer name as string
he layer on which to create the sound as layer.
[at]
[reference]
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
sound
Create a new sound.
Location.
Before/ater this sound or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
anyItem
None
object
Returns any sound.
firstItem
None
object
Returns the first sound.
object
Returns the sound with the specified ID.
objects
Returns the sounds within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
sound object, number (index of the object in its containing object), or string (name of the object)
he sound at the start of the range.
to
sound object, number (index of the object in its containing object), or string (name of the object)
he sound at the end of the range.
lastItem
None
object
Returns the last sound.
middleItem
None
object
Returns the middle sound.
object
Returns the next sound.
object
Returns the previous sound.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he sound before the one desired.
Name:
Type:
Description:
obj
object
he sound ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 981
spellPreference Properties Property:
Type:
Access:
Description:
checkCapitalizedSentences
boolean
read/write
If true, check the spelling of capitalized sentences.
checkCapitalizedWords
boolean
read/write
If true, check the spelling of capitalized words.
checkMisspelledWords
boolean
read/write
If true, check misspelled words.
checkRepeatedWords
boolean
read/write
If true, check for repeated words.
parent
application
read only
he parent of the object.
982
JavaScript Reference
InDesign CS Scripting Guide
spread Properties Property:
Type:
Access:
Description:
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items on the spread, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
appliedMaster
masterSpread object or master spread name as string
read/write
he master spread applied to the spread.
buttons
buttons
read only
Every button
read/write
he transparency flattener override applied to the spread (if any).
flattenerOverride
Name:
Decimal:
SpreadFlattenerLevel.default
1147563124
SpreadFlattenerLevel.none
1852796517
SpreadFlattenerLevel.custom
1131639917
flattenerPreferences
flattenerPreference
read only
he transparency flattener preferences for the spread.
formFields
formFields
read only
Every form field item
graphicLines
graphicLines
read only
All graphic lines
groups
groups
read only
groups
guides
guides
read only
Every guide
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the spread within the document.
keepTogether
boolean
read/write
If true, the pages of the spread should stay together when pages are added or removed before the spread.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
ovals
ovals
read only
All ovals
pageItems
pageItems
read only
All page items
pages
pages
read only
Every page
parent
document
read only
he parent of the object.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
showMasterItems
boolean
read/write
If true, display items on the master spread.
textFrames
textFrames
read only
text Frames
InDesign CS Scripting Guide JavaScript Reference 983
Methods Method: createGuides
duplicate extractLabel
insertLabel
move
Parameters: Name:
Type:
Description:
[numberOfRows]
integer
Number of rows of guides on a page.
[numberOfColumns]
integer
Number of columns of guides on a page.
[rowGutter]
measurement string or number
he height of the gutter between rows.
[columnGutter]
measurement string or number
he width of the gutter between columns.
[guideColor]
uiColor constant or array of numbers as [r, g, b]
he guide color.
[fitMargins]
boolean
Whether the guides should fit to margins or fit to page.
[removeExisting]
boolean
If true, remove existing guides.
[layer]
layer object or layer name as string
he layer on which to create the spread as layer.
None Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[to]
[reference]
984
JavaScript Reference
Name:
Decimal:
LocationOptions.before
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions. atBeginning
1650945639
LocationOptions. unknown
1433299822
spread, page, or document
InDesign CS Scripting Guide
location.
Before/ater the spread/page or at the beginning/end of this object.
Return:
Description:
nothing
Create multiple guides on all pages of a spread.
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
spread
Move the spread before/ater another spread or page, or to the beginning/end of a document.
Method: place
Parameters: Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Return:
Description:
object
Place a file.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
InDesign CS Scripting Guide JavaScript Reference 985
spreads Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of spreads
Methods Method: add
Parameters: Name: [at]
[reference]
Type:
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Return:
Description:
spread
Create a new spread.
Location.
Before/ater an existing spread or at the beginning/end of a parent as spread or document.
anyItem
None
object
Returns any spread.
firstItem
None
object
Returns the first spread.
object
Returns the spread with the specified ID.
objects
Returns the spreads within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
spread object or number (index of the object in its containing object)
he spread at the start of the range.
to
spread object or number (index of the object in its containing object)
he spread at the end of the range.
lastItem
None
object
Returns the last spread.
middleItem
None
object
Returns the middle spread.
object
Returns the next spread.
object
Returns the previous spread.
nextItem
previousItem
986
Name:
Type:
Description:
obj
object
he spread before the one desired.
Name:
Type:
Description:
obj
object
he spread ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
state Properties Property:
Type:
Access:
Description:
active
boolean
read/write
If true, the state is the active state.
enabled
boolean
read/write
If true, the state is enabled for PDF generation.
epss
epss
read only
EPSs.
graphicLines
graphicLines
read only
All graphic lines
graphics
graphics
read only
All graphics
groups
groups
read only
groups
id
integer
read only
he state’s unique id
images
images
read only
images
index
integer
read only
index of the state within its parent button
name
string
read only
he name of the state.
ovals
ovals
read only
All ovals
pageItems
pageItems
read only
All page items
parent
button
read only
he parent of the object.
pdfs
pdfs
read only
PDFs.
picts
picts
read only
Picts.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
Name:
Decimal:
read/write
he state type of the state.
State.up
1181971566
State.rollover
1181971574
State.down
1181971556
statetype
textFrames
textFrames
read only
text Frames
wmfs
wmfs
read only
WMFs.
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 987
states Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of states
Methods Method:
Parameters:
Return:
Description:
add
None
state
Create a new state.
anyItem
None
object
Returns any state.
firstItem
None
object
Returns the first state.
object
Returns the state with the specified ID.
objects
Returns the states within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
state object, number (index of the object in its containing object), or string (name of the object)
he state at the start of the range.
to
state object, number (index of the object in its containing object), or string (name of the object)
he state at the end of the range.
lastItem
None
object
Returns the last state.
middleItem
None
object
Returns the middle state.
object
Returns the next state.
object
Returns the previous state.
nextItem
previousItem
988
Name:
Type:
Description:
obj
object
he state before the one desired.
Name:
Type:
Description:
obj
object
he state ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
staticText Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the static text within its parent dialog column, dialog row, enabling group or border panel
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
staticLabel
string
read/write
he text in the static label control.
InDesign CS Scripting Guide JavaScript Reference 989
staticTexts Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of static texts
Methods Method:
Parameters:
Return:
add
None
staticText
Create a new static text.
anyItem
None
object
Returns any static text.
firstItem
None
object
Returns the first static text.
object
Returns the static text with the specified ID.
objects
Returns the static texts within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
staticText object or number (index of the object in its containing object)
he staticText at the start of the range.
to
staticText object or number (index of the object in its containing object)
he staticText at the end of the range.
Description:
lastItem
None
object
Returns the last static text.
middleItem
None
object
Returns the middle static text.
object
Returns the next static text.
object
Returns the previous static text.
nextItem
previousItem
990
Name:
Type:
Description:
obj
object
he static text before the one desired.
Name:
Type:
Description:
obj
object
he static text ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
stories Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of stories
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any story.
firstItem
None
object
Returns the first story.
object
Returns the story with the specified ID.
objects
Returns the stories within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
story object or number (index of the object in its containing object)
he story at the start of the range.
to
story object or number (index of the object in its containing object)
he story at the end of the range.
lastItem
None
object
Returns the last story.
middleItem
None
object
Returns the middle story.
object
Returns the next story.
object
Returns the previous story.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he story before the one desired.
Name:
Type:
Description:
obj
object
he story ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 991
story Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
associatedXMLElements
objects
read only
Returns the associated XML elements
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
buttons
buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
capitalization
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
characters
characters
read only
characters
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
992
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradientStrokeAngle
number
read/write
he angle of the gradient applied to the stroke of the text.
gradientStrokeLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
graphicLines
graphicLines
read only
All graphic lines
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
groups
groups
read only
groups
InDesign CS Scripting Guide JavaScript Reference 993
Property:
Type:
Access:
Description:
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the story within its parent XML element or document
insertionPoints
insertionPoints
read only
Insertion Points
itemLink
link
read only
link to a placed file
read/write
Alignment of the paragraph containing the text.
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
label
string
read/write
A label that can be set to any string
994
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
lines
lines
read only
lines
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
openTypeFeatures
array of integers
read/write
open type features as Array of integers
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
otfFigureStyle
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
otfFraction
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
InDesign CS Scripting Guide JavaScript Reference 995
Property:
Type:
Access:
Description:
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
pointSize
number
read/write
he size of the text in points.
polygons
polygons
read only
All polygons
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
position
rectangles
rectangles
read only
All rectangles
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
996
JavaScript Reference
InDesign CS Scripting Guide
Property: ruleAboveWidth
Type: Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Access:
Description:
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
ruleBelowWidth
singleWordJustification
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
InDesign CS Scripting Guide JavaScript Reference 997
Property:
Type:
Access:
Description:
storyPreferences
storyPreference
read only
he story preferences for the story. he properties of this object correspond to the options in the story palette.
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tables
tables
read only
All tables
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
998
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
words
words
read only
words
Methods Method: changecase
Parameters: Name: using
createOutlines
Type:
Description:
Name:
Decimal:
ChangecaseMode. uppercase
1667462499
ChangecaseMode. lowercase
1667460195
ChangecaseMode. titlecase
1667462243
ChangecaseMode. sentencecase
1667461987
Return:
Description:
nothing
Change the case of text.
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Case option to use.
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original text.
InDesign CS Scripting Guide JavaScript Reference 999
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
insertLabel
markup
move
1000
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
using
xmlElement
he XML element to associate with the text.
Name:
Type:
Description:
[reference]
JavaScript Reference
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Associate the text with an XML element while preserving the existing text content.
nothing
Moves the text.
Decimal:
to
to
Return:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
InDesign CS Scripting Guide
Where to move the text, relative to the reference object (before/ater).
A text object that specifies the destination of the text you’re moving.
Method: placeXML
remove search
storyEdit
Parameters: Name:
Type:
Description:
using
xmlElement
he element to place into.
None Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
None
Return:
Description:
nothing
Places XML content from the specified element replacing the existing content.
nothing
Deletes the object.
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Edit the story in a story editor window
InDesign CS Scripting Guide JavaScript Reference 1001
storyPreference Properties Property:
Type:
Access:
Description:
opticalMarginAlignment
boolean
read/write
If true, adjust the position of characters at the edges of text columns. In general, the edges of punctuation characters will “hang” beyond the edges of the text column, but other characters are also adjusted.
opticalMarginSize
number
read/write
A point size used as a base for calculating how far characters should hang outside the margins when optical margin alginment is on.
parent
object
read only
he parent of the object.
1002
JavaScript Reference
InDesign CS Scripting Guide
storyWindow Properties Property:
Type:
Access:
Description:
bounds
array of numbers or measurement strings as [y1, x1, y2, x2]
read/write
he bounds of the storywindow, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
index
integer
read only
index of the storywindow within its parent document or application
name
string
read only
he name of the storywindow
parent
object
read only
he storywindow’s parent as document or application
selection
array of objects
read/write
he selection of the front-most window as Object, Array of objects or idNothingEnum
Methods Method:
Parameters:
Return:
Description:
bringToFront
None
nothing
Brings the object to the top
close
None
nothing
Close the storywindow
maximize
None
nothing
Maximize the window
minimize
None
nothing
Minimize the window
restore
None
nothing
Restore the window
nothing
Select one or more objects.
select
Name:
Type:
Description:
selectableItems
array of objects
he object(s) to select as Object, Array of objects or idNothingEnum.
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 1003
storyWindows Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of storywindows
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any storywindow.
firstItem
None
object
Returns the first storywindow.
objects
Returns the storywindows within the specified range.
itemByRange
Name:
Type:
Description:
from
storyWindow object, number (index of the object in its containing object), or string (name of the object)
he storyWindow at the start of the range.
to
storyWindow object, number (index of the object in its containing object), or string (name of the object)
he storyWindow at the end of the range.
lastItem
None
object
Returns the last storywindow.
middleItem
None
object
Returns the middle storywindow.
object
Returns the next storywindow.
object
Returns the previous storywindow.
nextItem
previousItem
1004
Name:
Type:
Description:
obj
object
he storywindow before the one desired.
Name:
Type:
Description:
obj
object
he storywindow after the one desired.
JavaScript Reference
InDesign CS Scripting Guide
stripedStrokeStyle Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the striped stroke style within its parent document or application
name
string
read/write
he name of the striped stroke style.
parent
object
read only
he parent of the object.
stripeArray
Array of numbers [stripe width, gap, ...]
read/write
An array defining the stripe and gap of the striped stroke style.
strokeStyleType
string
read only
he stroke style type.
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
remove
None
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 1005
stripedStrokeStyles Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of striped stroke styles
Methods Method:
Parameters:
Return:
Description:
add
None
stripedStrokeStyle
Create a new striped stroke style.
anyItem
None
object
Returns any striped stroke style.
firstItem
None
object
Returns the first striped stroke style.
object
Returns the striped stroke style with the specified ID.
objects
Returns the striped stroke styles within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
stripedStrokeStyle object, number (index of the object in its containing object), or string (name of the object)
he stripedStrokeStyle at the start of the range.
to
stripedStrokeStyle object, number (index of the object in its containing object), or string (name of the object)
he stripedStrokeStyle at the end of the range.
lastItem
None
object
Returns the last striped stroke style.
middleItem
None
object
Returns the middle striped stroke style.
object
Returns the next striped stroke style.
object
Returns the previous striped stroke style.
nextItem
previousItem
1006
Name:
Type:
Description:
obj
object
he striped stroke style before the one desired.
Name:
Type:
Description:
obj
object
he striped stroke style ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
strokeStyle Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the stroke style within its parent document or application
name
string
read/write
he name of the stroke style.
parent
object
read only
he parent of the object.
strokeStyleType
string
read only
he type of the stroke style.
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
remove
None
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 1007
strokeStyles Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of stroke styles
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any stroke style.
firstItem
None
object
Returns the first stroke style.
object
Returns the stroke style with the specified ID.
objects
Returns the stroke styles within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
strokeStyle object, number (index of the object in its containing object), or string (name of the object)
he strokeStyle at the start of the range.
to
strokeStyle object, number (index of the object in its containing object), or string (name of the object)
he strokeStyle at the end of the range.
lastItem
None
object
Returns the last stroke style.
middleItem
None
object
Returns the middle stroke style.
object
Returns the next stroke style.
object
Returns the previous stroke style.
nextItem
previousItem
1008
Name:
Type:
Description:
obj
object
he stroke style before the one desired.
Name:
Type:
Description:
obj
object
he stroke style ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
subtopic Properties Property:
Type:
Access:
Description:
index
integer
read only
index of the subtopic within its parent topic
name
string
read/write
he name of the subtopic.
parent
topic
read only
he parent of the object.
sortOrder
string
read/write
he sort order text of the subtopic.
Methods Method: move
remove
Parameters: Name:
Type:
Description:
to
integer
he location to insert.
None
Return:
Description:
subtopic
Move the subtopic to another index location in the subtopics collection.
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 1009
subtopics Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of subtopics
Methods Method: add
Parameters: Name:
Type:
Description:
name
string
Subtopic name.
[sortOrder]
string
Sort order.
Return:
Description:
subtopic
Create a new subtopic.
anyItem
None
object
Returns any subtopic.
firstItem
None
object
Returns the first subtopic.
objects
Returns the subtopics within the specified range.
itemByRange
Name:
Type:
Description:
from
subtopic object, number (index of the object in its containing object), or string (name of the object)
he subtopic at the start of the range.
to
subtopic object, number (index of the object in its containing object), or string (name of the object)
he subtopic at the end of the range.
lastItem
None
object
Returns the last subtopic.
middleItem
None
object
Returns the middle subtopic.
object
Returns the next subtopic.
object
Returns the previous subtopic.
nextItem
previousItem
1010
Name:
Type:
Description:
obj
object
he subtopic before the one desired.
Name:
Type:
Description:
obj
object
he subtopic ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
svgExportPreference Properties Property:
Type:
Access:
Description:
appliedFlattenerPreset
flattenerPreset
read/write
he flattener preset.
embedImages
boolean
read/write
If true, embed images in the exported SVG.
read/write
he file encoding to use.
read/write
Specifies how fonts are to be subset.
fileEncoding
fontSubsetting
Name:
Decimal:
FileEncoding.ascii
1095975753
FileEncoding.utf8
1937134904
FileEncoding.utf16
1937125686
Name:
Decimal:
FontSubsetting.none
1852796517
FontSubsetting.subsetGlyphs
1937134439
FontSubsetting.subsetEnglish
1937134437
FontSubsetting.subsetGlyphsAndEnglish
1937134405
FontSubsetting.subsetRoman
1937134450
FontSubsetting.subsetGlyphsAndRoman
1937134418
FontSubsetting.subsetEntire
1937134433
ignoreSpreadOverrides
boolean
read/write
If true, ignore flattener spread overrides.
pageRange
page range as string
read/write
he range of pages to export.
parent
application
read only
he svg export preference’s parent.
readersSpreads
boolean
read/write
If true, export reader’s spreads.
realPrecision
integer
read/write
Number of digits of precision for real numbers.
read/write
Rendering style.
read/write
Format to be used when specifying SVG object styles.
renderingStyle
styleFormat
Name:
Decimal:
RenderingStyle.progressive
1937134192
RenderingStyle.batch
1937134178
Name:
Decimal:
StyleFormat.inline
1937131113
StyleFormat.entity
1937131109
StyleFormat.css
1937131107
StyleFormat.presentationAttributes
1937131120
InDesign CS Scripting Guide JavaScript Reference 1011
swatch Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the swatch within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
name
string
read/write
he name of the swatch.
parent
object
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Merge one or more other swatches into this one.
nothing
Deletes the object.
extractLabel
insertLabel
merge
remove
1012
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
object or object name as string
he swatches to merge.
None
JavaScript Reference
InDesign CS Scripting Guide
swatches Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of swatches
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any swatch.
firstItem
None
object
Returns the first swatch.
object
Returns the swatch with the specified ID.
objects
Returns the swatches within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
swatch object, number (index of the object in its containing object), or string (name of the object)
he swatch at the start of the range.
to
swatch object, number (index of the object in its containing object), or string (name of the object)
he swatch at the end of the range.
lastItem
None
object
Returns the last swatch.
middleItem
None
object
Returns the middle swatch.
object
Returns the next swatch.
object
Returns the previous swatch.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he swatch before the one desired.
Name:
Type:
Description:
obj
object
he swatch ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1013
synchronizeOption Properties Property:
Type:
Access:
Description:
groupName
string
read only
he name of the group this book synchronize option style appears in.
index
integer
read only
index of the synchronize option within its parent book
name
string
read only
he name of the XML tag
parent
book
read only
he parent of the object.
useStyle
boolean
read/write
If true, use the book synchronize option style during a synchronize.
1014
JavaScript Reference
InDesign CS Scripting Guide
synchronizeOptions Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of synchronize options
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any synchronize option.
firstItem
None
object
Returns the first synchronize option.
objects
Returns the synchronize options within the specified range.
itemByRange
Name:
Type:
Description:
from
synchronizeOption object, number (index of the object in its containing object), or string (name of the object)
he synchronizeOption at the start of the range.
to
synchronizeOption object, number (index of the object in its containing object), or string (name of the object)
he synchronizeOption at the end of the range.
lastItem
None
object
Returns the last synchronize option.
middleItem
None
object
Returns the middle synchronize option.
object
Returns the next synchronize option.
object
Returns the previous synchronize option.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he synchronize option before the one desired.
Name:
Type:
Description:
obj
object
he synchronize option ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1015
table Properties Property:
Type:
Access:
Description:
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items contained by this object, regardless of their location in the object hierarchy (i.e., including objects nested within other objects, such as groups).
read/write
What alternating fills pattern we use
alternatingFills
Name:
Decimal:
AlternatingFillsTypes.noAlternatingPattern
1097617007
AlternatingFillsTypes.alternatingRows
1097618039
AlternatingFillsTypes.alternatingColumns
1097614188
bodyRowCount
integer
read/write
Number of table body rows
bottomBorderStrokeColor
swatch
read/write
he color of the table’s bottom border
bottomBorderStrokeGapColor
swatch
read/write
he gap color of the table’s bottom border
bottomBorderStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the table’s bottom border
bottomBorderStrokeGapTint
number
read/write
he gap tint of the gap color of the table’s bottom border
bottomBorderStrokeOverprint
boolean
read/write
If true, overprint the table’s bottom border
bottomBorderStrokeTint
number
read/write
he tint of the color of the table’s bottom border
bottomBorderStrokeType
strokeStyle
read/write
he stroke type of the table’s bottom border
bottomBorderStrokeWeight
measurement string or number
read/write
he stroke weight of the table’s bottom border
read/write
Where to put the footers
read/write
Where to put the headers
buttons
read only
Every button
cells
cells
read only
cells
columnCount
integer
read/write
he number of columns
columnFillsPriority
boolean
read/write
If true, disaply column alternating fills or row alternating fills
columns
columns
read only
All columns
contents
string
read/write
he text contents of the cell.
endColumnFillColor
swatch
read/write
he fill color of columns in the second alternating fill group
endColumnFillCount
integer
read/write
he number of columns in the second alternating fills group
breakFooters
breakHeaders
buttons
1016
Name:
Decimal:
HeaderFooterBreakTypes.inAllTextColumns
1231115363
HeaderFooterBreakTypes.oncePerTextFrame
1332761702
HeaderFooterBreakTypes.oncePerPage
1332760673
Name:
Decimal:
HeaderFooterBreakTypes.inAllTextColumns
1231115363
HeaderFooterBreakTypes.oncePerTextFrame
1332761702
HeaderFooterBreakTypes.oncePerPage
1332760673
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
endColumnFillOverprint
boolean
read/write
If true, overprint the columns in the second alternating fills group
endColumnFillTint
number
read/write
he tint of the color of columns in the second alternating fills group
endColumnLineStyle
strokeStyle
read/write
he stroke type of columns in the second alternating strokes group
endColumnStrokeColor
swatch
read/write
he stroke color of columns in the second alternating strokes group
endColumnStrokeCount
integer
read/write
he number of columns in the second alternating strokes group
endColumnStrokeGapColor
swatch
read/write
he stroke gap color of columns in the second alternating strokes group
endColumnStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the columns in the second alternating strokes group
endColumnStrokeGapTint
number
read/write
he gap tint of the gap color of columns in the second alternating strokes group
endColumnStrokeOverprint
boolean
read/write
If true, overprint the columns in the second alternating strokes group
endColumnStrokeTint
number
read/write
he tint of the color of columns in the second alternating strokes group
endColumnStrokeWeight
measurement string or number
read/write
he stroke weight of columns in the second alternating strokes group
endRowFillColor
swatch
read/write
he fill color of rows in the second alternating fills group
endRowFillCount
integer
read/write
he number of rows in the second alternating fills group
endRowFillOverprint
boolean
read/write
If true, overprint the rows in the second alternating fills group
endRowFillTint
number
read/write
he tint of the color of rows in the second alternating fills group
endRowStrokeColor
swatch
read/write
he stroke color of rows in the second alternating strokes group
endRowStrokeCount
integer
read/write
he number of rows in the second alternating strokes group
endRowStrokeGapColor
swatch
read/write
he stroke gap color of rows in the second alternating strokes group
endRowStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the rows in the second alternating strokes group
endRowStrokeGapTint
tint percentage as number or -1 for no tint override
read/write
he gap tint of the gap color of rows in the second alternating strokes group
endRowStrokeOverprint
boolean
read/write
If true, overprint the rows in the second alternating strokes group
endRowStrokeTint
tint percentage as number or -1 for no tint override
read/write
he tint of the color of rows in the second alternating strokes group
endRowStrokeType
strokeStyle
read/write
he stroke type of rows in the second alternating strokes group
endRowStrokeWeight
measurement string or number
read/write
he stroke weight of rows in the second alternating strokes group
footerRowCount
integer
read/write
Number of table footer rows
formFields
formFields
read only
Every form field item
graphicLines
graphicLines
read only
All graphic lines
groups
groups
read only
groups
headerRowCount
integer
read/write
Number of table header rows
height
measurement string or number
read/write
he height of the cell.
id
integer
read only
A unique number identifying the object.
InDesign CS Scripting Guide JavaScript Reference 1017
Property:
Type:
Access:
Description:
index
integer
read only
index of the cell within its parent table.
label
string
read/write
A label that can be set to any string
letBorderStrokeColor
swatch
read/write
he color of the table’s let border
letBorderStrokeGapColor
swatch
read/write
he gap color of the table’s let border
letBorderStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the table’s let border
letBorderStrokeGapTint
number
read/write
he gap tint of the gap color of the table’s let border
letBorderStrokeOverprint
boolean
read/write
If true, overprint the table’s let border
letBorderStrokeTint
number
read/write
he tint of the color of the table’s let border
letBorderStrokeType
strokeStyle
read/write
he stroke type of the table’s let border
letBorderStrokeWeight
measurement string or number
read/write
he stroke weight of the table’s let border
ovals
ovals
read only
All ovals
pageItems
pageItems
read only
All page items
parent
object
read only
he parent of the object.
polygons
polygons
read only
All polygons
rectangles
rectangles
read only
All rectangles
rightBorderStrokeColor
swatch
read/write
he color of the table’s right border
rightBorderStrokeGapColor
swatch
read/write
he gap color of the table’s right border
rightBorderStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the table’s right border
rightBorderStrokeGapTint
number
read/write
he gap tint of the color of the table’s right border
rightBorderStrokeOverprint
boolean
read/write
If true, overprint the table’s right border
rightBorderStrokeTint
number
read/write
he tint of the color of the table’s right border
rightBorderStrokeType
strokeStyle
read/write
he stroke type of the table’s right border
rightBorderStrokeWeight
measurement string or number
read/write
he stroke weight of the table’s right border
rows
rows
read only
All rows
skipFirstAlternatingFillColumns
integer
read/write
he number of first columns to skip when alternating fills
skipFirstAlternatingFillRows
integer
read/write
he number of first rows to skip when alternating fills
skipFirstAlternatingStrokeColumns
integer
read/write
he number of first columns to skip when alternating strokes
skipFirstAlternatingStrokeRows
integer
read/write
he number of first rows to skip when alternating strokes
skipFirstHeader
boolean
read/write
If true, skip the first occurrence of the headers
skipLastAlternatingFillColumns
integer
read/write
he number of last columns to skip when alternating fills
skipLastAlternatingFillRows
integer
read/write
he number of last rows to skip when alternating fills
1018
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
skipLastAlternatingStrokeColumns
integer
read/write
he number of last columns to skip when alternating strokes
skipLastAlternatingStrokeRows
integer
read/write
he number of last rows to skip when alternating strokes
skipLastFooter
boolean
read/write
If true, skip the last occurrence of the footers
spaceAter
measurement string or number
read/write
Space ater
spaceBefore
measurement string or number
read/write
Space before
startColumnFillColor
swatch
read/write
he fill color of columns in the first alternating fills group
startColumnFillCount
integer
read/write
he number of columns in the first alternating fills group
startColumnFillOverprint
boolean
read/write
If true, overprint the columns in the first alternating fills group
startColumnFillTint
number
read/write
he tint of the color of columns in the first alternating fills group
startColumnStrokeColor
swatch
read/write
he stroke color of columns in the first alternating strokes group
startColumnStrokeCount
integer
read/write
he number of columns in the first alternating strokes group
startColumnStrokeGapColor
swatch
read/write
he stroke gap color of columns in the first alternating strokes group
startColumnStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the columns in the first alternating strokes group
startColumnStrokeGapTint
number
read/write
he gap tint of the gap color of columns in the first alternating strokes group
startColumnStrokeOverprint
boolean
read/write
If true, overprint the columns in the first alternating strokes group
startColumnStrokeTint
number
read/write
he tint of the color of columns in the first alternating strokes group
startColumnStrokeType
strokeStyle
read/write
he stroke type of columns in the first alternating strokes group
startColumnStrokeWeight
measurement string or number
read/write
he stroke weight of columns in the first alternating strokes group
startRowFillColor
swatch
read/write
he fill color of rows in the first alternating fills group
startRowFillCount
integer
read/write
he number of rows in the first alternating fills group
startRowFillOverprint
boolean
read/write
If true, overprint the rows in the first alternating fills group
startRowFillTint
number
read/write
he tint of the color of rows in the first alternating fills group
startRowStrokeColor
swatch
read/write
he stroke color of rows in the first alternating strokes group
startRowStrokeCount
integer
read/write
he number of rows in the first alternating strokes group
startRowStrokeGapColor
swatch
read/write
he stroke gap color of rows in the first alternating strokes group
startRowStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the rows in the first alternating strokes group
startRowStrokeGapTint
number
read/write
he gap tint of the gap color of rows in the first alternating strokes group
startRowStrokeOverprint
boolean
read/write
If true, overprint the rows in the first alternating strokes group
startRowStrokeTint
number
read/write
he tint of the color of rows in the first alternating strokes group
InDesign CS Scripting Guide JavaScript Reference 1019
Property:
Type:
Access:
Description:
startRowStrokeType
strokeStyle
read/write
he stroke type of rows in the first alternating strokes group
startRowStrokeWeight
measurement string or number
read/write
he stroke weight of rows in the first alternating strokes group
storyOffset
integer
read only
he location of the object from the beginning of the story
read/write
Whether to draw columns on top if true or rows on top if false
strokeOrder
Name:
Decimal:
StrokeOrderTypes.rowOnTop
1936879476
StrokeOrderTypes.columnOnTop
1935896436
StrokeOrderTypes.bestJoins
1935828330
StrokeOrderTypes.indesign2Compatibility
1936286819
textFrames
textFrames
read only
text Frames
topBorderStrokeColor
swatch
read/write
he color of the table’s top border
topBorderStrokeGapColor
swatch
read/write
he gap color of the table’s top border
topBorderStrokeGapOverprint
boolean
read/write
If true, overprint the gap of the table’s top border
topBorderStrokeGapTint
number
read/write
he gap tint of the gap color of the table’s top border
topBorderStrokeOverprint
boolean
read/write
If true, overprint the table’s top border
topBorderStrokeTint
number
read/write
he tint of the color of the table’s top border
topBorderStrokeType
strokeStyle
read/write
he stroke type of the table’s top border
topBorderStrokeWeight
measurement string or number
read/write
he stroke weight of the top border of the table
width
measurement string or number
read/write
he width of the cell.
Methods Method: convertToText
createOutlines
remove
1020
Parameters: Name:
Type:
Description:
[columnSeparator]
string or specialCharacter constant
he character to interpret as the column separator.
[rowSeparator]
string or specialCharacter constant
he character to interpret as the row separator.
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original object.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
text
Convert to text.
objects
Create outlines from the text.
nothing
Deletes the object.
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
unmerge
None
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Select this table.
objects
Unmerge the cells.
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 1021
tables Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of tables
Methods Method: add
Parameters: Name: [to]
[reference]
Type: Name:
Description: Decimal:
LocationOptions.before
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions. atBeginning
1650945639
LocationOptions. unknown
1433299822
table, textFrame, text, character, word, line, paragraph, textColumn, insertionPoint, story, cell, or textStyleRange
Return:
Description:
table
Create a new table.
location.
Before/ater an or at the beginning/end of a this object
anyItem
None
object
Returns any table.
firstItem
None
object
Returns the first table.
object
Returns the table with the specified ID.
objects
Returns the tables within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
table object or number (index of the object in its containing object)
he table at the start of the range.
to
table object or number (index of the object in its containing object)
he table at the end of the range.
lastItem
None
object
Returns the last table.
middleItem
None
object
Returns the middle table.
object
Returns the next table.
object
Returns the previous table.
nextItem
previousItem
1022
Name:
Type:
Description:
obj
object
he table before the one desired.
Name:
Type:
Description:
obj
object
he table ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
tabStop Properties Property: alignment
Type: Name:
Decimal:
TabStopAlignment.letAlign
1818584692
TabStopAlignment.centerAlign
1667591796
TabStopAlignment.rightAlign
1919379572
TabStopAlignment.characterAlign
1952604515
Access:
Description:
read/write
he alignment of the tab stop.
alignmentCharacter
string
read/write
he tab stop alignment character.
index
integer
read only
index of the tab stop within its parent textDefault, paragraph, paragraphStyle, text, character, word, line, textcolumn, textStyleRange, insertion point or story
leader
string
read/write
he tab stop leader
parent
object
read only
he parent of the object.
position
measurement string or number
read/write
he position of the tab stop on the text ruler.
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 1023
tabStops Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of tab stops
Methods Method:
Parameters:
Return:
add
None
tabStop
Create a new tab stop.
anyItem
None
object
Returns any tab stop.
firstItem
None
object
Returns the first tab stop.
objects
Returns the tab stops within the specified range.
itemByRange
Name:
Type:
Description:
from
tabStop object or number (index of the object in its containing object)
he tabStop at the start of the range.
to
tabStop object or number (index of the object in its containing object)
he tabStop at the end of the range.
Description:
lastItem
None
object
Returns the last tab stop.
middleItem
None
object
Returns the middle tab stop.
object
Returns the next tab stop.
object
Returns the previous tab stop.
nextItem
previousItem
1024
Name:
Type:
Description:
obj
object
he tab stop before the one desired.
Name:
Type:
Description:
obj
object
he tab stop ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
taggedTextExportPreference Properties Property: characterSet
parent tagForm
Type: Name:
Decimal:
TagTextExportCharacterSet.ascii
1095975753
TagTextExportCharacterSet.ansi
1095652169
TagTextExportCharacterSet.unicode
1249209961
TagTextExportCharacterSet.shitJIS
1249077875
application Name:
Decimal:
TagTextForm.verbose
1414821474
TagTextForm.abbreviated
1414816098
Access:
Description:
read/write
he character set to use when exporting tagged text.
read only
he parent of the object.
read/write
he tag form to use when exporting tagged text.
InDesign CS Scripting Guide JavaScript Reference 1025
taggedTextImportPreference Properties Property:
Type:
Access:
parent
application
read only
he parent of the object.
removeTextFormatting
boolean
read/write
If true, remove text formatting or not
read/write
What to do when style definitions in the incoming tagged text file conflict with definitions of styles having the same names in the current publication.
read/write
If true, use Typographer’s quotes or not
styleConflict
useTypographersQuotes
1026
Name:
Decimal:
StyleConflict.publicationDefinition
1414819940
StyleConflict.tagFileDefinition
1413903460
boolean
JavaScript Reference
InDesign CS Scripting Guide
Description:
text Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
ascent
measurement string or number
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associatedXMLElements
objects
read only
Returns the associated XML elements
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
measurement string or number
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
buttons
buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
characters
capitalization
characters
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
characters
InDesign CS Scripting Guide JavaScript Reference 1027
Property:
Type:
Access:
Description:
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
measurement string or number
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradientStrokeAngle
number
read/write
he angle of the gradient applied to the stroke of the text.
gradientStrokeLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
1028
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
graphicLines
graphicLines
read only
All graphic lines
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
groups
groups
read only
groups
horizontalOffset
measurement string or number
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
index
integer
read only
index of the object within its parent object.
insertionPoints
insertionPoints
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
InDesign CS Scripting Guide JavaScript Reference 1029
Property:
Type:
Access:
Description:
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
lines
lines
read only
lines
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
openTypeFeatures
array of integers
read/write
open type features as Array of integers
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
1030
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
parentStory
story
read only
he story containing the text object.
parentTextFrame
textFrame
read only
he text frame containing the text object.
pointSize
number
read/write
he size of the text in points.
polygons
polygons
read only
All polygons
position
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
otfFigureStyle
otfFraction
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
rectangles
rectangles
read only
All rectangles
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
InDesign CS Scripting Guide JavaScript Reference 1031
Property:
Type:
Access:
Description:
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
ruleBelowWidth
singleWordJustification
1032
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tables
tables
read only
All tables
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
InDesign CS Scripting Guide JavaScript Reference 1033
Property:
Type:
Access:
Description:
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
words
words
read only
words
Methods Method: applyStyle
changecase
Parameters: Name:
Type:
Description:
using
style object or style name as string
he paragraph style or character style to apply.
[clearingOverrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
1034
JavaScript Reference
Name:
Decimal:
ChangecaseMode. uppercase
1667462499
ChangecaseMode. lowercase
1667460195
ChangecaseMode. titlecase
1667462243
ChangecaseMode. sentencecase
1667461987
InDesign CS Scripting Guide
Case option to use.
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
Method: convertToTable
createOutlines
exportFile
Parameters: Name:
Type:
Description:
[columnSeparator]
string or specialCharacter constant
he character to interpret as the column separator.
[rowSeparator]
string or specialCharacter constant
he character to interpret as the row separator.
[numberOfColumns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original text.
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
markup
Return:
Description:
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
using
xmlElement
he XML element to associate with the text.
InDesign CS Scripting Guide JavaScript Reference 1035
Method: move
Parameters: Name:
Type:
to
place
remove
1036
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
JavaScript Reference
InDesign CS Scripting Guide
Description:
nothing
Moves the text.
object
Place a file.
nothing
Deletes the object.
Where to move the text, relative to the reference object (before/ater).
[reference]
None
Return:
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects text.
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 1037
textColumn Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
ascent
measurement string or number
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associatedXMLElements
objects
read only
Returns the associated XML elements
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
measurement string or number
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
buttons
buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
characters
capitalization
characters
1038
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
characters
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
measurement string or number
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradientStrokeAngle
number
read/write
he angle of the gradient applied to the stroke of the text.
gradientStrokeLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
InDesign CS Scripting Guide JavaScript Reference 1039
Property:
Type:
Access:
Description:
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
graphicLines
graphicLines
read only
All graphic lines
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
groups
groups
read only
groups
horizontalOffset
measurement string or number
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
index
integer
read only
index of the object within its parent object.
insertionPoints
insertionPoints
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
1040
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
lines
lines
read only
lines
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
openTypeFeatures
array of integers
read/write
open type features as Array of integers
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
InDesign CS Scripting Guide JavaScript Reference 1041
Property:
Type:
Access:
Description:
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
parentStory
story
read only
he story containing the text object.
parentTextFrame
textFrame
read only
he text frame containing the text object.
pointSize
number
read/write
he size of the text in points.
polygons
polygons
read only
All polygons
position
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
otfFigureStyle
otfFraction
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
rectangles
rectangles
read only
All rectangles
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
1042
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
ruleBelowWidth
singleWordJustification
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
InDesign CS Scripting Guide JavaScript Reference 1043
Property:
Type:
Access:
Description:
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tables
tables
read only
All tables
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
1044
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
words
words
read only
words
Methods Method: applyStyle
changecase
Parameters: Name:
Type:
Description:
using
style object or style name as string
he paragraph style or character style to apply.
[clearingOverrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
Case option to use.
Name:
Decimal:
ChangecaseMode. uppercase
1667462499
ChangecaseMode. lowercase
1667460195
ChangecaseMode. titlecase
1667462243
ChangecaseMode. sentencecase
1667461987
InDesign CS Scripting Guide JavaScript Reference 1045
Method: convertToTable
createOutlines
exportFile
Parameters: Name:
Type:
Description:
[columnSeparator]
string or specialCharacter constant
he character to interpret as the column separator.
[rowSeparator]
string or specialCharacter constant
he character to interpret as the row separator.
[numberOfColumns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original text.
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
markup
1046
Description: Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
using
xmlElement
he XML element to associate with the text.
JavaScript Reference
Return: table
InDesign CS Scripting Guide
Method: move
Parameters: Name: to
place
remove
Type:
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
Description:
nothing
Moves the text.
object
Place a file.
nothing
Deletes the object.
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
None
Return:
InDesign CS Scripting Guide JavaScript Reference 1047
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
1048
JavaScript Reference
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects text.
textColumns Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of textcolumns
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any textcolumn.
firstItem
None
object
Returns the first textcolumn.
objects
Returns the textcolumns within the specified range.
itemByRange
Name:
Type:
Description:
from
textColumn object or number (index of the object in its containing object)
he textColumn at the start of the range.
to
textColumn object or number (index of the object in its containing object)
he textColumn at the end of the range.
lastItem
None
object
Returns the last textcolumn.
middleItem
None
object
Returns the middle textcolumn.
object
Returns the next textcolumn.
object
Returns the previous textcolumn.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he textcolumn before the one desired.
Name:
Type:
Description:
obj
object
he textcolumn after the one desired.
InDesign CS Scripting Guide JavaScript Reference 1049
textDefault Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
capitalization
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
1050
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
InDesign CS Scripting Guide JavaScript Reference 1051
Property: justification
Type: Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
Access:
Description:
read/write
Alignment of the paragraph containing the text.
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
1052
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
otfFigureStyle
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
otfFraction
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
parent
object
read only
he parent of the object.
pointSize
number
read/write
he size of the text in points.
read/write
he position attribute applied to the text.
position
Name:
Decimal:
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
InDesign CS Scripting Guide JavaScript Reference 1053
Property:
Type:
Access:
Description:
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
1054
JavaScript Reference
InDesign CS Scripting Guide
Property: ruleBelowWidth
singleWordJustification
Type: Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
Access:
Description:
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
InDesign CS Scripting Guide JavaScript Reference 1055
Property:
Type:
Access:
Description:
tabStops
tabStops
read only
Tab Stops
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
1056
JavaScript Reference
InDesign CS Scripting Guide
textEditbox Properties Property:
Type:
Access:
Description:
editContents
string
read/write
he text in the text edit field of the control.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the textEditbox within its parent dialog column, dialog row, enabling group or border panel
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
InDesign CS Scripting Guide JavaScript Reference 1057
textEditboxes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of textEditboxes
Methods Method:
Parameters:
Return:
add
None
textEditbox
Create a new text editbox.
anyItem
None
object
Returns any textEditbox.
firstItem
None
object
Returns the first textEditbox.
object
Returns the textEditbox with the specified ID.
objects
Returns the textEditboxes within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
textEditbox object or number (index of the object in its containing object)
he textEditbox at the start of the range.
to
textEditbox object or number (index of the object in its containing object)
he textEditbox at the end of the range.
Description:
lastItem
None
object
Returns the last textEditbox.
middleItem
None
object
Returns the middle textEditbox.
object
Returns the next textEditbox.
object
Returns the previous textEditbox.
nextItem
previousItem
1058
Name:
Type:
Description:
obj
object
he textEditbox before the one desired.
Name:
Type:
Description:
obj
object
he textEditbox after the one desired.
JavaScript Reference
InDesign CS Scripting Guide
textExportPreference Properties Property: characterSet
parent platform
Type: Name:
Decimal:
TextExportCharacterSet.unicode
1249209961
TextExportCharacterSet.defaultPlatform
1415865972
application Name:
Decimal:
ImportPlatform.macintosh
1296130931
ImportPlatform.pc
1466852474
Access:
Description:
read/write
he character set to use when exporting plain text.
read only
he parent of the object.
read/write
he platform character set to use when exporting plain text.
InDesign CS Scripting Guide JavaScript Reference 1059
textFrame Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item.
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item.
absoluteVerticalScale
number
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
buttons
read only
Every button
characters
characters
read only
characters
contents
string
read/write
he text frame’s contents
read/write
he type of content
blendMode
buttons
contentType
1060
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Name:
Decimal:
ContentType.unassigned
1970168179
ContentType.graphicType
1735553140
ContentType.textType
1952412773
JavaScript Reference
InDesign CS Scripting Guide
Property: cornerEffect
cornerRadius
endCap
endJoin
endTextFrame featherCornerType
featherMode
Type: Name:
Decimal:
CornerEffects.none
1852796517
CornerEffects.roundedCorner
1667592804
CornerEffects.inverseRoundedCorner
1667591798
CornerEffects.insetCorner
1667591795
CornerEffects.bevelCorner
1667588726
CornerEffects.fancyCorner
1667589742
number
Name:
Decimal:
EndCap.buttEndCap
1650680176
EndCap.roundEndCap
1919115632
EndCap.projectingEndCap
1886020464
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
object Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
Access:
Description:
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
he last text frame in the thread
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
featherWidth
number
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
fillTint
number
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
formFields
formFields
read only
Every form field item
gapColor
swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
gapTint
number
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
gradientFillAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
InDesign CS Scripting Guide JavaScript Reference 1061
Property:
Type:
Access:
Description:
gradientFillLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
gradientStrokeAngle
number
read/write
he angle of a linear gradient applied to the fill of the page item.
gradientStrokeLength
number
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
graphicLines
graphicLines
read only
All graphic lines
groups
groups
read only
groups
horizontalScale
number
read/write
he horizontal scaling percentage applied to the page item.
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the text frame within its parent
insertionPoints
insertionPoints
read only
Insertion Points
isolateBlending
boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
itemLayer
layer
read/write
he layer containing the page item.
knockoutGroup
boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout group option in the Transparency palette.
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
letLineEnd
1062
Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
lines
lines
read only
lines
read/write
he display setting for this page item.
localDisplaySetting
Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
locked
boolean
read/write
If true, the page item is locked.
miterLimit
number
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
nextTextFrame
object
read/write
he next text frame in the thread
nonprinting
boolean
read/write
If true, the page item is non-printing.
opacity
number
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
ovals
ovals
read only
All ovals
overflows
boolean
read only
Whether the frame has overset text. When true, there is more text in the story but no remaining text frames in which to place it
overprintFill
boolean
read/write
If true, the fill of the page item will overprint.
overprintGap
boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
overprintStroke
boolean
read/write
If true, overprint the stroke of the page item.
overridden
boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
overriddenMasterPageItem
pageItem
read only
A reference to the master page item linked to the page item (if any).
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the page item.
parentStory
story
read only
he related story
paths
paths
read only
All paths
polygons
polygons
read only
All polygons
previousTextFrame
object
read/write
he previous text frame in the thread
rectangles
rectangles
read only
All rectangles
InDesign CS Scripting Guide JavaScript Reference 1063
Property: rightLineEnd
rotationAngle shadowBlendMode
Type: Name:
Decimal:
ArrowHead.none
1852796517
ArrowHead.simpleArrowHead
1936289136
ArrowHead.simpleWideArrowHead
1937203560
ArrowHead.triangleArrowHead
1953655150
ArrowHead.triangleWideArrowHead
1953980776
ArrowHead.barbedArrowHead
1650553442
ArrowHead.curvedArrowHead
1668702568
ArrowHead.circleArrowHead
1668440424
ArrowHead.circleSolidArrowHead
1668505960
ArrowHead.squareArrowHead
1936810344
ArrowHead.squareSolidArrowHead
1936941416
ArrowHead.barArrowHead
1651663208
number Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
Access:
Description:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
shadowBlurRadius
number
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
shadowColor
swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
shadowMode
shadowOpacity
1064
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
number
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
shadowxOffset
number
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
shadowyOffset
number
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
shearAngle
number
read/write
he shear angle applied to the page item.
startTextFrame
object
read only
he first text frame in the thread
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
strokeAlignment
strokeColor strokeCornerAdjustment
Name:
Decimal:
StrokeAlignment.centerAlignment
1936998723
StrokeAlignment.insideAlignment
1936998729
StrokeAlignment.outsideAlignment
1936998735
swatch object or swatch name as string Name:
Decimal:
StrokeCornerAdjustment.none
1852796517
StrokeCornerAdjustment.dashes
1162113896
StrokeCornerAdjustment.gaps
1164406899
StrokeCornerAdjustment.dashesAndGaps
1148405616
strokeDashAndGap
array of measurement strings or numbers as [dash, gap, dash, gap,...]
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
strokeTint
number
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
strokeType
strokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
strokeWeight
number
read/write
he weight (in points) of the stroke applied to the page item.
tables
tables
read only
All tables
textColumns
textColumns
read only
text columns
textFrameIndex
integer
read only
index of the text frame in its thread of linked frames
textFramePreferences
textFramePreference
read only
text frame preferences
textFrames
textFrames
read only
text Frames
textPaths
textPaths
read only
All text paths
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
textWrapPreferences
textWrapPreference
read only
he text wrap applied to the page item.
verticalScale
number
read/write
he vertical scaling percentage of the page item.
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
InDesign CS Scripting Guide JavaScript Reference 1065
Property:
Type:
Access:
Description:
words
words
read only
words
Methods Method: addPath
Parameters: Name:
Type:
Description:
with
objects
he objects to merge with this object.
Return:
Description:
pageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (objects>p athfinder>Add).
bringForward
None
nothing
Brings the object forward.
bringToFront
None
nothing
Brings the object to the top
objects
Create outlines from the text.
createOutlines
duplicate
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original objects.
None
excludeOverlapPath
Name:
Type:
Description:
with
objects
he objects to exclude.
exportFile
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
1066
Duplicates the object.
pageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (objects>pathfinder> Exclude Overlap).
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
JavaScript Reference
object
InDesign CS Scripting Guide
Method: fit
Parameters: Name: given
insertLabel
Type:
Description: Decimal:
FitOptions. centerContent
1668575078
FitOptions. frameToContent
1718906723
FitOptions. proportionally
1667591779
FitOptions. contentToFrame
1668247152
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
objects
he objects to intersect with.
makeCompoundPath
Name:
Type:
Description:
with
objects
he objects to merge with this object.
markup
Name:
Type:
Description:
using
xmlElement
he element to mark up.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
destinationPage
page
he page on which to override the master page item.
minusBack
move
override
Description:
nothing
Fits content within the frame.
nothing
Sets the string associated with the given key (label name).
pageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (objects>pathfinder>Intersect).
pageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound paths>Make command.
nothing
Markup layout content with XML preserving the existing content.
pageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (objects>pathfi nder>Minus Back).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
pageItem
Overrides an item from the master page and places it on the page.
he fit option to use.
Name:
Name:
intersectPath
Return:
InDesign CS Scripting Guide JavaScript Reference 1067
Method: place
placeXML
Parameters: Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
Name:
Type:
Description:
using
xmlElement
he element to place into.
Return:
Description:
object
Place a file.
nothing
Places XML content from the specified element replacing the existing content.
releaseCompoundPath
None
objects
release compound path.
remove
None
nothing
Deletes the object.
removeOverride
None
nothing
Removes a locally overriden master page item
resetScaling
None
nothing
Reset an item to 100% scaling, resizes to retain same appearance
1068
JavaScript Reference
InDesign CS Scripting Guide
Method: resize
Parameters: Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Return:
Description:
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
InDesign CS Scripting Guide JavaScript Reference 1069
Method: rotate
scaleTextAttributes
1070
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Rotate the page item.
nothing
Move a text frame’s scaling into the text attributes
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Select this text frame.
How to handle the existing selection.
sendBackward
None
nothing
Sends the object backward.
sendToBack
None
nothing
Send object to the back
InDesign CS Scripting Guide JavaScript Reference 1071
Method: shear
store
subtractPath
1072
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
with
objects
he objects to merge with this object.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
pageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (objects>pathfinder>Subtract).
Method: unlink
Parameters: Name: from
Type:
Description:
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
What to unlink from.
Return:
Description:
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
InDesign CS Scripting Guide JavaScript Reference 1073
textFramePreference Properties Property: firstBaselineOffset
Type: Name:
Decimal:
FirstBaseline.ascentOffset
1296135023
FirstBaseline.capHeight
1296255087
FirstBaseline.leadingOffset
1296852079
FirstBaseline.emboxHeight
1296386159
FirstBaseline.xHeight
1299728495
FirstBaseline.fixedHeight
1296451695
Access:
Description:
read/write
he method used to calculate the distance between the first baseline of text in the text frame and the top inset of the text frame.
ignoreWrap
boolean
read/write
If true, the text in the text frame ignores the text wrap of other objects.
insetSpacing
array of measurement strings or numbers
read/write
he text inset of the text frame. For rectangular text frames, this property contains a four-item array; for non-rectangular text frames, the property contains a single value.
minimumFirstBaselineOffset
measurement string or number
read/write
he minimum distance in points between the baseline of the first line of text in the text frame and the top inset of the text frame.
parent
object
read only
he parent of the object.
textColumnCount
integer
read/write
he number of columns in the text frame.
textColumnFixedWidth
measurement string or number
read/write
he fixed column width of the text frame.
textColumnGutter
measurement string or number
read/write
he distance between the columns of the text frame.
useFixedColumnWidth
boolean
read/write
If true, the columns of the text frame are a fixed width.
read/write
he type of vertical justification applied to the text frame.
read/write
he maximum amount of vertical space between two paragraphs.
verticalJustification
verticalhreshold
1074
Name:
Decimal:
VerticalJustification.topAlign
1953460256
VerticalJustification.centerAlign
1667591796
VerticalJustification.bottomAlign
1651471469
VerticalJustification.justifyAlign
1785951334
measurement string or number
JavaScript Reference
InDesign CS Scripting Guide
textFrames Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of textFrames
Methods Method: add
Parameters: Name:
Type:
Description:
[layer]
layer object or layer name as string
he layer on which to create the textFrame as layer.
[at]
[reference]
Return:
Description:
textFrame
Create a new text frame.
Location.
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
Before/ater this textFrame or at the beginning/end of this document, spread, Master spread, page or layer as document, spread, master spread, page or layer.
anyItem
None
object
Returns any textFrame.
firstItem
None
object
Returns the first textFrame.
object
Returns the textFrame with the specified ID.
objects
Returns the textFrames within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
textFrame object or number (index of the object in its containing object)
he textFrame at the start of the range.
to
textFrame object or number (index of the object in its containing object)
he textFrame at the end of the range.
lastItem
None
object
Returns the last textFrame.
middleItem
None
object
Returns the middle textFrame.
object
Returns the next textFrame.
object
Returns the previous textFrame.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he textFrame before the one desired.
Name:
Type:
Description:
obj
object
he textFrame ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1075
textImportPreference Properties Property: characterSet
Type: Name:
Decimal:
TextImportCharacterSet.ansi
1095652169
TextImportCharacterSet.ascii
1095975753
TextImportCharacterSet.unicode
1249209961
TextImportCharacterSet.recommendShitJIS83pv
1412969328
TextImportCharacterSet.shitJIS90pv
1413034096
TextImportCharacterSet.shitJIS90ms
1413034093
TextImportCharacterSet.gb2312
1416061535
TextImportCharacterSet.chineseBig5
1415799349
TextImportCharacterSet.macintoshCE
1416446789
TextImportCharacterSet.macintoshCyrillic
1416446841
TextImportCharacterSet.macintoshGreek
1416447858
TextImportCharacterSet.macintoshTurkish
1416451186
TextImportCharacterSet.windowsCyrillic
1417102201
TextImportCharacterSet.windowsEE
1417102661
TextImportCharacterSet.windowsGreek
1417103218
TextImportCharacterSet.windowsTurkish
1417106549
TextImportCharacterSet.dosLatin2
1415867442
Access:
Description:
read/write
he character set to use.
convertSpacesIntoTabs
boolean
read/write
If true, convert sequentially repeating spaces to tabs.
dictionary
string
read/write
language to use.
parent
application
read only
he parent of the object.
read/write
he platform character set to use when exporting plain text.
platform
Name:
Decimal:
ImportPlatform.macintosh
1296130931
ImportPlatform.pc
1466852474
spacesIntoTabsCount
integer
read/write
he number of sequential spaces to convert to a tab.
stripReturnsBetweenLines
boolean
read/write
If true, remove extra carriage returns at the ends of lines.
stripReturnsBetweenParagraphs
boolean
read/write
If true, remove extra carriage returns between paragraphs.
1076
JavaScript Reference
InDesign CS Scripting Guide
textPath Properties Property:
Type:
Access:
Description:
centerBracket
number
read only
he center bracket.
characters
characters
read only
characters
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
endBracket
number
read/write
he end bracket.
endTextFrame
object
read only
he last text frame in the thread.
read/write
he flip path effect.
flipPathEffect
Name:
Decimal:
FlipValues.notFlipped
1852206192
FlipValues.flipped
2036755568
FlipValues.undefinedFlipValue
1969646704
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the object within its parent object.
insertionPoints
insertionPoints
read only
Insertion Points
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
lines
lines
read only
lines
nextTextFrame
object
read/write
he next text frame in the thread.
overflows
boolean
read only
If true, the text path contains overset text.
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
parentStory
story
read only
he related story
read/write
he path alignment.
read/write
he path effect.
pathAlignment
pathEffect
Name:
Decimal:
PathTypeAlignments.topPathAlignment
1885434975
PathTypeAlignments.bottomPathAlignment
1885430367
PathTypeAlignments.centerPathAlignment
1885430623
Name:
Decimal:
TextPathEffects.rainbowPathEffect
1601201778
TextPathEffects.skewPathEffect
1601201779
TextPathEffects.ribbonPathEffect
1601201715
TextPathEffects.stairStepPathEffect
1601205107
TextPathEffects.gravityPathEffect
1601201767
pathSpacing
integer
read/write
he path spacing.
previousTextFrame
object
read/write
he previous text frame in the thread.
startBracket
number
read/write
he start bracket.
startTextFrame
object
read only
he first text frame in the thread.
InDesign CS Scripting Guide JavaScript Reference 1077
Property: textAlignment
Type: Name:
Decimal:
TextTypeAlignments.ascenderTextAlignment
1952538995
TextTypeAlignments.descenderTextAlignment
1952539763
TextTypeAlignments.centerTextAlignment
1952539508
TextTypeAlignments.baselineTextAlignment
1952539244
TextTypeAlignments.aboveRightEmBoxTextAlignment
1952543333
TextTypeAlignments.belowLetEmBoxTextAlignment
1952607333
TextTypeAlignments.aboveRightIcfBoxTextAlignment
1952543337
TextTypeAlignments.belowLetIcfBoxTextAlignment
1952607337
Access:
Description:
read/write
he text alignment.
textColumns
textColumns
read only
text columns
textFrameIndex
integer
read only
index of the text frame in its thread of linked frames.
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
words
words
read only
words
Methods Method: extractLabel
insertLabel
remove
1078
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
Method: search
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
InDesign CS Scripting Guide JavaScript Reference 1079
textPaths Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or label (as string).
length
integer
read only
he number of textpaths
Methods Method:
Parameters:
Return:
add
None
textPath
Create a new text path.
anyItem
None
object
Returns any textpath.
firstItem
None
object
Returns the first textpath.
object
Returns the textpath with the specified ID.
objects
Returns the textpaths within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
textPath object or number (index of the object in its containing object)
he textPath at the start of the range.
to
textPath object or number (index of the object in its containing object)
he textPath at the end of the range.
Description:
lastItem
None
object
Returns the last textpath.
middleItem
None
object
Returns the middle textpath.
object
Returns the next textpath.
object
Returns the previous textpath.
nextItem
previousItem
1080
Name:
Type:
Description:
obj
object
he textpath before the one desired.
Name:
Type:
Description:
obj
object
he textpath ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
textPreference Properties Property:
Type:
Access:
Description:
abutTextToTextWrap
boolean
read/write
If true, text will abut the bottom of a text wrap object.
baselineShitKeyIncrement
number
read/write
he amount of baseline shit each press of the shit-option/alt-up arrow or shit-option/alt-down arrow increases or decreases.
highlightCustomSpacing
boolean
read/write
If true, use on-screen highlighting to identify custom spacing.
highlightHjViolations
boolean
read/write
If true, use on-screen highlighting to identify hyphenation and justification violations.
highlightKeEPS
boolean
read/write
If true, use on-screen highlighting to identify paragraphs that violate keep options.
highlightSubstitutedFonts
boolean
read/write
If true, to highlight text formatted using missing fonts.
highlightSubstitutedGlyphs
boolean
read/write
If true, use on-screen highlighting to identify substituted glyphs.
justifyTextWraps
boolean
read/write
If true, to justify text where it wraps around other objects.
kerningKeyIncrement
number
read/write
he amount of kerning each press of the option/alt-right arrow or option/alt-let arrow increases or decreases.
leadingKeyIncrement
number
read/write
he amount of leading each press of the option/alt-up arrow or option/alt-down arrow increases or decreases.
linkTextFilesWhenImporting
boolean
read/write
Whether text files should be linked when importing
parent
object
read only
he parent of the object.
scalingAdjustsText
boolean
read/write
If true, scaling adjusts text attributes.
showInvisibles
boolean
read/write
If true, show hidden characters.
smallCap
number
read/write
he percentage of the font size for text formatted as small caps. his setting has no effect on true small caps from an OpenType font.
subscriptPosition
number
read/write
he percentage of the leading that subscripted text will move.
subscriptSize
number
read/write
he percentage of the font size for subscripted text.
superscriptPosition
number
read/write
he percentage of the leading that the superscripted text will move.
superscriptSize
number
read/write
he percentage of the font size for superscripted text.
typographersQuotes
boolean
read/write
If true, typed straight quotes will be converted to typographic quotes.
useOpticalSize
boolean
read/write
If true, use a multiple master’s optical size axis.
useParagraphLeading
boolean
read/write
If true, apply leading changes to entire paragraphs.
zOrderTextWrap
boolean
read/write
Whether text wrap only affects text beneath it in the z order.
InDesign CS Scripting Guide JavaScript Reference 1081
texts Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of texts
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any text.
firstItem
None
object
Returns the first text.
objects
Returns the texts within the specified range.
itemByRange
Name:
Type:
Description:
from
text object or number (index of the object in its containing object)
he text at the start of the range.
to
text object or number (index of the object in its containing object)
he text at the end of the range.
lastItem
None
object
Returns the last text.
middleItem
None
object
Returns the middle text.
object
Returns the next text.
object
Returns the previous text.
nextItem
previousItem
1082
Name:
Type:
Description:
obj
object
he text before the one desired.
Name:
Type:
Description:
obj
object
he text ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
textStyleRange Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
ascent
measurement string or number
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associatedXMLElements
objects
read only
Returns the associated XML elements
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
measurement string or number
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
buttons
buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
characters
capitalization
characters
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
characters
InDesign CS Scripting Guide JavaScript Reference 1083
Property:
Type:
Access:
Description:
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
measurement string or number
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradientStrokeAngle
number
read/write
he angle of the gradient applied to the stroke of the text.
gradientStrokeLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
1084
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
graphicLines
graphicLines
read only
All graphic lines
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
groups
groups
read only
groups
horizontalOffset
measurement string or number
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
index
integer
read only
index of the object within its parent object.
insertionPoints
insertionPoints
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
InDesign CS Scripting Guide JavaScript Reference 1085
Property:
Type:
Access:
Description:
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
lines
lines
read only
lines
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
openTypeFeatures
array of integers
read/write
open type features as Array of integers
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
1086
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
parentStory
story
read only
he story containing the text object.
parentTextFrame
textFrame
read only
he text frame containing the text object.
pointSize
number
read/write
he size of the text in points.
polygons
polygons
read only
All polygons
position
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
otfFigureStyle
otfFraction
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
rectangles
rectangles
read only
All rectangles
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
InDesign CS Scripting Guide JavaScript Reference 1087
Property:
Type:
Access:
Description:
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
ruleBelowWidth
singleWordJustification
1088
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tables
tables
read only
All tables
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
InDesign CS Scripting Guide JavaScript Reference 1089
Property:
Type:
Access:
Description:
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
words
words
read only
words
Methods Method: applyStyle
changecase
Parameters: Name:
Type:
Description:
using
style object or style name as string
he paragraph style or character style to apply.
[clearingOverrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
1090
JavaScript Reference
Name:
Decimal:
ChangecaseMode. uppercase
1667462499
ChangecaseMode. lowercase
1667460195
ChangecaseMode. titlecase
1667462243
ChangecaseMode. sentencecase
1667461987
InDesign CS Scripting Guide
Case option to use.
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
Method: convertToTable
createOutlines
exportFile
Parameters: Name:
Type:
Description:
[columnSeparator]
string or specialCharacter constant
he character to interpret as the column separator.
[rowSeparator]
string or specialCharacter constant
he character to interpret as the row separator.
[numberOfColumns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original text.
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
markup
Return:
Description:
table
Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
using
xmlElement
he XML element to associate with the text.
InDesign CS Scripting Guide JavaScript Reference 1091
Method: move
Parameters: Name:
Type:
to
place
remove
1092
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
JavaScript Reference
InDesign CS Scripting Guide
Description:
nothing
Moves the text.
object
Place a file.
nothing
Deletes the object.
Where to move the text, relative to the reference object (before/ater).
[reference]
None
Return:
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects text.
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 1093
textStyleRanges Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of textStyleRanges
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any textStyleRange.
firstItem
None
object
Returns the first textStyleRange.
objects
Returns the textStyleRanges within the specified range.
itemByRange
Name:
Type:
Description:
from
textStyleRange object or number (index of the object in its containing object)
he textStyleRange at the start of the range.
to
textStyleRange object or number (index of the object in its containing object)
he textStyleRange at the end of the range.
lastItem
None
object
Returns the last textStyleRange.
middleItem
None
object
Returns the middle textStyleRange.
object
Returns the next textStyleRange.
object
Returns the previous textStyleRange.
nextItem
previousItem
1094
Name:
Type:
Description:
obj
object
he textStyleRange before the one desired.
Name:
Type:
Description:
obj
object
he textStyleRange ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
textWrapPreference Properties Property:
Type:
Access:
contourOptions
contourOption
read only
he contour options.
inverse
boolean
read/write
If true, invert the text wrap (creating an inside-out wrap).
parent
object
read only
he parent of the object.
paths
paths
read only
All paths
textWrapOffset
array of measurement strings or numbers
read/write
he amount of offset to move the wrap away from the edges of the frame. as Unit (number or string), Array of Units (numbers or strings) or idNothingEnum
read/write
he type of text wrap applied to the object.
textWrapType
Name:
Decimal:
TextWrapTypes.none
1852796517
TextWrapTypes.jumpObjectTextWrap
1650552420
TextWrapTypes.nextColumnTextWrap
1853384306
TextWrapTypes.boundingBoxTextWrap
1651729523
TextWrapTypes.contour
1835233134
TextWrapTypes.userModified
1970498916
Description:
InDesign CS Scripting Guide JavaScript Reference 1095
tint Properties Property:
Type:
Access:
colorValue
array of numbers as [c, m, y, k] or [r, g, b]
read/write
he color values of the tint
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the tint within its parent application or document
label
string
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he color model of the tint.
he name of the tint.
model
Name:
Decimal:
ColorModel.spot
1936748404
ColorModel.process
1886548851
ColorModel.registration
1919248243
ColorModel.mixedinkmodel
1768844664
Description:
name
string
read/write
parent
object
read only
he parent of the object.
read/write
he color space of the tint.
read/write
he percentage tint of the base color.
space
tintValue
Name:
Decimal:
ColorSpace.rgb
1666336578
ColorSpace.cmyk
1129142603
ColorSpace.lab
1665941826
ColorSpace.mixedInk
1666009432
number
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Merge one or more other swatches into this one.
nothing
Deletes the object.
extractLabel
insertLabel
merge
remove
1096
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
with
object or object name as string
he swatches to merge.
None
JavaScript Reference
InDesign CS Scripting Guide
tints Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of tints
Methods Method: add
Parameters: Name:
Type:
Description:
[color]
color object or color name as string
he base color as color.
Return:
Description:
tint
Create a new tint.
anyItem
None
object
Returns any tint.
firstItem
None
object
Returns the first tint.
object
Returns the tint with the specified ID.
objects
Returns the tints within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
tint object, number (index of the object in its containing object), or string (name of the object)
he tint at the start of the range.
to
tint object, number (index of the object in its containing object), or string (name of the object)
he tint at the end of the range.
lastItem
None
object
Returns the last tint.
middleItem
None
object
Returns the middle tint.
object
Returns the next tint.
object
Returns the previous tint.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he tint before the one desired.
Name:
Type:
Description:
obj
object
he tint ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1097
tocStyle Properties Property:
Type:
Access:
id
integer
read only
Description: he toc style’s unique id
includeBookDocuments
boolean
read/write
If the document this TOC style belongs to is in a book, whether to include TOC data from other book documents
includeHidden
boolean
read/write
If true, include text on hidden layers
index
integer
read only
index of the toc style within its parent application or document
label
string
read/write
A label that can be set to any string
name
string
read/write
he name of the toc style
parent
object
read only
he toc style’s parent as application or document
runIn
boolean
read/write
Whether the last levels of entries are run in
title
string
read/write
he title of the table of content to create
titleStyle
paragraphStyle
read/write
he paragraph style TOC title is formatted to
tocStyleEntries
tocStyleEntries
read only
Every TOC style entry
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
extractLabel
insertLabel
remove
1098
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
tocStyleEntries Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of toc styleEntries
Methods Method: add
Parameters: Name:
Type:
Description:
[styleName]
string
paragraph style name to use for creating TOC style entry.
Return:
Description:
tocStyleEntry
Add a new TOC style entry (selected from paragraph style).
anyItem
None
object
Returns any toc styleEntry.
firstItem
None
object
Returns the first toc styleEntry.
objects
Returns the toc styleEntries within the specified range.
itemByRange
Name:
Type:
Description:
from
tocStyleEntry object, number (index of the object in its containing object), or string (name of the object)
he tocStyleEntry at the start of the range.
to
tocStyleEntry object, number (index of the object in its containing object), or string (name of the object)
he tocStyleEntry at the end of the range.
lastItem
None
object
Returns the last toc styleEntry.
middleItem
None
object
Returns the middle toc styleEntry.
object
Returns the next toc styleEntry.
object
Returns the previous toc styleEntry.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he toc styleEntry before the one desired.
Name:
Type:
Description:
obj
object
he toc styleEntry ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1099
tocStyleEntry Properties Property:
Type:
Access:
Description:
formatStyle
paragraphStyle
read/write
he paragraph style object which the TOC entry text will be formatted
index
integer
read only
index of the toc styleEntry within its parent toc style
level
integer
read/write
Level of this entry
name
string
read/write
he name of the toc styleEntry
read/write
Options for where to put page number
characterStyle
read/write
he character style object which the page number of entry text will be formatted
parent
tocStyle
read only
he toc styleEntry’s parent
separator
string
read/write
he string between entry text and page number
separatorStyle
characterStyle
read/write
he character style object which the separator text will be formatted
sortAlphabet
boolean
read/write
Whether sort table of Content alphabetically
pageNumberPosition
pageNumberStyle
Name:
Decimal:
PageNumberPosition.aterEntry
1634100590
PageNumberPosition.beforeEntry
1650877806
PageNumberPosition.none
1852796517
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
1100
JavaScript Reference
InDesign CS Scripting Guide
tocStyles Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of toc styles
Methods Method:
Parameters:
Return:
Description:
add
None
tocStyle
Create a new toc style.
anyItem
None
object
Returns any toc style.
firstItem
None
object
Returns the first toc style.
object
Returns the toc style with the specified ID.
objects
Returns the toc styles within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
tocStyle object, number (index of the object in its containing object), or string (name of the object)
he tocStyle at the start of the range.
to
tocStyle object, number (index of the object in its containing object), or string (name of the object)
he tocStyle at the end of the range.
lastItem
None
object
Returns the last toc style.
middleItem
None
object
Returns the middle toc style.
object
Returns the next toc style.
object
Returns the previous toc style.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he toc style before the one desired.
Name:
Type:
Description:
obj
object
he toc style ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1101
topic Properties Property:
Type:
Access:
Description:
crossReferences
crossReferences
read only
Every index cross reference
index
integer
read only
index of the topic within its parent index
name
string
read only
he name of the index topic.
pageReferences
pageReferences
read only
Every index page reference
parent
index
read only
he parent of the object.
subtopics
subtopics
read only
Every index subtopic
Methods Method: capitalize
Parameters: Name: [capitalizationOption]
remove
1102
Type:
Description:
Name:
Decimal:
IndexCapitalizationOptions.allEntries
1398042725
IndexCapitalizationOptions.allLevel1Entries
1767072325
IndexCapitalizationOptions.includeSubentries
1095517556
IndexCapitalizationOptions.selectedEntry
1097624645
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Applies capitalization options to the index entries.
nothing
Deletes the object.
What to capitalize.
topics Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of topics
Methods Method: add
Parameters: Name:
Type:
Description:
name
string
topic name.
[sortBy]
string
string to use for sorting this topic.
Return:
Description:
topic
Create a new topic.
anyItem
None
object
Returns any topic.
firstItem
None
object
Returns the first topic.
objects
Returns the topics within the specified range.
itemByRange
Name:
Type:
Description:
from
topic object, number (index of the object in its containing object), or string (name of the object)
he topic at the start of the range.
to
topic object, number (index of the object in its containing object), or string (name of the object)
he topic at the end of the range.
lastItem
None
object
Returns the last topic.
middleItem
None
object
Returns the middle topic.
object
Returns the next topic.
object
Returns the previous topic.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he topic before the one desired.
Name:
Type:
Description:
obj
object
he topic ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1103
transformPreference Properties Property:
Type:
Access:
Description:
dimensionsIncludeStrokeWeight
boolean
read/write
Whether transform panel includes stroke weight in its dimension values
parent
application
read only
he transform preference’s parent
scaleStrokes
boolean
read/write
Whether strokes are scaled when objects are scaled
showContentOffset
boolean
read/write
Whether transform panel display values includes stroke weight in its dimension values
transformationsAreTotals
boolean
read/write
Whether transform panel displays values for nested objects relative to the parent object
transformContent
boolean
read/write
Whether transform panel transforms content when rotating, scaling, skewing and resizing objects
1104
JavaScript Reference
InDesign CS Scripting Guide
transparencyPreference Properties Property: blendingSpace
parent
Type: Name:
Decimal:
BlendingSpace.default
1147563124
BlendingSpace.rgb
1666336578
BlendingSpace.cmyk
1129142603
object
Access:
Description:
read/write
Determines the color space in which colors will be blended on spreads where there is transparency present.
read only
he parent of the object.
InDesign CS Scripting Guide JavaScript Reference 1105
trapPreset Properties Property:
Type:
Access:
Description:
blackColorhreshold
number
read/write
Trap preset’s black color threshold in percentage between 0% and 100%
blackDensity
number
read/write
Trap preset’s black density in the range, 0.001 to 12.0
blackWidth
number
read/write
he trap preset’s black width in the range 0.0 and 8.0
colorReduction
number
read/write
Trap preset’s color reduction threshold in percentage between 0% and 100%
defaultTrapWidth
number
read/write
he trap preset’s default width in the range 0.0 and 8.0
id
integer
read only
he trap preset’s unique id
read/write
he trap preset’s image placement
imagePlacement
Name:
Decimal:
TrapImagePlacementTypes.centerEdges
1953522542
TrapImagePlacementTypes.choke
1953522536
TrapImagePlacementTypes.imageNeutralDensity
1953525348
TrapImagePlacementTypes.imagesOverSpread
1953526640
imagesToImages
boolean
read/write
If true, trap images to images
index
integer
read only
index of the trap preset within its parent application or document
internalImages
boolean
read/write
If true, trap images internally
label
string
read/write
A label that can be set to any string
name
string
read/write
he name of the trap preset
objectsToImages
boolean
read/write
If true, trap objects to images.
oneBitImages
boolean
read/write
If trye, apply trapping to one-bit images
parent
object
read only
he trap preset’s parent as application or document
slidingTraphreshold
number
read/write
Trap preset’s sliding trap threshold in percentage between 0% and 100%
stephreshold
number
read/write
Trap preset’s step threshold in percentage between 1% and 100%
read/write
he trap preset’s end type
read/write
he trap preset’s join type
trapEnd
trapJoin
Name:
Decimal:
TrapEndTypes.miterTrapEnds
1953525093
TrapEndTypes.overlapTrapEnds
1953525612
Name:
Decimal:
EndJoin.miterEndJoin
1835691886
EndJoin.roundEndJoin
1919577966
EndJoin.bevelEndJoin
1651142510
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
string
Gets the label value associated with the given key (label name).
extractLabel
1106
Name:
Type:
Description:
key
string
he key.
JavaScript Reference
InDesign CS Scripting Guide
Method: insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 1107
trapPresets Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of trap presets
Methods Method:
Parameters:
Return:
Description:
add
None
trapPreset
Create a new trap preset.
anyItem
None
object
Returns any trap preset.
firstItem
None
object
Returns the first trap preset.
object
Returns the trap preset with the specified ID.
objects
Returns the trap presets within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
trapPreset object, number (index of the object in its containing object), or string (name of the object)
he trapPreset at the start of the range.
to
trapPreset object, number (index of the object in its containing object), or string (name of the object)
he trapPreset at the end of the range.
lastItem
None
object
Returns the last trap preset.
middleItem
None
object
Returns the middle trap preset.
object
Returns the next trap preset.
object
Returns the previous trap preset.
nextItem
previousItem
1108
Name:
Type:
Description:
obj
object
he trap preset before the one desired.
Name:
Type:
Description:
obj
object
he trap preset ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
userDictionaries Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of user dictionaries
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any user dictionary.
firstItem
None
object
Returns the first user dictionary.
objects
Returns the user dictionaries within the specified range.
itemByRange
Name:
Type:
Description:
from
userDictionary object, number (index of the object in its containing object), or string (name of the object)
he userDictionary at the start of the range.
to
userDictionary object, number (index of the object in its containing object), or string (name of the object)
he userDictionary at the end of the range.
lastItem
None
object
Returns the last user dictionary.
middleItem
None
object
Returns the middle user dictionary.
object
Returns the next user dictionary.
object
Returns the previous user dictionary.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he user dictionary before the one desired.
Name:
Type:
Description:
obj
object
he user dictionary ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1109
userDictionary Properties Property:
Type:
Access:
Description:
addedWords
list of strings
read/write
words in the user dictionary.
index
integer
read only
index of the user dictionary within its parent application
name
string
read only
he name of the user dictionary.
parent
application
read only
he parent of the object.
removedWords
list of strings
read/write
words in the not list dictionary.
Methods Method: addWord
removeWord
1110
Parameters: Name:
Type:
Description:
addedWords
list of strings
he list of exceptions to remove from the user dictionary.
[removedList]
boolean
If true, modify the ‘removed words’ list, the ‘added words’ list is modified by default.
Name:
Type:
Description:
removedWords
list of strings
he list of exceptions to remove from the user dictionary.
[removedList]
boolean
If true, modify the ‘removed words’ list, the ‘added words’ list is modified by default.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Add a word to the user dictionary.
nothing
Remove a word from the user dictionary.
validationError Properties Property:
Type:
Access:
Description:
attributeName
string
read only
he attribute name if the validation error refers to an attribute.
element
xmlElement
read only
he XML element which caused the validation error.
errorMessage
string
read only
he validation error message.
index
integer
read only
index of the validation error within its parent document
parent
document
read only
he parent of the object.
InDesign CS Scripting Guide JavaScript Reference 1111
validationErrors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of validation errors
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any validation error.
firstItem
None
object
Returns the first validation error.
objects
Returns the validation errors within the specified range.
itemByRange
Name:
Type:
Description:
from
validationError object or number (index of the object in its containing object)
he validationError at the start of the range.
to
validationError object or number (index of the object in its containing object)
he validationError at the end of the range.
lastItem
None
object
Returns the last validation error.
middleItem
None
object
Returns the middle validation error.
object
Returns the next validation error.
object
Returns the previous validation error.
nextItem
previousItem
1112
Name:
Type:
Description:
obj
object
he validation error before the one desired.
Name:
Type:
Description:
obj
object
he validation error ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
viewPreference Properties Property:
Type:
Access:
Description:
cursorKeyIncrement
number
read/write
he distance each press of an arrow key will move the selection.
guideSnaptoZone
integer
read/write
he range within which an object snaps to guides.
read/write
he measurement unit to use for the horizontal ruler.
horizontalMeasurementUnits
parent rulerOrigin
Name:
Decimal:
MeasurementUnits.points
2054188905
MeasurementUnits.picas
2054187363
MeasurementUnits.inches
2053729891
MeasurementUnits.inchesDecimal
2053729892
MeasurementUnits.millimeters
2053991795
MeasurementUnits.centimeters
2053336435
MeasurementUnits.ciceros
2053335395
object Name:
Decimal:
RulerOrigin.spreadOrigin
1380143983
RulerOrigin.pageOrigin
1380143215
RulerOrigin.spineOrigin
1380143984
read only
he parent of the object.
read/write
Where the default ruler origin (zero point) should appear.
showFrameEdges
boolean
read/write
If true, show the edges of non-selected text frames.
showRulers
boolean
read/write
If true, show the horizontal and vertical rulers.
read/write
he measurement unit to use for the vertical ruler.
verticalMeasurementUnits
Name:
Decimal:
MeasurementUnits.points
2054188905
MeasurementUnits.picas
2054187363
MeasurementUnits.inches
2053729891
MeasurementUnits.inchesDecimal
2053729892
MeasurementUnits.millimeters
2053991795
MeasurementUnits.centimeters
2053336435
MeasurementUnits.ciceros
2053335395
InDesign CS Scripting Guide JavaScript Reference 1113
viewZoomBehavior Properties Property:
Type:
Access:
Description:
enableBehavior
boolean
read/write
Whether behavior is enabled
Name:
Decimal:
read/write
he event which triggers the behavior
BehaviorEvents.mouseUp
1836410230
BehaviorEvents.mouseDown
1835296118
BehaviorEvents.mouseEnter
1835361654
BehaviorEvents.mouseExit
1836606838
event
BehaviorEvents.onFocus
1868981622
BehaviorEvents.onBlur
1868719478
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the ViewZoombehavior within its parent form field or button
label
string
read/write
A property that can be set to any string (of up to 32Kb in length).
name
string
read only
he name of the view zoom behavior.
parent
object
read only
he parent of the object.
read/write
he View Zoom style.
viewZoomStyle
Name:
Decimal:
ViewZoomStyle.fullScreen
1987733107
ViewZoomStyle.zoomIn
2053990766
ViewZoomStyle.zoomOut
2054124916
ViewZoomStyle.fitPage
2053534832
ViewZoomStyle.actualSize
2053206906
ViewZoomStyle.fitWidth
1212437335
ViewZoomStyle.fitVisible
1212437334
ViewZoomStyle.reflow
1987736166
ViewZoomStyle.singlePage
1987736432
ViewZoomStyle.oneColumn
1987735395
ViewZoomStyle.twoColumn
1987736675
ViewZoomStyle.rotateCW
1987736163
ViewZoomStyle.rotateCCW
1987736183
Methods Method: extractLabel
insertLabel
remove
1114
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
viewZoomBehaviors Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of ViewZoombehaviors
Methods Method:
Parameters:
Return:
Description:
add
None
viewZoomBehavior
Create a new view zoom behavior.
anyItem
None
object
Returns any ViewZoombehavior.
firstItem
None
object
Returns the first ViewZoombehavior.
object
Returns the ViewZoombehavior with the specified ID.
objects
Returns the ViewZoombehaviors within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
viewZoomBehavior object, number (index of the object in its containing object), or string (name of the object)
he viewZoomBehavior at the start of the range.
to
viewZoomBehavior object, number (index of the object in its containing object), or string (name of the object)
he viewZoomBehavior at the end of the range.
lastItem
None
object
Returns the last ViewZoombehavior.
middleItem
None
object
Returns the middle ViewZoombehavior.
object
Returns the next ViewZoombehavior.
object
Returns the previous ViewZoombehavior.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he ViewZoombehavior before the one desired.
Name:
Type:
Description:
obj
object
he ViewZoombehavior ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1115
widget Properties Property:
Type:
Access:
Description:
id
integer
read only
A unique number identifying the object.
index
integer
read only
index of the widget within its parent dialog column, dialog row, enabling group or border panel
minWidth
number
read/write
he minimum width of the control.
parent
object
read only
he parent of the object.
1116
JavaScript Reference
InDesign CS Scripting Guide
widgets Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of widgets
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any widget.
firstItem
None
object
Returns the first widget.
object
Returns the widget with the specified ID.
objects
Returns the widgets within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
widget object or number (index of the object in its containing object)
he widget at the start of the range.
to
widget object or number (index of the object in its containing object)
he widget at the end of the range.
lastItem
None
object
Returns the last widget.
middleItem
None
object
Returns the middle widget.
object
Returns the next widget.
object
Returns the previous widget.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he widget before the one desired.
Name:
Type:
Description:
obj
object
he widget ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1117
window Properties Property:
Type:
Access:
Description:
bounds
array of numbers or measurement strings as [y1, x1, y2, x2]
read/write
he bounds of the window, in screen pixels.
index
integer
read only
index of the window within its parent document or application
name
string
read only
he name of the window.
parent
object
read only
he parent of the object.
selection
array of objects
read/write
he selection of the window.
Methods Method:
Parameters:
Return:
Description:
bringToFront
None
nothing
Brings the object to the top
close
None
nothing
Close the window
maximize
None
nothing
Maximize the window
minimize
None
nothing
Minimize the window
restore
None
nothing
Restore the window
nothing
Select one or more objects.
select
Name:
Type:
Description:
selectableItems
array of objects
he object(s) to select.
[existingSelection]
1118
JavaScript Reference
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
windows Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of windows
Methods Method:
Parameters:
Return:
add
None
window
Create a new window.
anyItem
None
object
Returns any window.
firstItem
None
object
Returns the first window.
objects
Returns the windows within the specified range.
itemByRange
Name:
Type:
Description:
from
window object, number (index of the object in its containing object), or string (name of the object)
he window at the start of the range.
to
window object, number (index of the object in its containing object), or string (name of the object)
he window at the end of the range.
Description:
lastItem
None
object
Returns the last window.
middleItem
None
object
Returns the middle window.
object
Returns the next window.
object
Returns the previous window.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he window before the one desired.
Name:
Type:
Description:
obj
object
he window ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1119
wmf Properties Property:
Type:
Access:
Description:
absoluteHorizontalScale
number
read/write
he horizontal scale of the page item relative to its containing page item
absoluteRotationAngle
number
read/write
he rotation angle of the page item relative to its containing page item
absoluteShearAngle
number
read/write
he shear angle of the page item relative to its containing page item
absoluteVerticalScale
number
read/write
he vertical scale of the page item relative to its containing page item
associatedXMLElement
xmlElement
read only
Returns the associated XML element
read/write
he blend mode used to combine the object’s color with the background
blendMode
clippingPath featherCornerType
featherMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
clippingPathSettings Name:
Decimal:
FeatherCornerType.sharp
2020623201
FeatherCornerType.rounded
2020623202
FeatherCornerType.diffusion
2020623203
Name:
Decimal:
FeatherMode.none
1852796517
FeatherMode.standard
2020623970
read only
he clipping path settings
read/write
he type of feathering to apply
read/write
he feather mode
featherWidth
number
read/write
he width of the feathering
geometricBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
horizontalScale
number
read/write
he scale percentage in the horizontal direction
id
integer
read only
he wmf’s unique id
imageTypeName
string
read only
he type of image
1120
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
index
integer
read only
index of the wmf within its parent XML element, pageItem, oval, rectangle, polygon, graphicline, state, group or button
isolateBlending
boolean
read/write
Indicates whether the object should blend in isolation
itemLink
link
read only
link to a placed file
knockoutGroup
boolean
read/write
Indicates whether the object is a knockout group
label
string
read/write
A label that can be set to any string
read/write
he display settings for this page item
localDisplaySetting
Name:
Decimal:
DisplaySettings.highQuality
1346922866
DisplaySettings.typical
1349810544
DisplaySettings.optimized
1349480564
DisplaySettings.default
1147563124
nonprinting
boolean
read/write
Whether the page item is non-printing
opacity
number
read/write
he opacity of the object
parent
object
read only
he wmf’s parent as XML element, pageItem, oval, rectangle, polygon, graphicline, state, group or button
rotationAngle
number
read/write
Angle of rotation
read/write
he blend mode to use for drawing the shadow
shadowBlendMode
Name:
Decimal:
BlendMode.normal
1852797549
BlendMode.multiply
2020625762
BlendMode.screen
2020625763
BlendMode.overlay
2020625764
BlendMode.sotLight
2020625765
BlendMode.hardLight
2020625766
BlendMode.colorDodge
2020625767
BlendMode.colorBurn
2020625768
BlendMode.darken
2020625769
BlendMode.lighten
2020625770
BlendMode.difference
2020625771
BlendMode.exclusion
2020625772
BlendMode.hue
2020625773
BlendMode.saturation
1380545377
BlendMode.color
1668246642
BlendMode.luminosity
2020625776
shadowBlurRadius
number
read/write
he radius of the blur to apply to the shadow
shadowColor
swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
shadowMode
Name:
Decimal:
ShadowMode.none
1852796517
ShadowMode.drop
2020623440
shadowOpacity
number
read/write
he opacity of the shadow
shadowxOffset
number
read/write
he horizontal offset of the shadow
shadowyOffset
number
read/write
he vertical offset of the shadow
shearAngle
number
read/write
he shear angle of the page item relative to the spread
InDesign CS Scripting Guide JavaScript Reference 1121
Property:
Type:
Access:
Description:
textWrapPreferences
textWrapPreference
read only
he text wrap preferences
verticalScale
number
read/write
he scale percentage in the vertical direction
visibleBounds
array of measurement strings or numbers as [y1, x1, y2, x2]
read/write
he bounds of the page item including the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (numbers or strings)
Methods Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
extractLabel
insertLabel
move
1122
Description:
nothing
Export the object to a file.
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Move page item to a new location. One of the ‘To’ or ‘By’ parameters is required.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
Name:
Type:
Description:
[to]
array of numbers or measurement strings as [x, y] or a page, spread, or layer object
he new location of the object.
[by]
array of numbers or measurement strings as [x, y]
Amount by which to move the object relative to its current position.
JavaScript Reference
Return:
InDesign CS Scripting Guide
Method: place
remove
Parameters: Name:
Type:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
None
Description:
Return:
Description:
object
Place a file.
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 1123
Method: resize
1124
Parameters: Name:
Type:
Description:
[horizontalScale]
number
he horizontal scaling percentage.
[verticalScale]
number
he vertical scaling percentage.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentScale]
boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are scaled.
[consideringParentsScale]
boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
JavaScript Reference
InDesign CS Scripting Guide
Return:
Description:
nothing
Scales the page item. You must specify either horizontal scale or vertical scale or both.
Method: rotate
Parameters: Name:
Type:
Description:
by
number
Angle by which to rotate the page item.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Name:
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentRotation]
boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are rotated.
[consideringParentsRotation]
boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Return:
Description:
nothing
Rotate the page item.
InDesign CS Scripting Guide JavaScript Reference 1125
Method: shear
store
unlink
Parameters: Name:
Type:
Description:
by
number
Angle by which to shear the object.
[around]
array of numbers or measurement strings as [x, y], or one of the following constants
he center point of the transformation.
Decimal:
AnchorPoint.bottomCenterAnchor
1095656035
AnchorPoint.bottomLetAnchor
1095656044
AnchorPoint.bottomRightAnchor
1095656050
AnchorPoint.centerAnchor
1095656308
AnchorPoint.letCenterAnchor
1095658595
AnchorPoint.rightCenterAnchor
1095660131
AnchorPoint.top CenterAnchor
1095660643
AnchorPoint.top LetAnchor
1095660652
AnchorPoint.top RightAnchor
1095660658
[consideringCurrentShear]
boolean
If true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[transformingContent]
boolean
If true then both the object and items within it are sheared.
[consideringParentsShear]
boolean
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
using
library
he library in which to store.
Name:
Type:
Description:
from
1126
Name:
JavaScript Reference
Name:
Decimal:
UnlinkFrom.page
1885431653
UnlinkFrom. masterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
nothing
Shear the page item.
asset
Store a page item in a library.
nothing
Detaches an overridden master page item from the page or from the master, or a text frame from any linked text frames.
wmfs Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of wmfs
Methods Method:
Parameters:
Return:
Description:
anyItem
None
wmf
Returns any wmf.
firstItem
None
wmf
Returns the first wmf.
wmf
Returns the wmf with the specified ID.
wmfs
Returns the wmfs within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
wmf object or number (index of the object in its containing object)
he wmf at the start of the range.
to
wmf object or number (index of the object in its containing object)
he wmf at the end of the range.
lastItem
None
wmf
Returns the last wmf.
middleItem
None
wmf
Returns the middle wmf.
wmf
Returns the next wmf.
wmf
Returns the previous wmf.
nextItem
previousItem
Name:
Type:
Description:
obj
wmf
he wmf before the one desired.
Name:
Type:
Description:
obj
wmf
he wmf ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1127
word Properties Property:
Type:
Access:
Description:
alignToBaseline
boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
allGraphics
objects
read only
All graphics
allPageItems
objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
appliedCharacterStyle
style object or style name as string
read/write
he character style applied to the text.
appliedFont
font object or font name as string
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
appliedLanguage
language object or language name as string
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
appliedParagraphStyle
style object or style name as string
read/write
he paragraph style applied to the text.
ascent
measurement string or number
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
associatedXMLElements
objects
read only
Returns the associated XML elements
autoLeading
number
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
balanceRaggedLines
boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
baseline
measurement string or number
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
baselineShit
number
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
buttons
buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
characters
capitalization
characters
1128
Name:
Decimal:
Capitalization.normal
1852797549
Capitalization.smallCaps
1936548720
Capitalization.allCaps
1634493296
Capitalization.capToSmallCap
1664250723
characters
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
composer
string
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
contents
string
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
descent
measurement string or number
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
desiredGlyphScaling
number
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
desiredLetterSpacing
number
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
desiredWordSpacing
number
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired word Spacing field in the Justification dialog box.
dropCapCharacters
integer
read/write
Number of characters for drop cap.
dropCapLines
integer
read/write
Number of lines for drop cap.
dropCapStyle
characterStyle object or character style name as string
read/write
Character style of the drop cap.
fillColor
swatch object or swatch name as string
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
fillTint
number
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
firstLineIndent
measurement string or number
read/write
he indent applied to the first line of the paragraph containing the text.
fontStyle
string
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
formFields
formFields
read only
Every form field item
gradientFillAngle
number
read/write
he angle of the gradient applied to the fill of the text (if any).
gradientFillLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
gradientFillStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
gradientStrokeAngle
number
read/write
he angle of the gradient applied to the stroke of the text.
gradientStrokeLength
number
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
InDesign CS Scripting Guide JavaScript Reference 1129
Property:
Type:
Access:
Description:
gradientStrokeStart
array of measurement strings or numbers as [x, y]
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
graphicLines
graphicLines
read only
All graphic lines
gridAlignFirstLineOnly
boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
groups
groups
read only
groups
horizontalOffset
measurement string or number
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
horizontalScale
number
read/write
he horizontal scaling percentage applied to the text object.
hyphenateAterFirst
integer
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
hyphenateBeforeLast
integer
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
hyphenateCapitalizedWords
boolean
read/write
If true, hyphenate capitalized words in the text.
hyphenateLadderLimit
integer
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
hyphenateWordsLongerhan
integer
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
hyphenation
boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
hyphenationZone
measurement string or number
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
hyphenWeight
integer
read/write
he weight (in points) of hyphen characters used in the text object.
index
integer
read only
index of the object within its parent object.
insertionPoints
insertionPoints
justification
Name:
Decimal:
Justification.letAlign
1818584692
Justification.centerAlign
1667591796
Justification.rightAlign
1919379572
Justification.letJustified
1818915700
Justification.rightJustified
1919578996
Justification.centerJustified
1667920756
Justification.fullyJustified
1718971500
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
keepAllLinesTogether
boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
keepFirstLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
keepLastLines
integer
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
1130
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
keepLinesTogether
boolean
read/write
If true, honor the settings of the KeepFirstlines and KeepLastlines properties.
keepWithNext
integer
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
kerningMethod
string
read/write
he kerning method applied to the text (optical, metrics or none).
kerningValue
number
read/write
he amount of kerning applied to the characters in the text object.
leading
measurement string or number
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
letIndent
measurement string or number
read/write
he let indent applied to the paragraph containing the text.
length
integer
read only
he number of characters in the text object.
ligatures
boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
lines
lines
read only
lines
maximumGlyphScaling
number
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
maximumLetterSpacing
number
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
maximumWordSpacing
number
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum word Spacing field in the Justification dialog box.
minimumGlyphScaling
number
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
minimumLetterSpacing
number
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
minimumWordSpacing
number
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum word Spacing field in the Justification dialog box.
nestedStyles
nestedStyles
read only
Nested styles
noBreak
boolean
read/write
If true, the no break attribute is applied to the text.
openTypeFeatures
array of integers
read/write
open type features as Array of integers
otfContextualAlternate
boolean
read/write
If true, use contextual alternate forms in OpenType fonts
InDesign CS Scripting Guide JavaScript Reference 1131
Property:
Type:
Access:
Description:
otfDiscretionaryLigature
boolean
read/write
If true, use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
boolean
read/write
If true, use fractions in OpenType fonts
otfOrdinal
boolean
read/write
If true, use ordinals in OpenType fonts
otfSwash
boolean
read/write
If true, use swash forms in OpenType fonts
otfTitling
boolean
read/write
If true, use titling forms in OpenType fonts
ovals
ovals
read only
All ovals
overprintFill
boolean
read/write
If true, the fill of the characters in the text object will overprint.
overprintStroke
boolean
read/write
If true, the stroke of the characters in the text object will overprint.
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he parent of the object.
parentStory
story
read only
he story containing the text object.
parentTextFrame
textFrame
read only
he text frame containing the text object.
pointSize
number
read/write
he size of the text in points.
polygons
polygons
read only
All polygons
position
Name:
Decimal:
read/write
he position attribute applied to the text.
Position.normal
1852797549
Position.superscript
1936749411
Position.subscript
1935831907
Position.otSuperscript
1884247155
Position.otSubscript
1884247138
Position.otNumerator
1884247150
Position.otDenominator
1884247140
otfFigureStyle
otfFraction
Name:
Decimal
OTFigureStyle.tabularLining
1330931316
OTFigureStyle.proportionalOldstyle
1330933619
OTFigureStyle.proportionalLining
1330932848
OTFigureStyle.tabularOldstyle
1330933620
OTFigureStyle.default
1147563124
rectangles
rectangles
read only
All rectangles
rightIndent
measurement string or number
read/write
he right indent applied to the paragraph containing the text.
ruleAbove
boolean
read/write
If true, the paragraph containing the text object has a rule above.
ruleAboveColor
swatch object or swatch name as string
read/write
he color of the paragraph rule above.
ruleAboveGapColor
swatch object or swatch name as string
read/write
he gap color of the paragraph rule above.
ruleAboveGapOverprint
boolean
read/write
If true, overprint the rule above gap color.
ruleAboveGapTint
number
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
ruleAboveLetIndent
measurement string or number
read/write
he let indent of the paragraph rule above.
ruleAboveLineWeight
number
read/write
he stroke weight of the paragraph rule above.
1132
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ruleAboveOffset
measurement string or number
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
ruleAboveOverprint
boolean
read/write
If true, the paragraph rule above will overprint.
ruleAboveRightIndent
measurement string or number
read/write
he right indent of the paragraph rule above.
ruleAboveTint
number
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
ruleAboveType
strokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
ruleAboveWidth
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
ruleBelow
boolean
read/write
If true, the paragraph containing the text object will have a rule below.
ruleBelowColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below.
ruleBelowGapColor
swatch object or swatch name as string
read/write
he color of the paragraph rule below gap
ruleBelowGapOverPrint
boolean
read/write
If true, overprint the rule below gap color
ruleBelowGapTint
number
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowLetIndent
measurement string or number
read/write
he let indent of the paragraph rule below.
ruleBelowLineWeight
number
read/write
he stroke weight of the paragraph rule below.
ruleBelowOffset
measurement string or number
read/write
he offset of the paragraph rule below.
ruleBelowOverPrint
boolean
read/write
If true, overprint the rule below
ruleBelowRightIndent
measurement string or number
read/write
he right indent of the paragraph rule below.
ruleBelowTint
number
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
ruleBelowType
strokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
ruleBelowWidth
singleWordJustification
Name:
Decimal:
RuleWidth.columnWidth
1802270564
RuleWidth.textWidth
1886681207
Name:
Decimal:
SingleWordJustification.letAlign
1818584692
SingleWordJustification.centerAlign
1667591796
SingleWordJustification.rightAlign
1919379572
SingleWordJustification.fullyJustified
1718971500
InDesign CS Scripting Guide JavaScript Reference 1133
Property:
Type:
Access:
Description:
skew
number
read/write
he skewing angle (in degrees) applied to the text object.
spaceAter
measurement string or number
read/write
he space ater applied to the paragraph containing the text.
spaceBefore
measurement string or number
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
startParagraph
Name:
Decimal:
StartParagraph.anywhere
1851945579
StartParagraph.nextColumn
1667396203
StartParagraph.nextFrame
1313235563
StartParagraph.nextPage
1885500011
StartParagraph.nextOddPage
1332765291
StartParagraph.nextEvenPage
1164993131
strikehroughColor
swatch object or swatch name as string
read/write
he stroke color of the strike through.
strikehroughGapColor
swatch object or swatch name as string
read/write
he gap color of the strike through
strikehroughGapOverprint
boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
strikehroughGapTint
number
read/write
he gap tint of the strike through
strikehroughOffset
measurement string or number
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
strikehroughOverprint
boolean
read/write
If true, overprint the strike through applied to the text (if any).
strikehroughTint
number
read/write
he tint of the strike through
strikehroughType
strokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
strikehroughWeight
number
read/write
he stroke weight of the strike through, in points.
strikehru
boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
strokeColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the text.
strokeTint
number
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
strokeWeight
number
read/write
he width (in points) of the stroke applied to the text.
tables
tables
read only
All tables
tabList
object
read/write
A list of all of the properties of all of the tab stops of this object.
tabStops
tabStops
read only
Tab Stops
textColumns
textColumns
read only
text columns
textFrames
textFrames
read only
text Frames
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
tracking
number
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
underline
boolean
read/write
If true, InDesign applies the underline type style to the text object.
1134
JavaScript Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
underlineColor
swatch object or swatch name as string
read/write
he color applied to the stroke of the underline.
underlineGapColor
swatch object or swatch name as string
read/write
he gap color applied to the stroke of the underline.
underlineGapOverprint
boolean
read/write
If true, the gap of the underline will overprint.
underlineGapTint
number
read/write
he gap tint of the stroke applied to the underline.
underlineOffset
measurement string or number
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
underlineOverprint
boolean
read/write
If true, the underline will overprint.
underlineTint
number
read/write
he tint of the color applied to the stroke of the underline.
underlineType
strokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
underlineWeight
number
read/write
he stroke weight of the underline.
verticalScale
number
read/write
he vertical scaling percentage applied to the text object.
words
words
read only
words
Methods Method: applyStyle
changecase
Parameters: Name:
Type:
Description:
using
style object or style name as string
he paragraph style or character style to apply.
[clearingOverrides]
boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
using
Return:
Description:
nothing
Apply a paragraph or character style to the text object.
nothing
Change the case of text.
Case option to use.
Name:
Decimal:
ChangecaseMode. uppercase
1667462499
ChangecaseMode. lowercase
1667460195
ChangecaseMode. titlecase
1667462243
ChangecaseMode. sentencecase
1667461987
InDesign CS Scripting Guide JavaScript Reference 1135
Method: convertToTable
createOutlines
exportFile
Parameters: Name:
Type:
Description:
[columnSeparator]
string or specialCharacter constant
he character to interpret as the column separator.
[rowSeparator]
string or specialCharacter constant
he character to interpret as the row separator.
[numberOfColumns]
integer
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[deleteOriginal]
boolean
If true, delete the original text.
Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
markup
1136
Description: Convert the text to a table. he parameters for this command correspond to the options in the Convert text to table dialog box (select some text and choose table>Convert text to table to display this dialog box).
objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
nothing
Export the object to a file.
nothing
Associate the text with an XML element while preserving the existing text content.
Decimal:
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
to
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
using
xmlElement
he XML element to associate with the text.
JavaScript Reference
Return: table
InDesign CS Scripting Guide
Method: move
Parameters: Name: to
place
remove
Type:
Description:
Name:
Decimal:
LocationOptions. atBeginning
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions.before
1650945639
LocationOptions. unknown
1433299822
Description:
nothing
Moves the text.
object
Place a file.
nothing
Deletes the object.
Where to move the text, relative to the reference object (before/ater).
[reference]
object
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
fileName
File object or file name as string
he file to place.
[placePoint]
Array of numbers or measurement strings as [x, y]
he point at which to place the object (only applicable if you are telling a page or spread to place).
[destinationLayer]
layer object or layer name as string
he layer(s) to place the file on (only valid if you are telling a page or spread to place).
[showingOptions]
boolean
If true, display the import options dialog.
[autoflowing]
boolean
If true, autoflow placed text.
[retainingFormatting]
boolean
If true, keep formatting of placed text files.
[convertingQuotes]
boolean
If true, convert straight quotation marks in incoming text files to typographic quotation marks.
None
Return:
InDesign CS Scripting Guide JavaScript Reference 1137
Method: search
select
Parameters: Name:
Type:
Description:
[for]
string
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. You can use any of InDesign’s metacharacters as part of the string (e.g., “^p” for a return character).
[wholeWord]
boolean
If true, limit the search to whole words that match the search string.
[caseSensitive]
boolean
If true, limit the search to text that matches the case used in the search string.
[replacingWith]
string
he replacement text. his parameter corrsponds to the Change To field of the Find/Change dialog box. You can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
Name:
Type:
Description:
[existingSelection]
1138
JavaScript Reference
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
Return:
Description:
objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
nothing
Selects text.
wordRTFImportPreference Properties Property: convertPageBreaks
convertTablesTo
Type: Name:
Decimal:
ConvertPageBreaks.none
1852796517
ConvertPageBreaks.pageBreak
1397778242
ConvertPageBreaks.columnBreak
1396927554
Name:
Decimal:
ConvertTablesTo.unformattedTable
1396921684
ConvertTablesTo.unformattedTabbedText
1398101076
Access:
Description:
read/write
How user defined page breaks in the imported file should be converted
read/write
Options for Convert tables To
importIndex
boolean
read/write
If true, import index text
importNotes
boolean
read/write
If true, import footnotes and endnotes
importtoc
boolean
read/write
If true, import table of contents text
parent
application
read only
he wordRTFImportPreference’s parent
removeFormatting
boolean
read/write
If true, remove text and table formatting
InDesign CS Scripting Guide JavaScript Reference 1139
words Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of words
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any word.
firstItem
None
object
Returns the first word.
objects
Returns the words within the specified range.
itemByRange
Name:
Type:
Description:
from
word object or number (index of the object in its containing object)
he word at the start of the range.
to
word object or number (index of the object in its containing object)
he word at the end of the range.
lastItem
None
object
Returns the last word.
middleItem
None
object
Returns the middle word.
object
Returns the next word.
object
Returns the previous word.
nextItem
previousItem
1140
Name:
Type:
Description:
obj
object
he word before the one desired.
Name:
Type:
Description:
obj
object
he word ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
xmlAttribute Properties Property:
Type:
Access:
Description:
index
integer
read only
index of the XML attribute within its parent XML element
name
string
read/write
he name of the XML attribute
parent
xmlElement
read only
he XML attribute’s parent
value
string
read/write
he value
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
nothing
Select this XML attribute.
select
Name: [existingSelection]
Type:
Description:
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 1141
xmlAttributes Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of XML attributes
Methods Method: add
Parameters: Name:
Type:
Description:
name
string
he attribute name.
value
string
he attribute value.
Return:
Description:
xmlAttribute
Create a new attribute.
anyItem
None
object
Returns any XML attribute.
firstItem
None
object
Returns the first XML attribute.
objects
Returns the XML attributes within the specified range.
itemByRange
Name:
Type:
Description:
from
xmlAttribute object, number (index of the object in its containing object), or string (name of the object)
he xmlAttribute at the start of the range.
to
xmlAttribute object, number (index of the object in its containing object), or string (name of the object)
he xmlAttribute at the end of the range.
lastItem
None
object
Returns the last XML attribute.
middleItem
None
object
Returns the middle XML attribute.
object
Returns the next XML attribute.
object
Returns the previous XML attribute.
nextItem
previousItem
1142
Name:
Type:
Description:
obj
object
he XML attribute before the one desired.
Name:
Type:
Description:
obj
object
he XML attribute ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
xmlComment Properties Property:
Type:
Access:
Description:
id
integer
read only
he XML comment’s unique id
index
integer
read only
index of the XML comment within its parent document, XML element or XML item
parent
object
read only
he XML comment’s parent as document, XML element or XML item
storyOffset
integer
read only
he location of the object from the beginning of the story
value
string
read/write
he comment’s value
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
xmlElement
Move element before/ater another element or text object, or to beginning/end.
nothing
Deletes the object.
nothing
Select this XML comment.
move
Name: to
[reference]
remove select
Type: Name:
Description: location.
Decimal:
LocationOptions.before
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions. atBeginning
1650945639
LocationOptions. unknown
1433299822
object
Before/ater this object as XML item or text.
None Name: [existingSelection]
Type:
Description:
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 1143
xmlComments Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of XML comments
Methods Method: add
Parameters: Name:
Type:
Description:
storyOffset
insertionPoint object or integer
Offset within the story.
[value]
string
Value.
Return:
Description:
xmlComment
Create a new XML comment.
anyItem
None
object
Returns any XML comment.
firstItem
None
object
Returns the first XML comment.
object
Returns the XML comment with the specified ID.
objects
Returns the XML comments within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
xmlComment object or number (index of the object in its containing object)
he xmlComment at the start of the range.
to
xmlComment object or number (index of the object in its containing object)
he xmlComment at the end of the range.
lastItem
None
object
Returns the last XML comment.
middleItem
None
object
Returns the middle XML comment.
object
Returns the next XML comment.
object
Returns the previous XML comment.
nextItem
previousItem
1144
Name:
Type:
Description:
obj
object
he XML comment before the one desired.
Name:
Type:
Description:
obj
object
he XML comment ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
xmlElement Properties Property:
Type:
Access:
characters
characters
read only
Description: characters
contents
string
read/write
he text contents as string or idSpecialcharacters
dtds
dtds
read only
All DTDs.
epss
epss
read only
EPSs.
id
integer
read only
he XML element’s unique id
images
images
read only
images
index
integer
read only
index of the XML element within its parent document, XML element or XML item
insertionPoints
insertionPoints
read only
Insertion Points
lines
lines
read only
lines
markupTag
xmlTag object or xmlTag name as string
read/write
he markup tag object as XML tag or string
pageItems
pageItems
read only
All page items
paragraphs
paragraphs
read only
paragraphs
parent
object
read only
he XML element’s parent as document, XML element or XML item
parentStory
story
read only
he related story
pdfs
pdfs
read only
PDFs.
picts
picts
read only
Picts.
stories
stories
read only
stories
storyOffset
integer
read only
he location of the object from the beginning of the story
textColumns
textColumns
read only
text columns
texts
texts
read only
texts
textStyleRanges
textStyleRanges
read only
text Style Ranges
wmfs
wmfs
read only
WMFs.
words
words
read only
words
xmlAttributes
xmlAttributes
read only
All XML attributes
xmlComments
xmlComments
read only
All XML comments
xmlElements
xmlElements
read only
All XML elements
xmlInstructions
xmlInstructions
read only
All XML instructions
xmlItems
xmlItems
read only
All XML items
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
InDesign CS Scripting Guide JavaScript Reference 1145
Method: exportFile
Parameters: Name:
Type:
Description:
format
string (name of the format as it appears in the Export dialog box) or one of the following constants:
he export format.
Name:
importXML
markup
move
placeXML
remove
1146
ExportFormat.epsType
1952400720
ExportFormat.inCopy
1768842084
ExportFormat.jpg
1246775072
ExportFormat.pdfType
1952403524
ExportFormat.rtf
1381254688
ExportFormat.svg
1398163232
ExportFormat. svgCompressed
1398163267
ExportFormat. taggedText
1416066168
ExportFormat.textType
1952412773
ExportFormat.xml
1481460768
File
he file to export.
[showingOptions]
boolean
If true, display the export options dialog.
[using]
export preset object or preset name as string
An export preset to use as PDFExportPreset.
Name:
Type:
Description:
from
string
What to import from.
Name:
Type:
Description:
using
style object or style name as string
he object to mark up as text, story or pageItem.
Name:
Type:
Description:
Name:
Decimal:
Export the object to a file.
nothing
Import a XML file into an InDesign document.
nothing
Markup layout content with XML preserving the existing content.
xmlElement
Move element before/ater another element or text object, or to beginning/end.
LocationOptions.before
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions. atBeginning
1650945639
LocationOptions. unknown
1433299822
nothing
Places XML content in the specified object replacing the existing content.
nothing
Deletes the object.
location.
[reference]
object
Before/ater this object as XML item or text.
Name:
Type:
Description:
using
style object or style name as string
he object to place into as story or pageItem.
None
JavaScript Reference
Description:
nothing
Decimal:
to
to
Return:
InDesign CS Scripting Guide
Method: select
Parameters: Name: [existingSelection]
untag validate
Type:
Description:
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
Return:
Description:
nothing
Select this XML element.
nothing
Untag an element
objects
Validate XML structure against a dtd.
How to handle the existing selection.
None Name:
Type:
Description:
[maximumErrors]
integer
he maximum number of validation errors to generate.
InDesign CS Scripting Guide JavaScript Reference 1147
xmlElements Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of XML elements
Methods Method: add
Parameters: Name:
Type:
Description:
markupTag
xmlTag object or xmlTag name as string
he XML tag used to identify this element as string or XML tag.
[xmlContent]
object
Content to be marked up as text, story or pageItem.
Return:
Description:
xmlElement
Create a new XML element.
anyItem
None
object
Returns any XML element.
firstItem
None
object
Returns the first XML element.
object
Returns the XML element with the specified ID.
objects
Returns the XML elements within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
xmlElement object or number (index of the object in its containing object)
he xmlElement at the start of the range.
to
xmlElement object or number (index of the object in its containing object)
he xmlElement at the end of the range.
lastItem
None
object
Returns the last XML element.
middleItem
None
object
Returns the middle XML element.
object
Returns the next XML element.
object
Returns the previous XML element.
nextItem
previousItem
1148
Name:
Type:
Description:
obj
object
he XML element before the one desired.
Name:
Type:
Description:
obj
object
he XML element ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
xmlExportMap Properties Property:
Type:
Access:
Description:
index
integer
read only
index of the XML export map within its parent application or document
mappedStyle
style object or style name as string
read only
he style mapped to the XML tag as paragraphStyle, characterStyle or string
markupTag
xmlTag object or xmlTag name as string
read/write
he markup tag object as XML tag or string
parent
object
read only
he XML export map’s parent as application or document
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 1149
xmlExportMaps Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of XML export maps
Methods Method: add
Parameters: Name:
Type:
Description:
mappedStyle
style object or style name as string
he mapped style as paragraphStyle, characterStyle or string.
markupTag
xmlTag object or xmlTag name as string
he tag to map as XML tag or string.
Return:
Description:
xmlExportMap
Create a new mapping.
anyItem
None
object
Returns any XML export map.
firstItem
None
object
Returns the first XML export map.
objects
Returns the XML export maps within the specified range.
itemByRange
Name:
Type:
Description:
from
xmlExportMap object or number (index of the object in its containing object)
he xmlExportMap at the start of the range.
to
xmlExportMap object or number (index of the object in its containing object)
he xmlExportMap at the end of the range.
lastItem
None
object
Returns the last XML export map.
middleItem
None
object
Returns the middle XML export map.
object
Returns the next XML export map.
object
Returns the previous XML export map.
nextItem
previousItem
1150
Name:
Type:
Description:
obj
object
he XML export map before the one desired.
Name:
Type:
Description:
obj
object
he XML export map ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
xmlExportPreference Properties Property:
Type:
Access:
Description:
copyFormattedImages
boolean
read/write
If true, copy formatted images to images sub folder.
copyOptimizedImages
boolean
read/write
If true, copy optimized images to images sub folder.
copyOriginalImages
boolean
read/write
If true, copy original images to images sub folder.
excludeDtd
boolean
read/write
If true, exclude the dtd from the exported XML.
exportFromSelected
boolean
read/write
If true, export from a selected element (otherwise export the entire document).
read/write
File encoding to be used when exporting.
read/write
Generate interlaced GIFs.
read/write
Color palette to use for GIF conversion.
read/write
Type of image to generate for optimized and formatted images.
read/write
Format of converted JPEG image.
read/write
Quality of converted JPEG image.
fileEncoding
gifOptionsInterlaced gifOptionsPalette
imageConversion
jpegOptionsFormat
jpegOptionsQuality
Name:
Decimal:
XMLFileEncoding.utf8
1937134904
XMLFileEncoding.utf16
1937125686
XMLFileEncoding.shitJIS
1249077875
boolean Name:
Decimal:
GIFOptionsPalette.adaptivePalette
1886151024
GIFOptionsPalette.macintoshPalette
1886154096
GIFOptionsPalette.webPalette
1886156656
GIFOptionsPalette.windowsPalette
1886156644
Name:
Decimal:
ImageConversion.automatic
1768059764
ImageConversion.jpeg
1785751398
ImageConversion.gif
1734960742
Name:
Decimal:
JPEGOptionsFormat.baselineEncoding
1785751394
JPEGOptionsFormat.progressiveEncoding
1785751408
Name:
Decimal:
JPEGOptionsQuality.low
1701727351
JPEGOptionsQuality.medium
1701727588
JPEGOptionsQuality.high
1701726313
JPEGOptionsQuality.maximum
1701727608
parent
object
read only
he XML export preference’s parent as application or document.
preferredBrowser
string
read/write
he preferred browser for viewing XML.
ruby
boolean
read/write
If true, include Ruby text in the exported XML.
viewAterExport
boolean
read/write
If true, view exported XML in a default viewer.
InDesign CS Scripting Guide JavaScript Reference 1151
xmlImportMap Properties Property:
Type:
Access:
Description:
index
integer
read only
index of the XML import map within its parent application or document
mappedStyle
style object or style name as string
read/write
he style mapped to the XML tag as paragraphStyle, characterStyle or string
markupTag
xmlTag object or xmlTag name as string
read only
he markup tag object as XML tag or string
parent
object
read only
he XML import map’s parent as application or document
Methods Method:
Parameters:
Return:
Description:
remove
None
nothing
Deletes the object.
1152
JavaScript Reference
InDesign CS Scripting Guide
xmlImportMaps Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of XML import maps
Methods Method: add
Parameters: Name:
Type:
Description:
markupTag
xmlTag object or xmlTag name as string
he tag to map as XML tag or string.
mappedStyle
style object or style name as string
the mapped style as paragraphStyle, characterStyle or string.
Return:
Description:
xmlImportMap
Create a new mapping.
anyItem
None
object
Returns any XML import map.
firstItem
None
object
Returns the first XML import map.
objects
Returns the XML import maps within the specified range.
itemByRange
Name:
Type:
Description:
from
xmlImportMap object or number (index of the object in its containing object)
he xmlImportMap at the start of the range.
to
xmlImportMap object or number (index of the object in its containing object)
he xmlImportMap at the end of the range.
lastItem
None
object
Returns the last XML import map.
middleItem
None
object
Returns the middle XML import map.
object
Returns the next XML import map.
object
Returns the previous XML import map.
nextItem
previousItem
Name:
Type:
Description:
obj
object
he XML import map before the one desired.
Name:
Type:
Description:
obj
object
he XML import map ater the one desired.
InDesign CS Scripting Guide JavaScript Reference 1153
xmlImportPreference Properties Property: importStyle
Type: Name:
Decimal:
XMLImportStyles.appendImport
1481466217
XMLImportStyles.mergeImport
1481469289
Access:
Description:
read/write
Whether to append or merge the incoming XML content
importToSelected
boolean
read/write
If true, import to a selected element (otherwise import at the root)
parent
object
read only
he XML import preference’s parent as application or document
1154
JavaScript Reference
InDesign CS Scripting Guide
xmlInstruction Properties Property:
Type:
Access:
Description:
data
string
read/write
he data of the PI
id
integer
read only
he XML instruction’s unique id
index
integer
read only
index of the XML instruction within its parent document, XML element or XML item
parent
object
read only
he XML instruction’s parent as document, XML element or XML item
storyOffset
integer
read only
he location of the object from the beginning of the story
target
string
read/write
he target of the PI
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
xmlElement
Move element before/ater another element or text object, or to beginning/end.
nothing
Deletes the object.
nothing
Select this XML instruction.
move
Name: to
[reference]
remove select
Type: Name:
Description: location.
Decimal:
LocationOptions.before
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions. atBeginning
1650945639
LocationOptions. unknown
1433299822
object
Before/ater this object as XML item or text.
None Name: [existingSelection]
Type:
Description:
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 1155
xmlInstructions Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of XML instructions
Methods Method: add
Parameters: Name:
Type:
Description:
storyOffset
insertionPoint object or integer
Offset within the story.
[target]
string
Target.
[data]
string
Data.
Return:
Description:
xmlInstruction
Create a new XML processing instruction.
anyItem
None
object
Returns any XML instruction.
firstItem
None
object
Returns the first XML instruction.
object
Returns the XML instruction with the specified ID.
objects
Returns the XML instructions within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
xmlInstruction object or number (index of the object in its containing object)
he xmlInstruction at the start of the range.
to
xmlInstruction object or number (index of the object in its containing object)
he xmlInstruction at the end of the range.
lastItem
None
object
Returns the last XML instruction.
middleItem
None
object
Returns the middle XML instruction.
object
Returns the next XML instruction.
object
Returns the previous XML instruction.
nextItem
previousItem
1156
Name:
Type:
Description:
obj
object
he XML instruction before the one desired.
Name:
Type:
Description:
obj
object
he XML instruction ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
xmlItem Properties Property:
Type:
Access:
Description:
dtds
dtDs
read only
All dtds
id
integer
read only
he XML item’s unique id
index
integer
read only
index of the XML item within its parent document, XML element or XML item
parent
object
read only
he XML item’s parent as document, XML element or XML item
xmlComments
xmlComments
read only
All XML comments
xmlElements
xmlElements
read only
All XML elements
xmlInstructions
xmlInstructions
read only
All XML instructions
xmlItems
xmlItems
read only
All XML items
Methods Method:
Parameters:
Return:
Description:
duplicate
None
object
Duplicates the object.
xmlElement
Move element before/ater another element or text object, or to beginning/end.
nothing
Deletes the object.
nothing
Select this XML item.
move
Name: to
[reference]
remove select
Type: Name:
Description: location.
Decimal:
LocationOptions.before
1650812527
LocationOptions.ater
1634104421
LocationOptions.atEnd
1701733408
LocationOptions. atBeginning
1650945639
LocationOptions. unknown
1433299822
object
Before/ater this object as XML item or text.
None Name: [existingSelection]
Type:
Description:
Name:
Decimal:
SelectionOptions. replace
1701998700
SelectionOptions.addTo
1633969202
SelectionOptions. removeFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide JavaScript Reference 1157
xmlItems Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer).
length
integer
read only
he number of XML items
Methods Method:
Parameters:
Return:
Description:
anyItem
None
object
Returns any XML item.
firstItem
None
object
Returns the first XML item.
object
Returns the XML item with the specified ID.
objects
Returns the XML items within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
xmlItem object or number (index of the object in its containing object)
he xmlItem at the start of the range.
to
xmlItem object or number (index of the object in its containing object)
he xmlItem at the end of the range.
lastItem
None
object
Returns the last XML item.
middleItem
None
object
Returns the middle XML item.
object
Returns the next XML item.
object
Returns the previous XML item.
nextItem
previousItem
1158
Name:
Type:
Description:
obj
object
he XML item before the one desired.
Name:
Type:
Description:
obj
object
he XML item ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
xmlTag Properties Property:
Type:
Access:
Description:
id
integer
read only
he XML tag’s unique id
index
integer
read only
index of the XML tag within its parent application or document
label
string
read/write
A label that can be set to any string
name
string
read/write
he name of the XML tag
parent
object
read only
he XML tag’s parent as application or document
tagColor
uiColor constant or array of numbers as [r, g, b]
read/write
he color of the tag as Array of 3 numbers or idUIcolors
Methods Method: extractLabel
insertLabel
remove
Parameters: Name:
Type:
Description:
key
string
he key.
Name:
Type:
Description:
key
string
he key.
value
string
he string to insert in the label.
None
Return:
Description:
string
Gets the label value associated with the given key (label name).
nothing
Sets the string associated with the given key (label name).
nothing
Deletes the object.
InDesign CS Scripting Guide JavaScript Reference 1159
xmlTags Properties Property:
Type:
Access:
Description:
item
object
read only
Returns the object with the specified index (as integer) or name (as string).
length
integer
read only
he number of XML tags
Methods Method: add
Parameters: Name:
Type:
Description:
[name]
string
he tag name as string.
[tagColor]
uiColor constant or array of numbers as [r, g, b]
he color of the tag as Array of 3 numbers or idUIcolors.
Return:
Description:
xmlTag
Create a new tag.
anyItem
None
object
Returns any XML tag.
firstItem
None
object
Returns the first XML tag.
object
Returns the XML tag with the specified ID.
objects
Returns the XML tags within the specified range.
itemByID
itemByRange
Name:
Type:
Description:
id
integer
he id of the object.
Name:
Type:
Description:
from
xmlTag object, number (index of the object in its containing object), or string (name of the object)
he xmlTag at the start of the range.
to
xmlTag object, number (index of the object in its containing object), or string (name of the object)
he xmlTag at the end of the range.
lastItem
None
object
Returns the last XML tag.
middleItem
None
object
Returns the middle XML tag.
object
Returns the next XML tag.
object
Returns the previous XML tag.
nextItem
previousItem
1160
Name:
Type:
Description:
obj
object
he XML tag before the one desired.
Name:
Type:
Description:
obj
object
he XML tag ater the one desired.
JavaScript Reference
InDesign CS Scripting Guide
xmlViewPreference Properties Property:
Type:
Access:
Description:
parent
object
read only
he XMLview preference’s parent as application or document
showAttributes
boolean
read/write
If true, show attributes as well as elements in the structure view
showStructure
boolean
read/write
If true, show the structure information for the document
showTaggedFrames
boolean
read/write
If true, show tagged frames in the document
showTagMarkers
boolean
read/write
If true, show tag markers for tagged text
showTextSnippets
boolean
read/write
If true, show text snippets of an element’s content in the structure view
InDesign CS Scripting Guide JavaScript Reference 1161
Visual Basic Reference
his section describes the objects in the Windows InDesign object library. he objects are listed in alphabetical order, and every property and method of each object are shown. Note: Due to the constraints of our page layout, we’ve had to hyphenate some scripting terms. When you are entering the term, do not enter the hyphen. No scripting terms in InDesign contain hyphens.
About Visual Basic versions Visual Basic is available in many versions, including Visual Basic 5 CCE (Control Creation Edition), Visual Basic 6, Visual Basic. NET, Visual Basic for Applications (VBA), or VBScript. Each version has its own advantages and disadvantages, but all of the above versions can be used to create InDesign scripts. he example scripts on your InDesign CD are written in VBScript. We chose VBScript because no additional sotware is required to run or edit VBScripts (you can edit them with any text editor, and run them using InDesign’s Scripts palette).
About Option Explicit In Visual Basic 6 and Visual Basic.NET, you can turn a feature named “Option Explicit” on or off (in Visual Basic.NET, it’s turned on by default). When Option Explicit is turned on, Visual Basic requires that you declare (i.e., “Dim”) every variable used in your script. While this is generally considered good programming practice and results in improved script performance, it can lead to script errors due to the construction of InDesign’s object model. Here’s an example: DimmyInDesignasInDesign.Application DimmyDocumentasInDesign.Document DimmyPageasInDesign.Page DimmyPageItemasInDesign.PageItem SetmyDocument=myInDesign.Documents.Add setmyPage=myDocument.Pages.Item(1) myPage.Rectangles.add myPage.Ovals.add myPage.Polygons.add FormyCounter=1tomyPage.PageItems.Count setmyPageItem=myPage.PageItems(myCounter) Next
When you run the above script with Option Explicit turned on, Visual Basic will generate a “Type Mismatch” error on the line “Set myPageItem...”. Why does this happen? It’s because you declared the variable “myPageItem” as an InDesign PageItem object. During the execution of the “For...Next” loop, InDesign will return a Rectangle object, an Oval object, or a Polygon object. None of these objects are of the PageItem type. To get around this problem, you can either turn Option Explict off and leave the object variable “myPageItem” undeclared, or you can declare it as a variable of the generic type “Object”: DimmyPageItemasObject
About For Each...Next loops When you use a For Each...Next loop to process an object collection, InDesign will limit the number of iterations to 255 to prevent crashes in Visual Basic’s Watch Window and Locals Window. his means that you should not use this looping construct for collections with more than 255 members (Characters and Fonts are good examples of collections that may contain more than 255 objects). Instead, use a For X = 1 to Y...Next loop (where X is the initial condition and Y is the ending condition). 1162
Visual Basic Reference
InDesign CS Scripting Guide
Referring to objects by name You can refer to named objects in InDesign collection objects (such as ParagraphStyles or Swatches) using the name of the object. To do this, you use the same form as you would use to refer to the item by its index, replacing the index with a string containing the name of the object. To refer to the color “Red” in the active document, for example, you would enter: SetmyColor=myInDesign.ActiveDocument.Colors.Item("Red")
he page item objects (Rectangles, Ovals, Polygons, GraphicLines, TextFrames, and Groups), do not have a Name property, but you can use the Label property to refer to the item: RemGetareferencetoalloftheRectanglesonpage1whoselabelis"myRectangle". SetmyRectangle=myInDesign.ActiveDocument.Pages.Item(1).Rectangles.Item("myRectangle")
Note that if more than one object has the specified label, multiple objects will be returned.
About properties he properties of an object are the object’s attributes—a character object, for example, has AppliedFont, FontStyle, PointSize, and BaselineShit properties. Here’s an example property reference table (from the book object): Property:
Type:
Access:
Description:
AutomaticDocumentConversion
Boolean
read/write
Whether to automatically convert document during repagination and synchronization
AutomaticPagination
Boolean
read/write
If true, repaginate the book documents when the book pagination changes.
BookContents
BookContents
read only
Every InDesign book content
FilePath
String
read only
he file path to the book file (does not include the file name).
FullName
String
read only
he file path to the book file, including the file name.
Index
Long
read only
Index of the Book within its parent Application
InsertBlankPage
Boolean
read/write
If true, insert blank pages to meet the odd/even setting.
Modified
Boolean
read only
If true, the document has been modified since it was last saved.
Name
String
read only
he file name of the book.
Parent
Application
read only
he parent of the object.
PrintPreferences
PrintPreference
read only
he print preferences of the book.
read/write
Sets the repagination options for the book.
RepaginationOption
Name:
Decimal:
idRepaginateOption.idNextPage
1885500011
idRepaginateOption.idNextOddPage
1332765291
idRepaginateOption.idNextEvenPage
1164993131
Saved
Boolean
read only
If true, the document has been saved since it was opened.
StyleSourceDocument
Document
read/write
he current master document.
SynchronizeOptions
SynchronizeOptions
read only
Every synchronize option style
InDesign CS Scripting Guide Visual Basic Reference 1163
Many of the properties in the book object are read only. In general, read only properties are either system information (such as the unique id assigned to InDesign objects) or are set as the result of a command (the full name of the book file, for example, is set by saving the book file as a given name). he read/write properties, however, can be changed, as shown below: RemGivenabookdocument"myBook" myBook.AutomaticPagination=True; myBook.InsertBlankPage=True;
he value type shown for the RepaginationOptions property is an InDesign constant (or “enum” for “enumeration”). If you are running your script from InDesign’s Scripts palette, you can use the name form of the InDesign constant (e.g., “idRepaginateOption. idNextPage”); if you are running the script from outside InDesign, use the decimal form (e.g., 1885500011).
About methods Here’s an example method reference (from the document object): Method: Export
Parameters: Name:
Type:
Description:
Format
Variant
he export format to use.
To
String
he file path to the exported file.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Return:
Description:
Nothing
Export the object to file.
In the above table, the parameters shown surrounded by brackets ([ and ]) are optional parameters. he following is an example of the Document.Export method: RemGivenaDocumentobjectvariable"myDocument"andaPDFexportpresetnamed"myPrePressPreset" myDocument.ExportidExportFormat.idPDFType,"c:\myExamplePDF.pdf",false,"myPrePressPreset"
InDesign also supports referring to method parameters by name, as shown in the following: myDocument.ExportFormat:=idExportFormat.idPDFType,To:="c:\myExamplePDF.pdf",Using:="myPrePressPreset"
If you use this approach, you can omit unused optional parameters.
1164
Visual Basic Reference
InDesign CS Scripting Guide
AngleCombobox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
EditValue
Double
read/write
Real number value of the control.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the AngleCombobox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
StringList
Variant
read/write
A list of the strings that appear on the menu of the control.
InDesign CS Scripting Guide Visual Basic Reference 1165
AngleComboboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of AngleComboboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
AngleCombobox
Create a new AngleCombobox.
AnyItem
None
AngleCombobox
Returns any AngleCombobox.
FirstItem
None
AngleCombobox
Returns the first AngleCombobox.
AngleCombobox
Returns the AngleCombobox with the specified ID.
AngleComboboxes
Returns the AngleComboboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the item.
Name:
Type:
Description:
From
AngleCombobox
he angle combobox at the start of the range.
To
AngleCombobox
he angle combobox at the end of the range.
LastItem
None
AngleCombobox
Returns the last AngleCombobox.
MiddleItem
None
AngleCombobox
Returns the middle AngleCombobox.
AngleCombobox
Returns the next AngleCombobox.
AngleCombobox
Returns the previous AngleCombobox.
NextItem
PreviousItem
1166
Name:
Type:
Description:
Obj
Object
he AngleCombobox before the one desired.
Name:
Type:
Description:
Obj
Object
he AngleCombobox ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
AngleEditbox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
EditValue
Double
read/write
Real number value of the control.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the AngleEditbox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
InDesign CS Scripting Guide Visual Basic Reference 1167
AngleEditboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of AngleEditboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
AngleEditbox
Create a new angle editbox.
AnyItem
None
AngleEditbox
Returns any AngleEditbox.
FirstItem
None
AngleEditbox
Returns the first AngleEditbox.
AngleEditbox
Returns the AngleEditbox with the specified ID.
AngleEditboxes
Returns the AngleEditboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Variant
he angle editbox at the start of the range, or the index of the angle editbox at the start of the range.
To
Variant
he angle editbox at the end of the range, or the index of the angle editbox at the end of the range.
LastItem
None
AngleEditbox
Returns the last AngleEditbox.
MiddleItem
None
AngleEditbox
Returns the middle AngleEditbox.
AngleEditbox
Returns the next AngleEditbox.
AngleEditbox
Returns the previous AngleEditbox.
NextItem
PreviousItem
1168
Name:
Type:
Description:
Obj
Object
he AngleEditbox before the one desired.
Name:
Type:
Description:
Obj
Object
he AngleEditbox ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Application Properties Property:
Type:
Access:
Description:
ActiveDocument
Document
read/write
he active (front-most) document.
ActiveScript
String
read only
he file path to the current script running from the scripts palette.
ActiveWindow
Variant
read/write
he active (front-most) window.
Books
Books
read only
he open InDesign books.
ButtonPreferences
ButtonPreference
read only
he application default button preferences.
ChangePreferences
ChangePreference
read/write
he current change settings for InDesign’s find/change feature. his object corresponds to options found in the Find/ Change panel (including the options in the Change Format Settings section of that panel).
CharacterStyles
CharacterStyles
read only
he application default character styles.
ClipboardPreferences
ClipboardPreference
read only
he application default clipboard preferences.
Colors
Colors
read only
he application default colors.
ColorSettings
ColorSetting
read only
he application default color management settings.
DashedStrokeStyles
DashedStrokeStyles
read only
he application default dashed stroke styles.
Dialogs
Dialogs
read only
All dialogs.
DictionaryPreferences
DictionaryPreference
read only
he application default user dictionary preferences. his object corresponds to the Dictionary panel of the Preferences dialog box.
DisplayPerformancePreferences
DisplayPerformancePreference
read only
he application default display performance preferences. his object corresponds to the Display Performance panel of the Preferences dialog box.
DisplaySettings
DisplaySettings
read only
Every display setting
DocumentPreferences
DocumentPreference
read only
he application default document preferences. his object corresponds to the Document panel of the Preferences dialog box.
DocumentPresets
DocumentPresets
read only
he document presets.
Documents
Documents
read only
All open documents.
DottedStrokeStyles
DottedStrokeStyles
read only
he application default dotted stroke styles.
EPSExportPreferences
EPSExportPreference
read only
EPS export preferences.
EPSImportPreferences
EPSImportPreference
read only
EPS import preferences.
ExcelImportPreferences
ExcelImportPreference
read only
he application default Excel Import preferences. his object corresponds to the Excel Import dialog box (which appears when you import an Excel document and have turned on the Show Options option in the Place dialog box).
FilePath
String
read only
he file path to the folder containing the InDesign application (does not include the file name).
InDesign CS Scripting Guide Visual Basic Reference 1169
Property:
Type:
Access:
Description:
FindPreferences
FindPreference
read/write
he current find settings for InDesign’s find/change feature. his object corresponds to options found in the Find/ Change panel (including the options in the Find Format Settings section of that panel).
FlattenerPresets
FlattenerPresets
read only
Transparency flattener presets.
Fonts
Fonts
read only
A list of the fonts available to the application.
FullName
String
read only
he file path to the InDesign application file, including the file name.
GalleyPreferences
GalleyPreference
read only
he application default Story Editor preferences. his object corresponds to the Story Editor Display panel of the Preferences dialog box.
GeneralPreferences
GeneralPreference
read only
he application default general preferences. his object corresponds to the General panel of the Preferences dialog box.
Gradients
Gradients
read only
he application default gradients.
GridPreferences
GridPreference
read only
he application default grid preferences. his object corresponds to the Grids panel of the Preferences dialog box.
GuidePreferences
GuidePreference
read only
he application default guide preferences. his object corresponds to the Guides and Pasteboard panel of the Preferences dialog box.
ImageIOPreferences
ImageIOPreference
read only
Image IO preferences
IMEPreferences
IMEPreference
read only
IME preferences
IndexGenerationOptions
IndexOptions
read only
he options controlling index generation. his object corresponds to the Generate Index dialog box (to display this dialog box, choose Generate Index from the Index palette menu).
Inks
Inks
read only
he applciation default inks.
JPEGExportPreferences
JPEGExportPreference
read only
JPEG export preferences
LanguagesWithVendors
LanguagesWithVendors
read only
he available languages with vendors.
LayoutAdjustmentPreferences
LayoutAdjustmentPreference
read only
he application default layout adjustment preferences. he properties in this object correspond to the options shown in the Layout Adjustment dialog box (choose Layout Adjustment from the Layout menu to display this dialog box).
LayoutWindows
LayoutWindows
read only
he current layout windows.
Libraries
Libraries
read only
A list of the open library files.
1170
Visual Basic Reference
InDesign CS Scripting Guide
Property: Locale
Type: Name:
Decimal:
idLocale.idDanishLocale
1279476846
idLocale.idEnglishLocale
1279477102
idLocale.idInternationalEnglishLocale
1279477097
idLocale.idFinnishLocale
1279477358
idLocale.idFrenchLocale
1279477362
idLocale.idGermanLocale
1279477613
idLocale.idItalianLocale
1279478132
idLocale.idPortugueseLocale
1279479911
idLocale.idSpanishLocale
1279480688
idLocale.idSwedishLocale
1279480695
idLocale.idJapaneseLocale
1279478384
Access:
Description:
read only
he locale of the application.
MarginPreferences
MarginPreference
read only
he application default margin preferences. hese settings affect all new documents you create, but have no effect on the margin preferences of existing documents. his object corresponds to the options found in the Margins and Columns dialog box.
MixedInkGroups
MixedInkGroups
read only
he application default mixed ink groups.
MixedInks
MixedInks
read only
he application default mixed inks.
Name
String
read only
he name of the application.
PackageForGoLivePreferences
PackageForGoLivePreference
read only
he default Package For GoLive preferences.
PalettesVisible
Boolean
read/write
If true, the palettes are visible.
ParagraphStyles
ParagraphStyles
read only
he application default paragraph styles.
Parent
Application
read only
he parent of the object.
PasteboardPreferences
PasteboardPreference
read only
he application default pasteboard preferences. he properties of this object correspond to the pasteboard-related options in the Guides and Pasteboard panel of the Preferences dialog box.
PDFExportPreferences
PDFExportPreference
read only
he application default PDF export preferences.
PDFExportPresets
PDFExportPresets
read only
he PDF export presets.
PDFPlacePreferences
PDFPlacePreference
read only
PDF place preferences.
PolygonPreferences
PolygonPreference
read only
he application default polygon preferences. his object corresponds to the Polygon Settings dialog box (to display this dialog box, double-click the Polygon tool in the Tools palette).
PrinterPresets
PrinterPresets
read only
he printer presets.
Selection
Variant
read/write
he current selection of the active window.
SpellPreferences
SpellPreference
read only
he application default spelling preferences. his object corresponds to the Spelling panel of the Preferences dialog box.
StoryPreferences
StoryPreference
read only
he application default story preferences. his object corresponds to the Story palette. hese settings affect all new InDesign documents, but have no effect on the story preferences in existing documents.
StoryWindows
StoryWindows
read only
he current story windows.
InDesign CS Scripting Guide Visual Basic Reference 1171
Property:
Type:
Access:
Description:
StripedStrokeStyles
StripedStrokeStyles
read only
he application default striped stroke styles.
StrokeStyles
StrokeStyles
read only
he application default stroke styles.
SVGExportPreferences
SVGExportPreference
read only
SVG export preferences.
Swatches
Swatches
read only
he application default swatches.
TaggedTextExportPreferences
TaggedTextExportPreference
read only
he application tagged text export preferences. his object corresponds to the Tagged Text Export dialog box, which appears when you export InDesign tagged text.
TaggedTextImportPreferences
TaggedTextImportPreference
read only
he application default tagged text import preferences. his object corresponds to the Tagged Text Import dialog box (which appears when you import a tagged text file and have turned on the Show Options option in the Place dialog box).
TextDefaults
TextDefault
read only
he application default text formatting. Changing the application default text formatting sets the default formatting for all new documents, but has no effect on existing documents. To change the default text formatting for an existing document, change the settings of the text default object for that document.
TextExportPreferences
TextExportPreference
read only
he application text export preferences. his object corresponds to the Text Export dialog box, which appears when you export text.
TextFramePreferences
TextFramePreference
read only
he application default text frame preferences. Changing the properties of this object affects all new documents; the text frame preferences in existing documents are not changed.
TextImportPreferences
TextImportPreference
read only
he application default text import preferences. his object corresponds to the Text Import dialog box (which appears when you import a text file and have turned on the Show Options option in the Place dialog box).
TextPreferences
TextPreference
read only
he application default text preferences. his object corresponds to the Text panel of the Preferences dialog box.
Tints
Tints
read only
he application default tints.
TOCStyles
TOCStyles
read only
he application default TOC styles.
TransformPreferences
TransformPreference
read only
he application default transform preferences.
TransparencyPreferences
TransparencyPreference
read only
he application default transparency preferences. his object corresponds to the setting of the Transparency Blend Space submenu of the Edit menu.
TrapPresets
TrapPresets
read only
he trap presets.
UnusedSwatches
Objects
read only
A list of the unused swatches.
UserDictionaries
UserDictionaries
read only
he user dictionaries available to the application.
read/write
Use this property to suppress or activate the application’s display of alerts and dialog boxes. If you turn this property off, make certain that you turn it on again before your script completes execution.
UserInteractionLevel
1172
Name:
Decimal:
idUserInteractionLevels.idNeverInteract
1699640946
idUserInteractionLevels.idInteractWithAll
1699311169
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Version
Double
read only
he version of InDesign.
ViewPreferences
ViewPreference
read only
he application default view preferences. he properties of this object correspond to the options in the Units and Increments panel of the Preferences dialog box.
Visible
Boolean
read only
If true, the application is visible.
Windows
Windows
read only
A list of the current layout and story windows.
WordRTFImportPreferences
WordRTFImportPreference
read only
he Word and RTF import preferences.
XMLExportMaps
XMLExportMaps
read only
he XML default style to XML tag mappings.
XMLExportPreferences
XMLExportPreference
read only
he default XML export preferences.
XMLImportMaps
XMLImportMaps
read only
he application default XML tag to style mappings.
XMLImportPreferences
XMLImportPreference
read only
he default XML import preferences.
XMLTags
XMLTags
read only
he application default XML tags.
XMLViewPreferences
XMLViewPreference
read only
he default XML view preferences.
Methods Method:
Parameters:
Return:
Description:
Activate
None
Nothing
Brings InDesign to the front.
CascadeWindows
None
Nothing
Arranges the open InDesign document windows in a “cascade” (i.e., overlapping windows).
Copy
None
Nothing
Copies the selection in the active document window to the clipboard.
Objects
Create a new independent objects collection.
CreateCollection
Name:
Type:
Description:
[Objects]
Object or Array of Objects
he objects to add to the collection.
Cut
None
Nothing
Cuts the selection in the active document window to the clipboard.
DeleteUnusedTags
None
Nothing
Deletes all unused XML markup tags.
Nothing
Runs a script. he script can be either a string or a file.
DoScript
Name:
Type:
Description:
Script
file name as String or script as String
he script to execute.
[Language]
Name:
Decimal:
idScriptLanguage. idVisualBasic
1447185511
idScriptLanguage. idJavascript
1246973031
idScriptLanguage. idUnknown
1433299822
he language of the script to execute. If not specified, the language used to call this method is used.
InDesign CS Scripting Guide Visual Basic Reference 1173
Method: ExportPresets
Parameters: Name:
Type:
Format
Import
Open
Paste
1174
Decimal:
idExportPresetFormat. idPDFExportPresetsFormat
1716745324
idExportPresetFormat. idPrinterPresetsFormat
1918071916
idExportPresetFormat. idFlattenerPresetsFormat
1951626348
idExportPresetFormat. idDocumentPresetsFormat
1683190892
he file to export to.
Name:
Type:
Description:
Name:
Decimal:
idExportPresetFormat. idPDFExportPresetsFormat
1716745324
idExportPresetFormat. idPrinterPresetsFormat
1918071916
idExportPresetFormat. idFlattenerPresetsFormat
1951626348
idExportPresetFormat. idDocumentPresetsFormat
1683190892
String
he file to import from.
Name:
Type:
Description: Decimal:
idImportFormat.idCharacterStylesFormat
1131565940
idImportFormat.idParagraphStylesFormat
1885885300
idImportFormat. idTextStylesFormat
1668305780
idImportFormat. idTOCStylesFormat
1415795572
String
An InDesign file to import from.
Name:
Type:
Description:
From
String
he file name.
Name:
Type:
Description:
From
file name as String
he file to open.
[ShowingWindow]
Boolean
If true, show the document window.
Visual Basic Reference
InDesign CS Scripting Guide
Nothing
Imports a file containing document presets, flattener presets, PDF export presets, or printer prests. To import text or graphics, use the import command of the document, spread, page, page item, or text object you want to import into. To import XML tags, use the import xml tags command.
Nothing
Import styles.
Nothing
Load a set of tags from an external file.
Variant
Opens a document, book or library.
Nothing
Pastes data from the clipboard into the active document window.
he type of styles to import.
From
None
Export the presets to a file.
he preset format.
From
Name:
Description:
Nothing
he preset format.
String
Format
LoadXMLTags
Name:
To
Format
ImportStyles
Description:
Return:
Method:
Parameters:
Return:
Description:
PasteInPlace
None
Nothing
Paste data from the clipboard into front document window at the same position as the original
PasteInto
None
Nothing
Pastes data from the clipboard into the selected object in the active document window.
Nothing
Prints one or more documents.
Nothing
Quits InDesign.
Nothing
Save a set of tags to an external file.
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
PrintOut
Quit
Name:
Type:
Description:
From
file path as String, or, for multiple files, file paths as Array of Strings
One or more files.
[PrintDialog]
Boolean
If true, display the Print dialog box.
[Using]
String
he name of the printer preset.
Name:
Type:
Description:
[Saving]
SaveXMLTags
Search
Name:
Decimal:
idSaveOptions.idNo
1852776480
idSaveOptions.idAsk
1634954016
idSaveOptions.idYes
2036691744
Use idAsk to display a dialog box asking if the user would like to save changes for each unsaved open document; use idNo to close all documents without savign; use idYes to save all unsaved open document.
Name:
Type:
Description:
To
String
he file to export to.
Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
[ReplacingWith]
Boolean
String
If true, limit the search to text that matches the case used in the search string. he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character) For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
InDesign CS Scripting Guide Visual Basic Reference 1175
Method: Select
Parameters: Name:
Type:
Description:
SelectableItems
Object, Array of Objects, or idNothingEnum.idNothing (to deselect all)
he object(s) to select.
[ExistingSelection]
TileWindows
1176
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
None
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Selects an object or objects. If the object is a text object (e.g., characters, words, lines, paragraphs), any other selected objects are deselected (the AppendSelection parameter has no effect).
Nothing
Arranges the open InDesign document windows in a “tiled” layout (i.e., non-overlapping windows).
How to handle the existing selection.
Asset Properties Property: AssetType
Type: Name:
Decimal:
idAssetType.idImageType
1952409965
idAssetType.idEPSType
1952400720
idAssetType.idPDFType
1952403524
idAssetType.idGeometryType
1952409445
idAssetType.idPageType
1952411745
idAssetType.idTextType
1952412773
Access:
Description:
read/write
he type of the asset.
Date
Date
read only
he date and time the asset was created.
Description
String
read/write
A description of the asset.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Asset within its parent Library
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the asset.
Parent
Library
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Variant
Place the asset in a document.
ExtractLabel
InsertLabel
PlaceAsset
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
On
Document
he document in which to place the asset.
InDesign CS Scripting Guide Visual Basic Reference 1177
Assets Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Assets
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Asset
Returns any Asset.
FirstItem
None
Asset
Returns the first Asset.
Asset
Returns the Asset with the specified ID.
Assets
Returns the Assets within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
Asset
he Asset at the start of the range.
To
Asset
he Asset at the end of the range.
LastItem
None
Asset
Returns the last Asset.
MiddleItem
None
Asset
Returns the middle Asset.
Asset
Returns the next Asset.
Asset
Returns the previous Asset.
NextItem
PreviousItem
1178
Name:
Type:
Description:
Obj
Object
he Asset before the one desired.
Name:
Type:
Description:
Obj
Object
he Asset ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Behavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Behavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the behavior.
Parent
Variant
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1179
Behaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Behaviors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Behavior
Returns any Behavior.
FirstItem
None
Behavior
Returns the first Behavior.
Behavior
Returns the Behavior with the specified ID.
Behaviors
Returns the Behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
Behavior
he behavior at the start of the range.
To
Behavior
he behavior at the end of the range.
LastItem
None
Behavior
Returns the last Behavior.
MiddleItem
None
Behavior
Returns the middle Behavior.
Behavior
Returns the next Behavior.
Behavior
Returns the previous Behavior.
NextItem
PreviousItem
1180
Name:
Type:
Description:
Obj
Object
he Behavior before the one desired.
Name:
Type:
Description:
Obj
Object
he Behavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Book Properties Property:
Type:
Access:
Description:
AutomaticDocumentConversion
Boolean
read/write
Whether to automatically convert document during repagination and synchronization
AutomaticPagination
Boolean
read/write
If true, repaginate the book documents when the book pagination changes.
BookContents
BookContents
read only
Every InDesign book content
FilePath
String
read only
he file path to the book file (does not include the file name).
FullName
String
read only
he file path to the book file, including the file name.
Index
Long
read only
Index of the Book within its parent Application
InsertBlankPage
Boolean
read/write
If true, insert blank pages to meet the odd/even setting.
Modified
Boolean
read only
If true, the document has been modified since it was last saved.
Name
String
read only
he file name of the book.
Parent
Application
read only
he parent of the object.
PrintPreferences
PrintPreference
read only
he print preferences of the book.
read/write
Sets the repagination options for the book.
RepaginationOption
Name:
Decimal:
idRepaginateOption.idNextPage
1885500011
idRepaginateOption.idNextOddPage
1332765291
idRepaginateOption.idNextEvenPage
1164993131
Saved
Boolean
read only
If true, the document has been saved since it was opened.
StyleSourceDocument
Document
read/write
he current master document.
SynchronizeOptions
SynchronizeOptions
read only
Every synchronize option style
Methods Method: Close
Parameters: Name: [Saving]
[SavingIn]
Type: Name:
Description: Decimal:
idSaveOptions.idNo
1852776480
idSaveOptions.idAsk
1634954016
idSaveOptions.idYes
2036691744
Variant
Return:
Description:
Nothing
Close the book.
If true, save changes before closing the book.
he file in which to save the book.
InDesign CS Scripting Guide Visual Basic Reference 1181
Method: Export
Package
PackageForGoLive
1182
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
To
String
A folder, alias or path as string in which to place the packaged files.
CopyingFonts
Boolean
If true, copy required fonts.
CopyingLinkedGraphics
Boolean
If true, copy linked graphics file.
CopyingProfiles
Boolean
If true, copy profiles.
UpdatingGraphics
Boolean
If true, update graphics links before packaging.
IncludingHiddenLayers
Boolean
If true, include objects on hidden layers.
IgnorePreflightErrors
Boolean
If true, ignore preflight errors and package anyways.
CreatingReport
Boolean
If true, create package report.
Name:
Type:
Description:
Location
String
File location for package.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Exports the object to a file.
Boolean
Packages the document.
Boolean
Packages for GoLive.
Method: PrintOut
Save
Synchronize
Parameters: Name:
Type:
Description:
[PrintDialog]
Boolean
If true, display the Print dialog box.
[Using]
Variant
Printer preset to use.
Name:
Type:
Description:
[To]
folder name as String
Where to save the book. If the book is already saved, a copy is saved at this path, the original file is closed the new copy is opened.
None
Return:
Description:
Nothing
Prints the book.
Nothing
Saves the book.
Nothing
Synchronizes the entire Book to the Style Source document.
InDesign CS Scripting Guide Visual Basic Reference 1183
BookContent Properties Property:
Type:
Access:
Description:
Date
Date
read only
he date and time the book content file was last saved.
DocumentPageRange
String
read only
he page range of the book content document.
FullName
String
read only
he file path to the book content file, including the file name.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the BookContent within its parent Book
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Parent
Book
read only
he parent of the object.
Size
Long
read only
Size of the book content file on disk.
read only
he status of the book content file.
Status
Name:
Decimal:
idBookContentStatus.idNormal
1852797549
idBookContentStatus.idMissingDocument
1148150605
idBookContentStatus.idDocumentOutOfDate
1148150596
idBookContentStatus.idDocumentInUse
1148150601
idBookContentStatus.idDocumentIsOpen
1148150607
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
BookContent
Move the book content before/ ater another book content, or to beginning/end.
ExtractLabel
InsertLabel
Move
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
[To]
[Reference]
1184
Visual Basic Reference
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
InDesign CS Scripting Guide
Location.
Before/ater this book content.
Method: Replace
Synchronize
Parameters: Name:
Type:
Description:
FullName
String
Full path name of the replaced book content.
None
Return:
Description:
BookContent
Replace a file.
Nothing
Sync this book content to the Style Source document
InDesign CS Scripting Guide Visual Basic Reference 1185
BookContents Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of BookContents
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
FullName
String
Full path name of the new book content.
Return:
Description:
BookContent
Create a new book content.
AnyItem
None
BookContent
Returns any BookContent.
FirstItem
None
BookContent
Returns the first BookContent.
BookContent
Returns the BookContent with the specified ID.
BookContents
Returns the book contents within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
BookContent
he book content at the start of the range.
To
BookContent
he book content at the end of the range.
LastItem
None
BookContent
Returns the last BookContent.
MiddleItem
None
BookContent
Returns the middle BookContent.
BookContent
Returns the next BookContent.
BookContent
Returns the previous BookContent.
NextItem
PreviousItem
1186
Name:
Type:
Description:
Obj
Object
he BookContent before the one desired.
Name:
Type:
Description:
Obj
Object
he BookContent ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Bookmark Properties Property:
Type:
Access:
Description:
Bookmarks
Bookmarks
read only
Every bookmark
Destination
Variant
read only
he destination of the bookmark.
Id
Long
read only
A unique number identifying the object.
Indent
Long
read only
he indent level of the bookmark.
Index
Long
read only
Index of the Bookmark within its parent Document or Bookmark
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read/write
he name of the bookmark.
Parent
Variant
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Move this bookmark under another.
Nothing
Go to the bookmark.
ExtractLabel
InsertLabel
Move
ShowBookmark
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
To
Bookmark
he new parent bookmark.
IndentLevel
Long
he new indent level.
None
InDesign CS Scripting Guide Visual Basic Reference 1187
Bookmarks Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Bookmarks
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
Destination
HyperlinkTextDestination, HyperlinkPageDestination, HyperlinkExternalPageDestination or HyperlinkURLDestination
he bookmark’s destination.
Return:
Description:
Bookmark
Create a new Bookmark.
AnyItem
None
Bookmark
Returns any Bookmark.
FirstItem
None
Bookmark
Returns the first Bookmark.
Bookmark
Returns the Bookmark with the specified ID.
Bookmarks
Returns the Bookmarks within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
Bookmark
he bookmark at the start of the range.
To
Bookmark
he bookmark at the end of the range.
LastItem
None
Object
Returns the last Bookmark.
MiddleItem
None
Object
Returns the middle Bookmark.
Object
Returns the next Bookmark.
Object
Returns the previous Bookmark.
NextItem
PreviousItem
1188
Name:
Type:
Description:
Obj
Object
he Bookmark before the one desired.
Name:
Type:
Description:
Obj
Object
he Bookmark ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Books Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Books
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
FullName
String
Full path name of the new book.
Return:
Description:
Book
Create a new Book.
AnyItem
None
Book
Returns any Book.
FirstItem
None
Book
Returns the first Book.
Books
Returns the Books within the specified range.
ItemByRange
Name:
Type:
Description:
From
Book
he book at the start of the range.
To
Book
he book at the end of the range.
LastItem
None
Book
Returns the last Book.
MiddleItem
None
Book
Returns the middle Book.
Book
Returns the next Book.
Book
Returns the previous Book.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Book before the one desired.
Name:
Type:
Description:
Obj
Object
he Book ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1189
BorderPanel Properties Property:
Type:
Access:
Description:
AngleComboboxes
AngleComboboxes
read only
All angle comboboxes
AngleEditboxes
AngleEditboxes
read only
All angle editboxes
BorderPanels
BorderPanels
read only
All border panels
CheckboxControls
CheckboxControls
read only
All checkbox controls
DialogColumns
DialogColumns
read only
All columns
DialogRows
DialogRows
read only
All dialog rows
Dropdowns
Dropdowns
read only
All dropdowns
EnablingGroups
EnablingGroups
read only
All enabling checkbox panels
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the BorderPanel within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
IntegerComboboxes
IntegerComboboxes
read only
All integer comboboxes
IntegerEditboxes
IntegerEditboxes
read only
All integer editboxes
MeasurementComboboxes
MeasurementComboboxes
read only
All measurement comboboxes
MeasurementEditboxes
MeasurementEditboxes
read only
All measurement editboxes
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
PercentComboboxes
PercentComboboxes
read only
All percent comboboxes
PercentEditboxes
PercentEditboxes
read only
All percent editboxes
RadiobuttonGroups
RadiobuttonGroups
read only
All radio button groups
RealComboboxes
RealComboboxes
read only
All real number comboboxes
RealEditboxes
RealEditboxes
read only
All real number editboxes
StaticTexts
StaticTexts
read only
All static texts
TextEditboxes
TextEditboxes
read only
All text editboxes
Widgets
Widgets
read only
All widgets
1190
Visual Basic Reference
InDesign CS Scripting Guide
BorderPanels Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of BorderPanels
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
BorderPanel
Create a new BorderPanel.
AnyItem
None
BorderPanel
Returns any BorderPanel.
FirstItem
None
BorderPanel
Returns the first BorderPanel.
BorderPanel
Returns the BorderPanel with the specified ID.
BorderPanels
Returns the BorderPanels within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
BorderPanel
he border panel at the start of the range, or the index of the border panel at the start of the range.
To
BorderPanel
he border panel at the end of the range, or the index of the border panel at the end of the range.
LastItem
None
BorderPanel
Returns the last BorderPanel.
MiddleItem
None
BorderPanel
Returns the middle BorderPanel.
BorderPanel
Returns the next BorderPanel.
BorderPanel
Returns the previous BorderPanel.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he BorderPanel before the one desired.
Name:
Type:
Description:
Obj
Object
he BorderPanel after the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1191
Button Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scale of the page item relative to its containing page item
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item
AbsoluteVerticalScale
Double
read/write
he vertical scale of the page item relative to its containing page item
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page items
AppearanceName
String
read only
Name of any appearance of field
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
Behaviors
Behaviors
read only
Every behavior object
read/write
he blend mode used to combine the object’s color with the background
read only
Every close window behavior object
read/write
he type of corner effect on the object
BlendMode
CloseWindowBehaviors CornerEffect
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
CloseWindowBehaviors Name:
Decimal:
idCornerEffects.idNone
1852796517
idCornerEffects.idRoundedCorner
1667592804
idCornerEffects.idInverseRoundedCorner
1667591798
idCornerEffects.idInsetCorner
1667591795
idCornerEffects.idBevelCorner
1667588726
idCornerEffects.idFancyCorner
1667589742
CornerRadius
Double
read/write
he radius of the corner
Description
String
read/write
Description
1192
Visual Basic Reference
InDesign CS Scripting Guide
Property: EndCap
EndJoin
EPSs FeatherCornerType
FeatherMode
Type: Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
EPSs Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
Access:
Description:
read/write
he appearance of both ends of an open path
read/write
he appearance of the stroke at corner points
read only
EPSs
read/write
he type of feathering to apply
read/write
he feather mode
FeatherWidth
Double
read/write
he width of the feathering
FillColor
Variant
read/write
he fill color of the object as Swatch or String
FillTint
Double
read/write
he object’s fill tint percentage (-1 indicates no override)
GapColor
Swatch
read/write
Gap color for the page item
GapTint
Double
read/write
Gap tint for the page item
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (Doubles or Strings)
GotoAnchorBehaviors
GotoAnchorBehaviors
read only
Every goto anchor behavior object
GotoFirstPageBehaviors
GotoFirstPageBehaviors
read only
Every goto first page behavior object
GotoLastPageBehaviors
GotoLastPageBehaviors
read only
Every goto last page behavior object
GotoNextPageBehaviors
GotoNextPageBehaviors
read only
Every goto next page behavior object
GotoNextViewBehaviors
GotoNextViewBehaviors
read only
Every goto next view behavior object
GotoPreviousPageBehaviors
GotoPreviousPageBehaviors
read only
Every goto previous page behavior object
GotoPreviousViewBehaviors
GotoPreviousViewBehaviors
read only
Every goto previous view behavior object
GotoURLBehaviors
GotoURLBehaviors
read only
Every goto URL behavior object
GradientFillAngle
Double
read/write
Angle of a linear gradient on the fill
GradientFillLength
Double
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
GradientFillStart
Variant
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill as Array of 2 Units (Doubles or Strings)
GradientStrokeAngle
Double
read/write
Angle of a linear gradient on the stroke
InDesign CS Scripting Guide Visual Basic Reference 1193
Property:
Type:
Access:
Description:
GradientStrokeLength
Double
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the stroke
GradientStrokeStart
Variant
read/write
Center point for a radial gradient or starting point for a linear gradient on the stroke as Array of 2 Units (Doubles or Strings)
GraphicLines
GraphicLines
read only
All graphic lines
Graphics
Graphics
read only
All graphics
Groups
Groups
read only
Groups
HorizontalScale
Double
read/write
he scale percentage in the horizontal direction
Id
Long
read only
he Button’s unique id
Images
Images
read only
Images
Index
Long
read only
Index of the Button within its parent Spread, MasterSpread, Group, TextFrame, Story, Text, Character, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table, Page, Document, Layer or InsertionPoint
IsolateBlending
Boolean
read/write
Indicates whether the object should blend in isolation
ItemLayer
Layer
read/write
he layer the object is on
KnockoutGroup
Boolean
read/write
Indicates whether the object is a knockout group
Label
String
read/write
A label that can be set to any string
read/write
A shape, such as an arrowhead, on the let end of an open path
read/write
he display settings for this page item
LetLineEnd
LocalDisplaySetting
Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Locked
Boolean
read/write
Whether the Button is locked
MiterLimit
Double
read/write
When a corner point switches from a mitered (pointed) join to a beveled (squared-off) join
MovieBehaviors
MovieBehaviors
read only
Movie behaviors collection object
Name
String
read/write
he name of the Button
Nonprinting
Boolean
read/write
Whether the page item is non-printing
Opacity
Double
read/write
he opacity of the object
1194
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
OpenFileBehaviors
OpenFileBehaviors
read only
Open file behaviors collection object
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
Whether to overprint the fill
OverprintGap
Boolean
read/write
Whether to overprint the gap
OverprintStroke
Boolean
read/write
Whether to overprint the stroke
Overridden
Boolean
read only
True if this page item originated on a master spread and was later overridden. It is still linked to the page item on the master
OverriddenMasterPageItem
PageItem
read only
he overridden master page item
PageItems
PageItems
read only
All page items
Parent
Variant
read only
he Button’s parent as Spread, MasterSpread, Group, TextFrame, Story, Text, Character, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table, Page, Document, Layer or InsertionPoint
PDFs
PDFs
read only
PDFs
PICTs
PICTs
read only
PICTs
Polygons
Polygons
read only
All polygons
QuitBehaviors
QuitBehaviors
read only
Quit behaviors collection object
Rectangles
Rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the right end of an open path
read/write
Angle of rotation
RightLineEnd
RotationAngle
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Double
InDesign CS Scripting Guide Visual Basic Reference 1195
Property: ShadowBlendMode
Type: Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Access:
Description:
read/write
he blend mode to use for drawing the shadow
ShadowBlurRadius
Double
read/write
he radius of the blur to apply to the shadow
ShadowColor
Swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
Double
read/write
he opacity of the shadow
ShadowXOffset
Double
read/write
he horizontal offset of the shadow
ShadowYOffset
Double
read/write
he vertical offset of the shadow
ShearAngle
Double
read/write
he shear angle of the page item relative to the spread
ShowHideFieldsBehaviors
ShowHideFieldsBehaviors
read only
Show/hide fields behaviors collection object
SoundBehaviors
SoundBehaviors
read only
Sound behaviors collection object
States
States
read only
Every form field appearance state
read/write
he stroke alignment for the page item
read/write
he stroke color of the object as Swatch or String
read/write
he adjustment to add to the corners of a dashed line
ShadowMode
ShadowOpacity
StrokeAlignment
StrokeColor StrokeCornerAdjustment
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
Name:
Decimal:
idStrokeAlignment.idCenterAlignment
1936998723
idStrokeAlignment.idInsideAlignment
1936998729
idStrokeAlignment.idOutsideAlignment
1936998735
Variant Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
StrokeDashAndGap
Variant
read/write
he dash and gap settings of a dashed line. A list of up to 6 values as Array of Units (Doubles or Strings)
StrokeTint
Double
read/write
he object’s stroke tint percentage (-1 indicates no override)
1196
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
StrokeType
StrokeStyle
read/write
he stroke type
StrokeWeight
Double
read/write
he weight (in points) to apply to the stroke of the object
TextFrames
TextFrames
read only
Text Frames
TextWrapPreferences
TextWrapPreference
read only
he text wrap preferences
VerticalScale
Double
read/write
he scale percentage in the vertical direction
ViewZoomBehaviors
ViewZoomBehaviors
read only
View Zoom behaviors collection object
read/write
visibility of the item in the output PDF
VisibilityInPdf
Name:
Decimal:
idVisibilityInPdf.idVisibleInPdf
1180068211
idVisibilityInPdf.idHiddenInPdf
1181247844
idVisibilityInPdf.idVisibleButDoesNotPrintInPdf
1180061264
idVisibilityInPdf.idHiddenButPrintableInPdf
1179140688
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width.
WMFs
WMFs
read only
WMFs
Methods Method: AddPath
ApplyAppearance
Parameters: Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
Using
String
he appearance.
Return:
Description:
PageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
Nothing
Apply an appearance.
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
PageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
ExcludeOverlapPath
Name:
Type:
Description:
With
Objects
he objects to exclude.
InDesign CS Scripting Guide Visual Basic Reference 1197
Method: Export
ExtractLabel
Fit
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
IntersectPath
1198
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
Name:
Name:
Decimal:
idFitOptions. idContentToFrame
1668575078
idFitOptions. idFrameToContent
1718906723
idFitOptions. idCenterContent
1667591779
idFitOptions. idProportionally
1668247152
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
he objects to intersect with.
InDesign CS Scripting Guide
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
PageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objects > Pathfinder > Intersect).
he fit option.
Name:
Visual Basic Reference
Return:
Method:
Parameters:
MakeCompoundPath
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Markup
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
MinusBack
Move
Override
Place
PlaceXML
Return:
Description:
PageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound Paths>Make command.
Nothing
Markup layout content with XML preserving the existing content.
PageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
PageItem
Overrides an item from the master page and places it on the page.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
ReleaseCompoundPath
None
Objects
Releases a compound path and returns the released page items. Corresponds to the Object>Compound Path>Release menu option.
RemoveOverride
None
Nothing
Removes a locally overriden master page item
InDesign CS Scripting Guide Visual Basic Reference 1199
Method:
Parameters:
Return:
Description:
ResetScaling
None
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Resize
1200
Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to scale around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Rotate
Select
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to rotate around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Rotate the page item.
Nothing
Select this Button.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
InDesign CS Scripting Guide Visual Basic Reference 1201
Method: Shear
Store
SubtractPath
1202
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
PageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
Method: Unlink
Parameters: Name: From
Type: Name:
Description: Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
What to unlink from.
Return:
Description:
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide Visual Basic Reference 1203
ButtonPreference Properties Property:
Type:
Access:
Description:
AppearanceName
String
read/write
Name of any appearance of field
Name
String
read/write
he name of the ButtonPreference
Parent
Variant
read only
he ButtonPreference’s parent as Application or Document
1204
Visual Basic Reference
InDesign CS Scripting Guide
Buttons Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Buttons
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Layer]
Variant
he layer on which to create the Button as Layer.
[At]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Button
Create a new button.
Location.
Before/ater this Button or at the beginning/end of this Document, Spread, Master Spread, Page or Layer as Document, Spread, MasterSpread, Page or Layer.
AnyItem
None
Object
Returns any Button.
FirstItem
None
Object
Returns the first Button.
Description:
Object
Returns the Button with the specified ID.
Button
Returns the buttons within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he button at the start of the range, or the index of the button at the start of the range.
To
Variant
he button at the end of the range, or the index of the button at the end of the range.
LastItem
None
Object
Returns the last Button.
MiddleItem
None
Object
Returns the middle Button.
InDesign CS Scripting Guide Visual Basic Reference 1205
Method: NextItem
PreviousItem
1206
Parameters: Name:
Type:
Description:
Obj
Object
he Button before the one desired.
Name:
Type:
Description:
Obj
Object
he Button ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Object
Returns the next Button.
Object
Returns the previous Button.
Cell Properties Property:
Type:
Access:
Description:
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items contained by this object, regardless of their location in the object hierarchy (i.e., including objects nested within other objects, such as groups).
AutoGrow
Boolean
read/write
If true, the cell will expand to display its content.
BottomEdgeStrokeColor
Swatch
read/write
he stroke color of the bottom edge of the cell.
BottomEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the bottom edge of the cell.
BottomEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the bottom edge of the cell.
BottomEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the bottom edge of the cell (-1 indicates 100%, or no tint override).
BottomEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the bottom edge of the cell.
BottomEdgeStrokePriority
Long
read/write
he stroke priority of the bottom edge
BottomEdgeStrokeTint
Double
read/write
he tint applied to the stroke of the bottom edge of the cell (-1 indicates 100%, or no tint override).
BottomEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the bottom edge of the cell.
BottomEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the bottom edge of the cell.
BottomInset
Variant
read/write
he bottom inset the cell.
Buttons
Buttons
read only
Every button
Cells
Cells
read only
Cells
Characters
Characters
read only
Characters
ClipContentToCell
Boolean
read/write
If true, clip the content of the cell to the boundaries of the cell.
Columns
Columns
read only
All columns
ColumnSpan
Long
read only
he number of columns that this cell spans
Contents
Variant
read/write
he text contents of the cell.
DiagonalLineInFront
Boolean
read/write
If true, the diagonal line will draw in front of the contents of the cell.
DiagonalLineStrokeColor
Swatch
read/write
he stroke color of the diagonal line(s) applied to the cell.
DiagonalLineStrokeGapColor
Swatch
read/write
he gap color of the diagonal line(s).
DiagonalLineStrokeGapOverprint
Boolean
read/write
If true, overprint the color of the gap of the diagonal line(s).
DiagonalLineStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
InDesign CS Scripting Guide Visual Basic Reference 1207
Property:
Type:
Access:
Description:
DiagonalLineStrokeOverprint
Boolean
read/write
If true, overprint the diagonal line(s) applied to the cell.
DiagonalLineStrokeTint
Double
read/write
he tint applied to the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
DiagonalLineStrokeType
StrokeStyle
read/write
he type of stroke applied to the diagonal line(s) of the cell.
DiagonalLineStrokeWeight
Variant
read/write
he stroke weight of the diagonal line(s) of the cell.
FillColor
Variant
read/write
he swatch, color, gradient, tint, or mixed ink applied to the fill of the cell.
FillTint
Double
read/write
he tint percentage applied to the fill of the cell (-1 indicates 100%, or no tint override).
read/write
he method used to calculate the distance from the first baseline of text in the cell and the top inset of the cell.
FirstBaselineOffset
Name:
Decimal:
idFirstBaseline.idAscentOffset
1296135023
idFirstBaseline.idCapHeight
1296255087
idFirstBaseline.idLeadingOffset
1296852079
idFirstBaseline.idEmboxHeight
1296386159
idFirstBaseline.idXHeight
1299728495
idFirstBaseline.idFixedHeight
1296451695
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
Angle of a linear gradient on the fill
GradientFillLength
Double
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
GradientFillStart
Variant
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
GraphicLines
GraphicLines
read only
All graphic lines
Groups
Groups
read only
Groups
Height
Variant
read/write
he height of the cell.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the cell within its parent table.
InnerColumnStrokeColor
Swatch
read/write
he stroke color of the inner column of the cell.
InnerColumnStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the inner column of the cell.
InnerColumnStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the inner column of the cell.
InnerColumnStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the inner column of the cell (-1 indicates 100%, or no tint override).
InnerColumnStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the inner column of the cell.
InnerColumnStrokeTint
Double
read/write
he tint applied to the stroke of the inner column of the cell (-1 indicates 100%, or no tint override).
InnerColumnStrokeType
StrokeStyle
read/write
he type of stroke applied to the inner column of the cell.
InnerColumnStrokeWeight
Variant
read/write
he width of the stroke applied to the the inner column of the cell.
InnerRowStrokeColor
Swatch
read/write
he stroke color of the inner row of the cell.
1208
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
InnerRowStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the inner row of the cell.
InnerRowStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the inner row
InnerRowStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the inner row of the cell (-1 indicates 100%, or no tint override).
InnerRowStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the inner row of the cell.
InnerRowStrokeTint
Double
read/write
he tint applied to the stroke of the inner row of the cell (-1 indicates 100%, or no tint override).
InnerRowStrokeType
StrokeStyle
read/write
he type of stroke applied to the inner row of the cell.
InnerRowStrokeWeight
Variant
read/write
he width of the stroke applied to the the inner row of the cell.
InsertionPoints
InsertionPoints
read only
Insertion Points
KeepWithNextRow Boolean
read/write
If true, keep this row with the next row when the rows break between pages, text frames, or text columns.
LetEdgeStrokeColor
Swatch
read/write
he stroke color of the let edge of the cell.
LetEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the let edge of the cell.
LetEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the let edge of the cell.
LetEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the let edge of the cell (-1 indicates 100%, or no tint override).
LetEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the let edge of the cell.
LetEdgeStrokePriority
Long
read/write
he stroke priority of the let edge
LetEdgeStrokeTint
Double
read/write
he tint of the color of the let edge
LetEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the let edge of the cell.
LetEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the let edge of the cell.
LetInset
Variant
read/write
he let inset of the cell.
Lines
Lines
read only
Lines
MaximumHeight
Variant
read/write
Specifies the maximum height of the row containing the cell.
MinimumFirstBaselineOffset
Variant
read/write
he minimum distance (in points) between the first baseline of the text in the cell and the top inset of the frame or cell.
MinimumHeight
Variant
read/write
Constrains the row height to an amount no smaller than this value. he row may be larger than this amount, however, as the row height will continue to grow automatically as text is added.
Name
String
read only
he name of the cell, in the form row number; column number. he third cell of the fourth row, for example, would have the name “R4:C3”.
Ovals
Ovals
read only
All ovals
Overflows
Boolean
read only
If true, the cell contains overset (i.e., uncomposed) text.
InDesign CS Scripting Guide Visual Basic Reference 1209
Property:
Type:
Access:
Description:
OverprintFill
Boolean
read/write
If true, overprint the fill of the cell.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
ParagraphSpacingLimit
Variant
read/write
When the vertical justification of the cell is set to justified, this is the maximum amount of space that will be added between paragraphs. Increase this value to encourage spacing between paragraphs of vertically justified text; decrease it to increase the leading between lines of text in vertically justified text.
Parent
Variant
read only
he parent of the object.
ParentColumn
Column
read only
he parent column of the cell.
ParentRow
Row
read only
he parent row of the cell.
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
RightEdgeStrokeColor
Swatch
read/write
he stroke color of the right edge of the cell.
RightEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the right edge of the cell.
RightEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the right edge of the cell.
RightEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the right edge of the cell (-1 indicates 100%, or no tint override).
RightEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the right edge of the cell.
RightEdgeStrokePriority
Long
read/write
he stroke priority of the right edge
RightEdgeStrokeTint
Double
read/write
he tint applied to the stroke of the right edge of the cell (-1 indicates 100%, or no tint override).
RightEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the right edge of the cell.
RightEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the right edge of the cell.
RightInset
Variant
read/write
he right inset the cell.
RotationAngle
Double
read/write
he rotation angle of the cell.
Rows
Rows
read only
All rows
RowSpan
Long
read only
he number of rows that this cell spans
read/write
he type of the row containing the cell.
read/write
Where to start the row
RowType
StartRow
1210
Name:
Decimal:
idRowTypes.idBodyRow
1161982583
idRowTypes.idHeaderRow
1162375799
idRowTypes.idFooterRow
1162244727
idRowTypes.idMixedState
1162703479
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Tables
Tables
read only
All tables
TextCellRotationFollowsStoryDirection
Boolean
read/write
Whether text cell direction matches the story direction
TextColumns
TextColumns
read only
Text columns
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
TopEdgeStrokeColor
Swatch
read/write
he stroke color of the top edge of the cell.
TopEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the top edge of the cell.
TopEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the top edge of the cell.
TopEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the top edge of the cell (-1 indicates 100%, or no tint override).
TopEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the top edge of the cell.
TopEdgeStrokePriority
Long
read/write
he stroke priority of the top edge
TopEdgeStrokeTint
Double
read/write
he tint applied to the stroke of the top edge of the cell (-1 indicates 100%, or no tint override).
TopEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the right edge of the cell.
TopEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the top edge of the cell.
TopInset
Variant
read/write
he top inset the cell.
TopLetDiagonalLine
Boolean
read/write
If true, draw a diagonal line from the top let corner to the bottom right corner of the cell .
TopRightDiagonalLine
Boolean
read/write
If true, draw a diagonal line from the top right corner to the bottom let corner of the cell .
read/write
he vertical justification applied to the text in the cell.
VerticalJustification
Name:
Decimal:
idVerticalJustification.idTopAlign
1953460256
idVerticalJustification.idCenterAlign
1667591796
idVerticalJustification.idBottomAlign
1651471469
idVerticalJustification.idJustifyAlign
1785951334
Width
Variant
read/write
he width of the cell.
Words
Words
read only
Words
Methods Method: CreateOutlines
Delete Merge
Parameters: Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original object.
None Name:
Type:
Description:
With
Cell
he cell or range of cells to merge with.
Return:
Description:
Objects
Creates outlines from the text.
Nothing
Deletes the object.
Cell
Merges cells together.
InDesign CS Scripting Guide Visual Basic Reference 1211
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
Split
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Name: Using
Unmerge
1212
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Type:
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
Name:
Decimal:
idHorizontalOrVertical. idHorizontal
1752134266
idHorizontalOrVertical. idVertical
1986359924
InDesign CS Scripting Guide
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects the cell.
Nothing
Splits the cell horizontally or vertically.
Objects
Unmerges the cells.
How to handle the existing selection.
Description:
None
Visual Basic Reference
Description:
Objects
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
Sets the direction in which to split the cell.
Cells Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Cells
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Cell.
FirstItem
None
Object
Returns the first Cell.
Description:
Object
Returns the Cell with the specified ID.
Cell
Returns the cells within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he cell at the start of the range, or the index of the cell at the start of the range.
To
Variant
he cell at the end of the range, or the index of the cell at the end of the range.
LastItem
None
Object
Returns the last Cell.
MiddleItem
None
Object
Returns the middle Cell.
Object
Returns the next Cell.
Object
Returns the previous Cell.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Cell before the one desired.
Name:
Type:
Description:
Obj
Object
he Cell ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1213
ChangePreference Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
AutoLeading
Double
read/write
Percentage for calculating auto leading
BalanceRaggedLines
Boolean
read/write
Whether to balance ragged lines
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
Capitalization
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
ChangeText
String
read/write
he replacement text. his property corresponds to the string in the Change To field of the Find/Change panel.
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he text override of the fill’s tint percentage (-1 indicates no override)
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
1214
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
InDesign CS Scripting Guide Visual Basic Reference 1215
Property:
Type:
Access:
Description:
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
Parent
Application
read only
he parent of the object.
PointSize
Double
read/write
he size of the text in points.
read/write
he position attribute applied to the text.
read/write
he right indent applied to the paragraph containing the text.
read/write
Justification for lines with only one word.
Position
RightIndent SingleWordJustification
Name:
Decimal:
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Variant Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
Where to start the paragraph
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he color of the strike through as Swatch or String
StrikehroughGapColor
Variant
read/write
he gap color of the strike through as Swatch or String
StrikehroughGapOverprint
Boolean
read/write
Whether to overprint the gap of the strike through
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
1216
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
StrikehroughOffset
Variant
read/write
he offset of the strike through as Unit (Double or String)
StrikehroughOverprint
Boolean
read/write
Whether to overprint the strike through
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strike through
StrikehroughWeight
Double
read/write
he line weight of the strike through
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he text override of the stroke’s tint percentage (-1 indicates no override)
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color of the underline as Swatch or String
UnderlineGapColor
Variant
read/write
he gap color of the underline as Swatch or String
UnderlineGapOverprint
Boolean
read/write
Whether to overprint the gap of the underline
UnderlineGapTint
Double
read/write
he gap tint of the underline
UnderlineOffset
Variant
read/write
he offset of the underline as Unit (Double or String)
UnderlineOverprint
Boolean
read/write
Whether to overprint the underline
UnderlineTint
Double
read/write
he tint of the underline
UnderlineType
StrokeStyle
read/write
he stroke type of the underline
UnderlineWeight
Double
read/write
he line weight of the underline
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
InDesign CS Scripting Guide Visual Basic Reference 1217
Character Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
Ascent
Variant
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
AssociatedXMLElements
Objects
read only
Returns the associated XML elements
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
Baseline
Variant
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
Buttons
Buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
Characters
Capitalization
Characters
1218
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Characters
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
Descent
Variant
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GradientFillStart
Variant
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
GradientStrokeAngle
Double
read/write
he angle of the gradient applied to the stroke of the text.
GradientStrokeLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
InDesign CS Scripting Guide Visual Basic Reference 1219
Property:
Type:
Access:
Description:
GradientStrokeStart
Variant
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
GraphicLines
GraphicLines
read only
All graphic lines
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
Groups
Groups
read only
Groups
HorizontalOffset
Variant
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Index
Long
read only
Index of the object within its parent object.
InsertionPoints
InsertionPoints
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
1220
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Length
Long
read only
he number of characters in the text object.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Lines
Lines
read only
Lines
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OpenTypeFeatures
Variant
read/write
open type features as Array of Longs
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
InDesign CS Scripting Guide Visual Basic Reference 1221
Property:
Type:
Access:
Description:
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
ParentStory
Story
read only
he story containing the text object.
ParentTextFrame
TextFrame
read only
he text frame containing the text object.
PointSize
Double
read/write
he size of the text in points.
Polygons
Polygons
read only
All polygons
Position
Name:
Decimal:
read/write
he position attribute applied to the text.
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Rectangles
Rectangles
read only
All rectangles
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
1222
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleBelowWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
InDesign CS Scripting Guide Visual Basic Reference 1223
Property: SingleWordJustification
Type: Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Justification for lines containing a single word.
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tables
Tables
read only
All tables
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this Character as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
TextColumns
TextColumns
read only
Text columns
1224
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Words
Words
read only
Words
Methods Method: ApplyStyle
Changecase
Parameters: Name:
Type:
Description:
Using
Variant
he paragraph style or character style to apply.
[ClearingOverrides]
Boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
Using
Name:
Decimal:
idChangecaseMode. idUppercase
1667462499
idChangecaseMode. idLowercase
1667460195
idChangecaseMode. idTitlecase
1667462243
idChangecaseMode. idSentencecase
1667461987
Return:
Description:
Nothing
Apply a paragraph or character style to the text object.
Nothing
Change the case of text.
Case option to use.
InDesign CS Scripting Guide Visual Basic Reference 1225
Method: ConvertToTable
CreateOutlines
Delete Export
1226
Parameters: Name:
Type:
Description:
[Column Separator]
String
he character to interpret as the column separator.
[RowSeparator]
String
he character to interpret as the row separator.
[NumberOfColumns]
Long
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original text.
None Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Table
Convert the text to a table. he parameters for this command correspond to the options in the Convert Text to Table dialog box (select some text and choose Table > Convert Text to Table to display this dialog box).
Objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Nothing
Deletes the object.
Nothing
Exports the object to a file.
Method: Markup
Move
Parameters: Name:
Type:
Description:
Using
XMLElement
he XML element to associate with the text.
Name:
Type:
Description:
To
Place
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Return:
Description:
Nothing
Associate the text with an XML element while preserving the existing text content.
Nothing
Moves the text.
Object
Place a file.
Where to move the text, relative to the reference object (before/ater).
[Reference]
Variant
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
InDesign CS Scripting Guide Visual Basic Reference 1227
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
1228
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Visual Basic Reference
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects text.
Characters Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Characters
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Character
Returns any Character.
FirstItem
None
Character
Returns the first Character.
Characters
Returns the characters within the specified range.
ItemByRange
Name:
Type:
Description:
From
Character
he character at the start of the range.
To
Character
he character at the end of the range, .
LastItem
None
Character
Returns the last Character.
MiddleItem
None
Character
Returns the middle Character.
Character
Returns the next Character.
Character
Returns the previous Character.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Character before the one desired.
Name:
Type:
Description:
Obj
Object
he Character ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1229
CharacterStyle Properties Property:
Type:
Access:
Description:
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
BasedOn
Variant
read/write
he character style this style is based on.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
Capitalization
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Id
Long
read only
A unique number identifying the object.
Imported
Boolean
read only
Whether this style was imported from another document
Index
Long
read only
Index of the CharacterStyle within its parent Document or Application
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
Label
String
read/write
A label that can be set to any string
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Name
String
read/write
he name of the character style
1230
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
Parent
Variant
read only
he parent of the object.
PointSize
Double
read/write
he size of the text in points.
read/write
he position attribute applied to the text.
Position
Name:
Decimal:
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
InDesign CS Scripting Guide Visual Basic Reference 1231
Property:
Type:
Access:
Description:
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
1232
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
CharacterStyles Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of CharacterStyles
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
CharacterStyle
Create a new character style.
AnyItem
None
CharacterStyle
Returns any CharacterStyle.
FirstItem
None
CharacterStyle
Returns the first CharacterStyle.
CharacterStyle
Returns the CharacterStyle with the specified ID.
CharacterStyles
Returns the character styles within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
CharacterStyle
he character style at the start of the range.
To
CharacterStyle
he character style at the end of the range.
LastItem
None
CharacterStyle
Returns the last CharacterStyle.
MiddleItem
None
CharacterStyle
Returns the middle CharacterStyle.
CharacterStyle
Returns the next CharacterStyle.
CharacterStyle
Returns the previous CharacterStyle.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
CharacterStyle
he CharacterStyle before the one desired.
Name:
Type:
Description:
Obj
CharacterStyle
he CharacterStyle ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1233
CheckboxControl Properties Property:
Type:
Access:
Description:
CheckedState
Boolean
read/write
If true, the checkbox control is checked.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the CheckboxControl within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
StaticLabel
String
read/write
he static text label of the checkbox control.
1234
Visual Basic Reference
InDesign CS Scripting Guide
CheckboxControls Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of CheckboxControls
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
CheckboxControl
Create a new checkbox control.
AnyItem
None
CheckboxControl
Returns any CheckboxControl.
FirstItem
None
CheckboxControl
Returns the first CheckboxControl.
CheckboxControl
Returns the CheckboxControl with the specified ID.
CheckboxControls
Returns the checkbox controls within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
CheckboxControl
he checkbox control at the start of the range.
To
CheckboxControl
he checkbox control at the end of the range.
LastItem
None
CheckboxControl
Returns the last CheckboxControl.
MiddleItem
None
CheckboxControl
Returns the middle CheckboxControl.
CheckboxControl
Returns the next CheckboxControl.
CheckboxControl
Returns the previous CheckboxControl.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
CheckboxControl
he CheckboxControl before the one desired.
Name:
Type:
Description:
Obj
CheckboxControl
he CheckboxControl ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1235
ClipboardPreference Properties Property:
Type:
Access:
Description:
CopyPDFToClipboard
Boolean
read/write
Whether to copy PDF to clipboard
Parent
Application
read only
he ClipboardPreference’s parent
PasteRemembersLayers
Boolean
read/write
Whether objects cut or copied from different layers retain their layer assignment when pasted
PreferPDFWhenPasting
Boolean
read/write
Whether to paste pdf if available
PreferStyledTextWhenPasting
Boolean
read/write
Whether to include text attributes if available when pasting text
1236
Visual Basic Reference
InDesign CS Scripting Guide
ClippingPathSettings Properties Property:
Type:
Access:
Description:
AlphaChannelPathNames
Array of Strings
read only
A list of the path names of alpha channels associated with an imported graphic.
AppliedPathName
String
read/write
he name of the currently-applied clipping path.
read/write
he clipping path type.
Boolean
read/write
If true, include inside edges of the clipping path.
InsetFrame
Double or String
read/write
he inset width of the frame.
InvertPath
Boolean
read/write
If true, invert the path of the clipping path.
Parent
Variant
read only
he parent of the object.
Paths
Paths
read only
All paths
PhotoshopPathNames
Array of Strings
read only
A list of Photoshop path names.
RestrictToFrame
Boolean
read/write
If true, restrict the imported graphic to its frame.
hreshold
Long
read/write
Sets the threshold for detect edges or alpha channel.
Tolerance
Long
read/write
Sets the accuracy of the Find Edges method of generating a clipping path. Higher values produce a clipping path that’s closer to the shape of the objects in the imported graphic, but tend to be more jagged. Lower values produce smoother clipping paths, but tend to be less accurate.
UseHighResolutionImage
Boolean
read/write
If true, use a high resolution version of the imported graphic when creating a clipping path using the Find Edges method.
ClippingType
IncludeInsideEdges
Name:
Decimal:
idClippingPathType.idNone
1852796517
idClippingPathType.idDetectEdges
1685349735
idClippingPathType.idAlphaChannel
1634756707
idClippingPathType.idPhotoshopPath
1886613620
idClippingPathType.idUserModifiedPath
1970106484
Methods Method:
Parameters:
Return:
Description:
ConvertToFrame
None
PageItem
Convert to Frame.
InDesign CS Scripting Guide Visual Basic Reference 1237
CloseWindowBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the CloseWindowBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the behavior.
Parent
Variant
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
1238
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
CloseWindowBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of CloseWindowBehaviors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
CloseWindowBehavior
Create a new close window behavior.
AnyItem
None
CloseWindowBehavior
Returns any CloseWindowBehavior.
FirstItem
None
CloseWindowBehavior
Returns the first CloseWindowBehavior.
CloseWindowBehavior
Returns the CloseWindowBehavior with the specified ID.
CloseWindowBehavior
Returns the close window behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
CloseWindowBehavior
he close window behavior at the start of the range.
To
CloseWindowBehavior
he close window behavior at the end of the range.
LastItem
None
CloseWindowBehavior
Returns the last CloseWindowBehavior.
MiddleItem
None
CloseWindowBehavior
Returns the middle CloseWindowBehavior.
CloseWindowBehavior
Returns the next CloseWindowBehavior.
Object
Returns the previous CloseWindowBehavior.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
CloseWindowBehavior
he CloseWindowBehavior before the one desired.
Name:
Type:
Description:
Obj
CloseWindowBehavior
he CloseWindowBehavior ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1239
Color Properties Property:
Type:
Access:
Description:
ColorValue
Variant
read/write
he values of the color
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Color within its parent Application or Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he color model of the color.
he name of the color.
Model
Name:
Decimal:
idColorModel.idSpot
1936748404
idColorModel.idProcess
1886548851
idColorModel.idRegistration
1919248243
idColorModel.idMixedinkmodel
1768844664
Name
String
read/write
Parent
Variant
read only
he parent of the object.
read/write
he color space of the color.
Space
Name:
Decimal:
idColorSpace.idRGB
1666336578
idColorSpace.idCMYK
1129142603
idColorSpace.idLAB
1665941826
idColorSpace.idMixedInk
1666009432
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Merge one or more other swatches into this one.
ExtractLabel
InsertLabel
Merge
1240
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Variant
he swatches to merge.
Visual Basic Reference
InDesign CS Scripting Guide
Colors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Colors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
Color
Create a new color.
AnyItem
None
Color
Returns any Color.
FirstItem
None
Color
Returns the first Color.
Color
Returns the Color with the specified ID.
Color
Returns the colors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Color
he color at the start of the range.
To
Color
he color at the end of the range.
LastItem
None
Color
Returns the last Color.
MiddleItem
None
Color
Returns the middle Color.
Color
Returns the next Color.
Color
Returns the previous Color.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Color
he Color before the one desired.
Name:
Type:
Description:
Obj
Color
he Color ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1241
ColorSetting Properties Property:
Type:
Access:
Description:
CMSSettings
String
read/write
he name of the current color settings configuration
CMSSettingsList
Array of Strings
read only
he list of available color settings configuration.
CMSSettingsPath
String
read/write
he path of the csf file to use
read/write
he policy for handling mismatched CMYK configurations
CMYKPolicy
Name:
Decimal:
idColorSettingsPolicy.idColorPolicyOff
1129344870
idColorSettingsPolicy.idPreserveEmbeddedProfiles
1129345136
idColorSettingsPolicy.idConvertToWorkingSpace
1129346931
EnableColorManagement
Boolean
read/write
If true, enable color management.
Engine
String
read/write
he name of the color engine to use.
EngineList
Array of Strings
read only
he list of available color engines.
read/write
he rendering intent
Intent
Name:
Decimal:
idRenderingIntent.idUseColorSettings
1380541299
idRenderingIntent.idPerceptual
1380544611
idRenderingIntent.idSaturation
1380545377
idRenderingIntent.idRelativeColorimetric
1380545123
idRenderingIntent.idAbsoluteColorimetric
1380540771
MismatchAskWhenOpening
Boolean
read/write
If true, ask the user what to do when opening a file with a mismatched color configuration.
MismatchAskWhenPasting
Boolean
read/write
If true, ask the user what to do when pasting an object with a mismatched color configuration.
MissingAskWhenOpening
Boolean
read/write
If true, ask the user what to do when opening an object with a missing color configuration.
Parent
Application
read only
he parent of the object.
read/write
he policy for handling mismatched RGB configurations
RGBPolicy
Name:
Decimal:
idColorSettingsPolicy.idColorPolicyOff
1129344870
idColorSettingsPolicy.idPreserveEmbeddedProfiles
1129345136
idColorSettingsPolicy.idConvertToWorkingSpace
1129346931
UseBPC
Boolean
read/write
If true, compensate for differences in black point
WorkingSpaceCMYK
String
read/write
he name of the current CMYK configuration
WorkingSpaceCMYKList
Array of Strings
read only
he list of valid CMYK color profiles.
WorkingSpaceRGB
String
read/write
he name of the current RGB configuration
WorkingSpaceRGBList
Array of Strings
read only
he list of valid RGB color profiles.
1242
Visual Basic Reference
InDesign CS Scripting Guide
Column Properties Property:
Type:
Access:
Description:
AutoGrow
Boolean
read/write
If true, the cell will expand to display its content.
BottomEdgeStrokeColor
Swatch
read/write
he stroke color of the bottom edge of the cell.
BottomEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the bottom edge of the cell.
BottomEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the bottom edge of the cell.
BottomEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the bottom edge of the cell (-1 indicates 100%, or no tint override).
BottomEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the bottom edge of the cell.
BottomEdgeStrokePriority
Long
read/write
he stroke priority of the bottom edge
BottomEdgeStrokeTint
Double
read/write
he tint applied to the stroke of the bottom edge of the cell (-1 indicates 100%, or no tint override).
BottomEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the bottom edge of the cell.
BottomEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the bottom edge of the cell.
BottomInset
Variant
read/write
he bottom inset the cell.
Cells
Cells
read only
Cells
ClipContentToCell
Boolean
read/write
If true, clip the content of the cell to the boundaries of the cell.
Columns
Columns
read only
All columns
ColumnSpan
Long
read only
he number of columns that this cell spans
Contents
Variant
read/write
he text contents of the cell.
DiagonalLineInFront
Boolean
read/write
If true, the diagonal line will draw in front of the contents of the cell.
DiagonalLineStrokeColor
Swatch
read/write
he stroke color of the diagonal line(s) applied to the cell.
DiagonalLineStrokeGapColor
Swatch
read/write
he gap color of the diagonal line(s).
DiagonalLineStrokeGapOverprint
Boolean
read/write
If true, overprint the color of the gap of the diagonal line(s).
DiagonalLineStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
DiagonalLineStrokeOverprint
Boolean
read/write
If true, overprint the diagonal line(s) applied to the cell.
DiagonalLineStrokeTint
Double
read/write
he tint applied to the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
DiagonalLineStrokeType
StrokeStyle
read/write
he type of stroke applied to the diagonal line(s) of the cell.
DiagonalLineStrokeWeight
Variant
read/write
he stroke weight of the diagonal line(s) of the cell.
InDesign CS Scripting Guide Visual Basic Reference 1243
Property:
Type:
Access:
Description:
FillColor
Variant
read/write
he swatch, color, gradient, tint, or mixed ink applied to the fill of the cell.
FillTint
Double
read/write
he tint percentage applied to the fill of the cell (-1 indicates 100%, or no tint override).
read/write
he method used to calculate the distance from the first baseline of text in the cell and the top inset of the cell.
FirstBaselineOffset
Name:
Decimal:
idFirstBaseline.idAscentOffset
1296135023
idFirstBaseline.idCapHeight
1296255087
idFirstBaseline.idLeadingOffset
1296852079
idFirstBaseline.idEmboxHeight
1296386159
idFirstBaseline.idXHeight
1299728495
idFirstBaseline.idFixedHeight
1296451695
GradientFillAngle
Double
read/write
Angle of a linear gradient on the fill
GradientFillLength
Double
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
GradientFillStart
Variant
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
Height
Variant
read/write
he height of the cell.
Index
Long
read only
Index of the cell within its parent table.
InnerColumnStrokeColor
Swatch
read/write
he stroke color of the inner column of the cell.
InnerColumnStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the inner column of the cell.
InnerColumnStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the inner column of the cell.
InnerColumnStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the inner column of the cell (-1 indicates 100%, or no tint override).
InnerColumnStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the inner column of the cell.
InnerColumnStrokeTint
Double
read/write
he tint applied to the stroke of the inner column of the cell (-1 indicates 100%, or no tint override).
InnerColumnStrokeType
StrokeStyle
read/write
he type of stroke applied to the inner column of the cell.
InnerColumnStrokeWeight
Variant
read/write
he width of the stroke applied to the the inner column of the cell.
InnerRowStrokeColor
Swatch
read/write
he stroke color of the inner row of the cell.
InnerRowStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the inner row of the cell.
InnerRowStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the inner row
InnerRowStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the inner row of the cell (-1 indicates 100%, or no tint override).
InnerRowStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the inner row of the cell.
InnerRowStrokeTint
Double
read/write
he tint applied to the stroke of the inner row of the cell (-1 indicates 100%, or no tint override).
InnerRowStrokeType
StrokeStyle
read/write
he type of stroke applied to the inner row of the cell.
1244
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
InnerRowStrokeWeight
Variant
read/write
he width of the stroke applied to the the inner row of the cell.
KeepWithNextRow Boolean
read/write
If true, keep this row with the next row when the rows break between pages, text frames, or text columns.
LetEdgeStrokeColor
Swatch
read/write
he stroke color of the let edge of the cell.
LetEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the let edge of the cell.
LetEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the let edge of the cell.
LetEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the let edge of the cell (-1 indicates 100%, or no tint override).
LetEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the let edge of the cell.
LetEdgeStrokePriority
Long
read/write
he stroke priority of the let edge
LetEdgeStrokeTint
Double
read/write
he tint of the color of the let edge
LetEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the let edge of the cell.
LetEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the let edge of the cell.
LetInset
Variant
read/write
he let inset of the cell.
MaximumHeight
Variant
read/write
Specifies the maximum height of the row containing the cell.
MinimumFirstBaselineOffset
Variant
read/write
he minimum distance (in points) between the first baseline of the text in the cell and the top inset of the frame or cell.
MinimumHeight
Variant
read/write
Constrains the row height to an amount no smaller than this value. he row may be larger than this amount, however, as the row height will continue to grow automatically as text is added.
Name
String
read only
he name of the cell, in the form row number; column number. he third cell of the fourth row, for example, would have the name “R4:C3”.
Overflows
Boolean
read only
If true, the cell contains overset (i.e., uncomposed) text.
OverprintFill
Boolean
read/write
If true, overprint the fill of the cell.
ParagraphSpacingLimit
Variant
read/write
When the vertical justification of the cell is set to justified, this is the maximum amount of space that will be added between paragraphs. Increase this value to encourage spacing between paragraphs of vertically justified text; decrease it to increase the leading between lines of text in vertically justified text.
Parent
Variant
read only
he parent of the object.
ParentColumn
Column
read only
he parent column of the cell.
ParentRow
Row
read only
he parent row of the cell.
RightEdgeStrokeColor
Swatch
read/write
he stroke color of the right edge of the cell.
RightEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the right edge of the cell.
InDesign CS Scripting Guide Visual Basic Reference 1245
Property:
Type:
Access:
Description:
RightEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the right edge of the cell.
RightEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the right edge of the cell (-1 indicates 100%, or no tint override).
RightEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the right edge of the cell.
RightEdgeStrokePriority
Long
read/write
he stroke priority of the right edge
RightEdgeStrokeTint
Double
read/write
he tint applied to the stroke of the right edge of the cell (-1 indicates 100%, or no tint override).
RightEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the right edge of the cell.
RightEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the right edge of the cell.
RightInset
Variant
read/write
he right inset the cell.
RotationAngle
Double
read/write
he rotation angle of the cell.
Rows
Rows
read only
All rows
RowSpan
Long
read only
he number of rows that this cell spans
read/write
he type of the row containing the cell.
read/write
Where to start the row
RowType
StartRow
Name:
Decimal:
idRowTypes.idBodyRow
1161982583
idRowTypes.idHeaderRow
1162375799
idRowTypes.idFooterRow
1162244727
idRowTypes.idMixedState
1162703479
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
TextCellRotationFollowsStoryDirection
Boolean
read/write
Whether text cell direction matches the story direction
TopEdgeStrokeColor
Swatch
read/write
he stroke color of the top edge of the cell.
TopEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the top edge of the cell.
TopEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the top edge of the cell.
TopEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the top edge of the cell (-1 indicates 100%, or no tint override).
TopEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the top edge of the cell.
TopEdgeStrokePriority
Long
read/write
he stroke priority of the top edge
TopEdgeStrokeTint
Double
read/write
he tint applied to the stroke of the top edge of the cell (-1 indicates 100%, or no tint override).
TopEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the right edge of the cell.
1246
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TopEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the top edge of the cell.
TopInset
Variant
read/write
he top inset the cell.
TopLetDiagonalLine
Boolean
read/write
If true, draw a diagonal line from the top let corner to the bottom right corner of the cell .
TopRightDiagonalLine
Boolean
read/write
If true, draw a diagonal line from the top right corner to the bottom let corner of the cell .
read/write
he vertical justification applied to the text in the cell.
read/write
he width of the cell.
VerticalJustification
Width
Name:
Decimal:
idVerticalJustification.idTopAlign
1953460256
idVerticalJustification.idCenterAlign
1667591796
idVerticalJustification.idBottomAlign
1651471469
idVerticalJustification.idJustifyAlign
1785951334
Variant
Methods Method: CreateOutlines
Delete Merge
Redistribute
Parameters: Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original object.
None Name:
Type:
Description:
With
Cell
he cell to merge with.
Name:
Type:
Description:
Using
[hru]
Name:
Decimal:
idHorizontalOrVertical. idHorizontal
1752134266
idHorizontalOrVertical. idVertical
1986359924
Variant
Return:
Description:
Objects
Create outlines from the text.
Nothing
Deletes the object.
Cell
Merge cells together.
Nothing
Redistribute columns or rows.
he direction to redistribute.
Redistribute up to this object.
InDesign CS Scripting Guide Visual Basic Reference 1247
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
Split
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Name: Using
Unmerge
1248
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Type:
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
Name:
Decimal:
idHorizontalOrVertical. idHorizontal
1752134266
idHorizontalOrVertical. idVertical
1986359924
InDesign CS Scripting Guide
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Select this column.
Nothing
Split the cell either horizontally or vertically.
Objects
Unmerge the cells.
How to handle the existing selection.
Description:
None
Visual Basic Reference
Description:
Objects
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
Which direction to split.
Columns Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Columns
Item
Column
read only
Returns the Column with the specified index (as Long).
Methods Method: Add
Parameters: Name: [At]
[Reference]
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Column
Return:
Description:
Column
Create a new column.
Location.
Before/ater an existing Column or at the beginning/ end of a parent as Column or Table.
AnyItem
None
Column
Returns any Column.
FirstItem
None
Column
Returns the first Column.
Columns
Returns the columns within the specified range.
ItemByRange
Name:
Type:
Description:
From
Column
he column at the start of the range.
To
Column
he column at the end of the range.
LastItem
None
Column
Returns the last Column.
MiddleItem
None
Column
Returns the middle Column.
Column
Returns the next Column.
Column
Returns the previous Column.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Column
he Column before the one desired.
Name:
Type:
Description:
Obj
Column
he Column ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1249
ContourOption Properties Property:
Type:
Access:
Description:
AlphaChannelPathNames
Array of Strings
read only
A list of the alpha channel path names in an imported graphic.
ContourPathName
String
read/write
he name of the current contour option applied to an imported graphic.
read/write
he contour options type applied to an imported graphic.
ContourType
Name:
Decimal:
idContourOptionsTypes.idBoundingBox
1701732962
idContourOptionsTypes.idPhotoshopPath
1886613620
idContourOptionsTypes.idDetectEdges
1685349735
idContourOptionsTypes.idAlphaChannel
1634756707
idContourOptionsTypes.idGraphicFrame
1701734246
idContourOptionsTypes.idSameAsClipping
1935762288
IncludeInsideEdges
Boolean
read/write
If true, include the inside edges of a contour path.
Parent
TextWrapPreference
read only
he parent of the object.
PhotoshopPathNames
Array of Strings
read only
A list of the photoshop path names in an imported graphic.
1250
Visual Basic Reference
InDesign CS Scripting Guide
CrossReference Properties Property:
Access:
Description:
read/write
he cross reference type.
String
read/write
he string if a custom cross reference.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the CrossReference within its parent Topic
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Parent
Topic
read only
he parent of the object.
ReferencedTopic
Topic
read/write
he index topic that the cross reference refers to.
CrossReferenceType
CustomTypeString
Type: Name:
Decimal:
idCrossReferenceType.idSeeOrAlsoBracket
1399800172
idCrossReferenceType.idSee
1701729125
idCrossReferenceType.idSeeAlso
1399144812
idCrossReferenceType.idSeeHerein
1397256814
idCrossReferenceType.idSeeAlsoHerein
1398884466
idCrossReferenceType.idCustomCrossReference
1131639875
idCrossReferenceType.idCustomCrossReferenceBefore
1131639906
idCrossReferenceType.idCustomCrossReferenceAter
1131639905
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1251
CrossReferences Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of CrossReferences
Item
CrossReference
read only
Returns the CrossReference with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
ReferencedTopic
Topic
he referenced topic.
CrossReferenceType
[CustomTypeString]
Name:
Decimal:
idCrossReferenceType. idSeeOrAlsoBracket
1399800172
idCrossReferenceType. idSee
1701729125
idCrossReferenceType. idSeeAlso
1399144812
idCrossReferenceType. idSeeHerein
1397256814
idCrossReferenceType. idSeeAlsoHerein
1398884466
idCrossReferenceType. idCustomCrossReference
1131639875
idCrossReferenceType. idCustomCrossReferenceBefore
1131639906
idCrossReferenceType. idCustomCrossReferenceAter
1131639905
String
Return:
Description:
CrossReference
Create a new cross reference.
he type of cross reference.
A custom reference.
AnyItem
None
CrossReference
Returns any CrossReference.
FirstItem
None
CrossReference
Returns the first CrossReference.
CrossReference
Returns the CrossReference with the specified ID.
CrossReferences
Returns the cross references within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
CrossReference
he cross reference at the start of the range.
To
CrossReference
he cross reference at the end of the range.
LastItem
None
CrossReference
Returns the last CrossReference.
MiddleItem
None
CrossReference
Returns the middle CrossReference.
1252
Visual Basic Reference
InDesign CS Scripting Guide
Method: NextItem
PreviousItem
Parameters: Name:
Type:
Description:
Obj
CrossReference
he CrossReference before the one desired.
Name:
Type:
Description:
Obj
CrossReference
he CrossReference ater the one desired.
Return:
Description:
CrossReference
Returns the next CrossReference.
CrossReference
Returns the previous CrossReference.
InDesign CS Scripting Guide Visual Basic Reference 1253
DashedStrokeStyle Properties Property:
Type:
Access:
Description:
DashArray
Array of Doubles (dash, gap, ...)
read/write
he position of the dashes and gaps in the the dashed stroke style.
read/write
he appearance of the end points of each dash.
EndCap
Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the DashedStrokeStyle within its parent Document or Application
Name
String
read/write
he name of the dashed stroke style.
Parent
Variant
read only
he parent of the object.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
read only
he type of the dashed stroke style.
StrokeCornerAdjustment
StrokeStyleType
Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
String
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
1254
Visual Basic Reference
InDesign CS Scripting Guide
DashedStrokeStyles Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of DashedStrokeStyles
Item
DashedStrokeStyle
read only
Returns the DashedStrokeStyle with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
DashedStrokeStyle
Create a new dashed stroke style.
AnyItem
None
DashedStrokeStyle
Returns any DashedStrokeStyle.
FirstItem
None
DashedStrokeStyle
Returns the first DashedStrokeStyle.
Description:
DashedStrokeStyle
Returns the DashedStrokeStyle with the specified ID.
DashedStrokeStyles
Returns the dashed stroke styles within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
DashedStrokeStyle
he dashed stroke style at the start of the range.
To
DashedStrokeStyle
he dashed stroke style at the end of the range.
LastItem
None
DashedStrokeStyle
Returns the last DashedStrokeStyle.
MiddleItem
None
DashedStrokeStyle
Returns the middle DashedStrokeStyle.
DashedStrokeStyle
Returns the next DashedStrokeStyle.
DashedStrokeStyle
Returns the previous DashedStrokeStyle.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
DashedStrokeStyle
he DashedStrokeStyle before the one desired.
Name:
Type:
Description:
Obj
DashedStrokeStyle
he DashedStrokeStyle ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1255
Dialog Properties Property:
Type:
Access:
Description:
CanCancel
Boolean
read/write
If true, the dialog contains a Cancel button.
DialogColumns
DialogColumns
read only
All columns
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Dialog within its parent Application
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the dialog.
Parent
Application
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Destroy
None
Nothing
Destroy dialog
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Boolean
Show dialog.
ExtractLabel
InsertLabel
Show
1256
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
None
Visual Basic Reference
InDesign CS Scripting Guide
DialogColumn Properties Property:
Type:
Access:
Description:
AngleComboboxes
AngleComboboxes
read only
All angle comboboxes
AngleEditboxes
AngleEditboxes
read only
All angle editboxes
BorderPanels
BorderPanels
read only
All border panels
CheckboxControls
CheckboxControls
read only
All checkbox controls
DialogRows
DialogRows
read only
All dialog rows
Dropdowns
Dropdowns
read only
All dropdowns
EnablingGroups
EnablingGroups
read only
All enabling checkbox panels
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the DialogColumn within its parent Dialog, DialogRow, EnablingGroup or BorderPanel
IntegerComboboxes
IntegerComboboxes
read only
All integer comboboxes
IntegerEditboxes
IntegerEditboxes
read only
All integer editboxes
MeasurementComboboxes
MeasurementComboboxes
read only
All measurement comboboxes
MeasurementEditboxes
MeasurementEditboxes
read only
All measurement editboxes
Parent
Variant
read only
he parent of the object.
PercentComboboxes
PercentComboboxes
read only
All percent comboboxes
PercentEditboxes
PercentEditboxes
read only
All percent editboxes
RadiobuttonGroups
RadiobuttonGroups
read only
All radio button groups
RealComboboxes
RealComboboxes
read only
All real number comboboxes
RealEditboxes
RealEditboxes
read only
All real number editboxes
StaticTexts
StaticTexts
read only
All static texts
TextEditboxes
TextEditboxes
read only
All text editboxes
Widgets
Widgets
read only
All widgets
InDesign CS Scripting Guide Visual Basic Reference 1257
DialogColumns Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of DialogColumns
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
DialogColumn
Create a new dialog column.
AnyItem
None
DialogColumn
Returns any DialogColumn.
FirstItem
None
DialogColumn
Returns the first DialogColumn.
DialogColumn
Returns the DialogColumn with the specified ID.
DialogColumns
Returns the dialog columns within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object
Name:
Type:
Description:
From
DialogColumn
he dialog column at the start of the range.
To
DialogColumn
he dialog column at the end of the range.
LastItem
None
DialogColumn
Returns the last DialogColumn.
MiddleItem
None
DialogColumn
Returns the middle DialogColumn.
DialogColumn
Returns the next DialogColumn.
DialogColumn
Returns the previous DialogColumn.
NextItem
PreviousItem
1258
Name:
Type:
Description:
Obj
DialogColumn
he DialogColumn before the one desired.
Name:
Type:
Description:
Obj
DialogColumn
he DialogColumn ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
DialogRow Properties Property:
Type:
Access:
Description:
AngleComboboxes
AngleComboboxes
read only
All angle comboboxes
AngleEditboxes
AngleEditboxes
read only
All angle editboxes
BorderPanels
BorderPanels
read only
All border panels
CheckboxControls
CheckboxControls
read only
All checkbox controls
DialogColumns
DialogColumns
read only
All columns
Dropdowns
Dropdowns
read only
All dropdowns
EnablingGroups
EnablingGroups
read only
All enabling checkbox panels
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the DialogRow within its parent DialogColumn, EnablingGroup or BorderPanel
IntegerComboboxes
IntegerComboboxes
read only
All integer comboboxes
IntegerEditboxes
IntegerEditboxes
read only
All integer editboxes
MeasurementComboboxes
MeasurementComboboxes
read only
All measurement comboboxes
MeasurementEditboxes
MeasurementEditboxes
read only
All measurement editboxes
Parent
Variant
read only
he parent of the object.
PercentComboboxes
PercentComboboxes
read only
All percent comboboxes
PercentEditboxes
PercentEditboxes
read only
All percent editboxes
RadiobuttonGroups
RadiobuttonGroups
read only
All radio button groups
RealComboboxes
RealComboboxes
read only
All real number comboboxes
RealEditboxes
RealEditboxes
read only
All real number editboxes
StaticTexts
StaticTexts
read only
All static texts
TextEditboxes
TextEditboxes
read only
All text editboxes
Widgets
Widgets
read only
All widgets
InDesign CS Scripting Guide Visual Basic Reference 1259
DialogRows Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of DialogRows
Item
DialogRow
read only
Returns the DialogRow with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
DialogRow
Create a new dialog row.
AnyItem
None
DialogRow
Returns any DialogRow.
FirstItem
None
DialogRow
Returns the first DialogRow.
DialogRow
Returns the DialogRow with the specified ID.
DialogRows
Returns the dialog rows within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
DialogRow
he DialogRow at the start of the range.
To
DialogRow
he DialogRow at the end of the range.
LastItem
None
DialogRow
Returns the last DialogRow.
MiddleItem
None
DialogRow
Returns the middle DialogRow.
DialogRow
Returns the next DialogRow.
DialogRow
Returns the previous DialogRow.
NextItem
PreviousItem
1260
Name:
Type:
Description:
Obj
DialogRow
he DialogRow before the one desired.
Name:
Type:
Description:
Obj
DialogRow
he DialogRow ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Dialogs Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Dialogs
Item
ObDialogject
read only
Returns the Dialog with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
Dialog
Create a new dialog.
AnyItem
None
Dialog
Returns any Dialog.
FirstItem
None
Dialog
Returns the first Dialog.
Dialog
Returns the Dialog with the specified ID.
Dialogs
Returns the dialogs within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
Dialog
he dialog at the start of the range.
To
Dialog
he dialog at the end of the range.
LastItem
None
Dialog
Returns the last Dialog.
MiddleItem
None
Dialog
Returns the middle Dialog.
Dialog
Returns the next Dialog.
Dialog
Returns the previous Dialog.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Dialog
he Dialog before the one desired.
Name:
Type:
Description:
Obj
Dialog
he Dialog ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1261
DictionaryPreference Properties Property:
Access:
Description:
read/write
Tells the document which hyphenation source to use when composing text.
Boolean
read/write
If true, merge the user dictionary files into the document.
Parent
Variant
read only
he parent of the object.
Recompose
Boolean
read/write
If true, recompose every time the composition source has changed.
Composition
MergeUserDictionary
1262
Type: Name:
Decimal:
idComposeUsing.idUseUserDictionary
1433629284
idComposeUsing.idUseDocument
1967419235
idComposeUsing.idBoth
1651471464
Visual Basic Reference
InDesign CS Scripting Guide
DisplayPerformancePreference Properties Property:
Access:
Description:
read/write
he default display setting for new windows.
Boolean
read/write
If true, ignore local settings for all windows.
Parent
Application
read only
he parent of the object.
PersistLocalSettings
Boolean
read/write
Whether or not to local settings are saved to and read from the document
DefaultDisplaySettings
IgnoreLocalSettings
Type: Name:
Decimal:
idViewDisplaySettings.idHighQuality
1346922866
idViewDisplaySettings.idTypical
1349810544
idViewDisplaySettings.idOptimized
1349480564
InDesign CS Scripting Guide Visual Basic Reference 1263
DisplaySetting Properties Property:
Type:
Access:
Description:
Antialiasing
Boolean
read/write
If true, anti-alias objects. (his setting affects the display only, and has no effect on printing.)
GreekBelow
Double
read/write
Display text below this size (in points) as a gray rectangle (“greeking”).
Index
Long
read only
Index of the DisplaySetting within its parent Application
Parent
Application
read only
he parent of the object.
read/write
he method used to display raster images.
read/write
he method used to display transparency.
read/write
he method used to display vector objects.
Raster
Transparency
Vector
1264
Name:
Decimal:
idTagRaster.idGrayOut
1917284985
idTagRaster.idProxy
1917874808
idTagRaster.idHighResolution
1917348177
idTagRaster.idDefault
1147563124
Name:
Decimal:
idTagTransparency.idOff
1330005536
idTagTransparency.idLowQuality
1481666146
idTagTransparency.idMediumQuality
1481663597
idTagTransparency.idHighQuality
1346922866
idTagTransparency.idDefault
1147563124
Name:
Decimal:
idTagVector.idGrayOut
1917284985
idTagVector.idProxy
1917874808
idTagVector.idHighResolution
1917348177
idTagVector.idDefault
1147563124
Visual Basic Reference
InDesign CS Scripting Guide
DisplaySettings Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of DisplaySettings
Item
DisplaySetting
read only
Returns the DisplaySetting with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
DisplaySetting
Returns any DisplaySetting.
FirstItem
None
DisplaySetting
Returns the first DisplaySetting.
DisplaySettings
Returns the display settings within the specified range.
ItemByRange
Name:
Type:
Description:
From
DisplaySetting
he display setting at the start of the range.
To
DisplaySetting
he display setting at the end of the range.
LastItem
None
DisplaySetting
Returns the last DisplaySetting.
MiddleItem
None
DisplaySetting
Returns the middle DisplaySetting.
DisplaySetting
Returns the next DisplaySetting.
DisplaySetting
Returns the previous DisplaySetting.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
DisplaySetting
he DisplaySetting before the one desired.
Name:
Type:
Description:
Obj
DisplaySetting
he DisplaySetting ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1265
Document Properties Property: AterBlendingIntent
Type: Name:
Decimal:
idRenderingIntent.idUseColorSettings
1380541299
idRenderingIntent.idPerceptual
1380544611
idRenderingIntent.idSaturation
1380545377
idRenderingIntent.idRelativeColorimetric
1380545123
idRenderingIntent.idAbsoluteColorimetric
1380540771
Access:
Description:
read/write
he rendering intent for transparent objects. Corresponds to the Ater-Blending Intent pop-up menu in the Assign Profiles dialog box.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items on the document pages of the document, egardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
Bookmarks
Bookmarks
read only
Every bookmark
ButtonPreferences
ButtonPreference
read only
Button preferences
Buttons
Buttons
read only
Every button
CharacterStyles
CharacterStyles
read only
Character Styles
CMYKProfile
String
read/write
he current CMYK profile
CMYKProfileList
Variant
read only
he list of available CMYK profiles as Array of Strings
Colors
Colors
read only
All colors
DashedStrokeStyles
DashedStrokeStyles
read only
Every dashed stroke style
read/write
he default color management intent for bitmap images in the document. his property corresponds to the Default Image Intent pop-up menu in the Assign Profiles dialog box.
DefaultImageIntent
Name:
Decimal:
idRenderingIntent.idUseColorSettings
1380541299
idRenderingIntent.idPerceptual
1380544611
idRenderingIntent.idSaturation
1380545377
idRenderingIntent.idRelativeColorimetric
1380545123
idRenderingIntent.idAbsoluteColorimetric
1380540771
DictionaryPreferences
DictionaryPreference
read only
he user dictionary preferences for the document. his object corresponds to the Dictionary panel of the Preferences dialog box.
DocumentPreferences
DocumentPreference
read only
he document preferences for the document. his object corresponds to the Document panel of the Preferences dialog box.
DottedStrokeStyles
DottedStrokeStyles
read only
Every dotted stroke style
DTDs
DTDs
read only
All DTDs
FilePath
String
read only
he file path to the folder containing the document (does not include the file name).
Fonts
Fonts
read only
Every font
FormFields
FormFields
read only
Every form field item
FullName
String
read only
he file path to the document file, including the file name.
1266
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
GalleyPreferences
GalleyPreference
read only
he Story Editor preferences of the document. his object corresponds to the Story Editor Display panel of the Preferences dialog box.
Gradients
Gradients
read only
All gradients
GraphicLines
GraphicLines
read only
All graphic lines
GridPreferences
GridPreference
read only
he document grid preferences. his object corresponds to the Grids panel of the Preferences dialog box.
Groups
Groups
read only
Groups
GuidePreferences
GuidePreference
read only
he guide preferences for the document. his object corresponds to the Guides and Pasteboard panel of the Preferences dialog box.
Guides
Guides
read only
Every guide
HyperlinkExternalPageDestinations
HyperlinkExternalPageDestinations
read only
Every hyperlink external page destination
HyperlinkPageDestinations
HyperlinkPageDestinations
read only
Every hyperlink page destination
HyperlinkPageItemSources
HyperlinkPageItemSources
read only
Every hyperlink page item source
Hyperlinks
Hyperlinks
read only
Every hyperlink
HyperlinkTextDestinations
HyperlinkTextDestinations
read only
Every hyperlink text destination
HyperlinkTextSources
HyperlinkTextSources
read only
Every hyperlink text source
HyperlinkURLDestinations
HyperlinkURLDestinations
read only
Every hyperlink URL destination
HyphenationExceptions
HyphenationExceptions
read only
Every hyphenation exception
Index
Long
read only
Index of the Document within its parent Application
Indexes
Indexes
read only
Every index
IndexGenerationOptions
IndexOptions
read only
he options controlling index generation for the document. his object corresponds to the Generate Index dialog box (to display this dialog box, choose Generate Index from the Index palette menu).
Inks
Inks
read only
Every InDesign ink
Label
String
read/write
A label that can be set to any string
Languages
Languages
read only
Every language
Layers
Layers
read only
Every layer
LayoutAdjustmentPreferences
LayoutAdjustmentPreference
read only
he document layout adjustment preferences. he properties in this object correspond to the options shown in the Layout Adjustment dialog box (choose Layout Adjustment from the Layout menu to display this dialog box).
LayoutWindows
LayoutWindows
read only
Every layout window
Links
Links
read only
Every file link
MarginPreferences
MarginPreference
read only
Margin preferences
MasterSpreads
MasterSpreads
read only
All master spreads
MetadataPreferences
MetadataPreference
read only
he document metadata preferences.
MixedInkGroups
MixedInkGroups
read only
All mixed ink groups
InDesign CS Scripting Guide Visual Basic Reference 1267
Property:
Type:
Access:
Description:
MixedInks
MixedInks
read only
All mixed inks
Modified
Boolean
read only
If true, the document has been modified since it was last saved.
Name
String
read only
he name of the document.
Ovals
Ovals
read only
All ovals
PackageForGoLivePreferences
PackageForGoLivePreference
read only
he default Package For GoLive preferences
PageItems
PageItems
read only
All page items
Pages
Pages
read only
Every page
ParagraphStyles
ParagraphStyles
read only
Paragraph Styles
Parent
Application
read only
he parent of the object.
PasteboardPreferences
PasteboardPreference
read only
he pasteboard preferences for the document.
PolygonPreferences
PolygonPreference
read only
he polygon preferences for the document.
Polygons
Polygons
read only
All polygons
PrintPreferences
PrintPreference
read only
he print preferences of the document.
Rectangles
Rectangles
read only
All rectangles
RedoName
String
read only
Name of the action on the top of the redo stack.
RGBProfile
String
read/write
he current RGB profile
RGBProfileList
Variant
read only
he list of available RGB profiles as Array of Strings
Saved
Boolean
read only
If true, the document has been saved since it was opened.
Sections
Sections
read only
All layout sections
Selection
Array of Objects
read/write
he current selection of the active window.
read/write
he rendering intent to use for solid colors. his property corresponds to the Solid Color Intent pop-up menu in the Assign Profiles dialog box.
SolidColorIntent
Name:
Decimal:
idRenderingIntent.idUseColorSettings
1380541299
idRenderingIntent.idPerceptual
1380544611
idRenderingIntent.idSaturation
1380545377
idRenderingIntent.idRelativeColorimetric
1380545123
idRenderingIntent.idAbsoluteColorimetric
1380540771
Spreads
Spreads
read only
Every spread
Stories
Stories
read only
Stories
StoryPreferences
StoryPreference
read only
he document default story preferences.
StoryWindows
StoryWindows
read only
Every story window
StripedStrokeStyles
StripedStrokeStyles
read only
Every stripe stroke style
StrokeStyles
StrokeStyles
read only
Every stroke style
Swatches
Swatches
read only
All swatches
TextDefaults
TextDefault
read only
he document default text formatting. Changing the default text formatting sets the default formatting for all new text frames, but has no effect on the text in existing text frames.
TextFramePreferences
TextFramePreference
read only
he document default text frame preferences. Changing the default text frame preferences sets the default formatting for all new text frames, but has no effect on existing text frames.
TextFrames
TextFrames
read only
Text Frames
1268
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TextPreferences
TextPreference
read only
he document’s text preferences. his object corresponds to the Text panel of the Preferences dialog box.
Tints
Tints
read only
All tints
TOCStyles
TOCStyles
read only
Every TOC style
TransparencyPreferences
TransparencyPreference
read only
he document transparency preferences. his object corresponds to the setting of the Transparency Blend Space submenu of the Edit menu.
TrapPresets
TrapPresets
read only
Every InDesign trap preset
UndoName
String
read only
he name of the action on the top of the undo stack.
UnusedSwatches
Objects
read only
he unused swatches in the document.
ValidationErrors
ValidationErrors
read only
All XML validation errors
ViewPreferences
ViewPreference
read only
he view preferences of the document. he properties of this object correspond to the options in the Units and Increments panel of the Preferences dialog box.
Visible
Boolean
read only
If true, the document is visible.
Windows
Windows
read only
Every window
XMLComments
XMLComments
read only
All XML comments
XMLElements
XMLElements
read only
All XML elements
XMLExportMaps
XMLExportMaps
read only
Every style to XML tag mapping
XMLExportPreferences
XMLExportPreference
read only
he default XML export preferences
XMLImportMaps
XMLImportMaps
read only
Every XML tag to style mapping
XMLImportPreferences
XMLImportPreference
read only
he default XML import preferences
XMLInstructions
XMLInstructions
read only
All XML instructions
XMLItems
XMLItems
read only
All XML items
XMLTags
XMLTags
read only
All XML tags
XMLViewPreferences
XMLViewPreference
read only
he default XML view preferences
ZeroPoint
Variant
read/write
he current zero point. he default location of the zero point is set by the ruler origin property of the view preferences object. Setting the zero point to (0,0) returns the zero point to the default location.
Methods Method:
Parameters:
Return:
Description:
AutoStyle
None
Nothing
Auto style the document based on the tag to style map
AutoTag
None
Nothing
Auto tag the document based on the style to tag map
Nothing
Close the document.
Close
Name: [Saving]
[SavingIn]
Type: Name:
Description: Decimal:
idSaveOptions.idNo
1852776480
idSaveOptions.idAsk
1634954016
idSaveOptions.idYes
2036691744
Variant
If true, save changes before closing the document.
he file in which to save the document.
InDesign CS Scripting Guide Visual Basic Reference 1269
Method: CreateTOC
DeleteUnusedTags Export
ExtractLabel
ImportDTD
1270
Parameters: Name:
Type:
Description:
Using
TOCStyle
he table of content style to create with.
[Replacing]
Boolean
If true, replace existing TOC.
[FromBook]
Variant
he book object where TOC is created from.
[PlacePoint]
Variant
he point where to place the object.
[IncludeOverset]
Boolean
If true, include TOC in overset.
[DestinationLayer]
Variant
he layer on which to place the TOC as Layer.
None Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
From
String
he file name.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
TextFrame
Create Table of Content for a Document or Book.
Nothing
Delete unused XML markup tags
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Import a DTD to use for validation.
Method: ImportStyles
Parameters: Name: Format
ImportXML
InsertLabel
LoadXMLTags
Package
PackageForGoLive
PrintOut
Type:
Description:
Name:
Decimal:
idImportFormat.idCharacterStylesFormat
1131565940
idImportFormat.idParagraphStylesFormat
1885885300
idImportFormat. idTextStylesFormat
1668305780
idImportFormat. idTOCStylesFormat
1415795572
Return:
Description:
Nothing
Import styles.
Nothing
Import a XML file into an InDesign document.
Nothing
Sets the string associated with the given key (label name).
Nothing
Load a set of tags from an external file.
Boolean
Packages the document.
Boolean
Packages for GoLive.
Nothing
Prints the document.
the format.
From
String
an InDesign file to import from.
Name:
Type:
Description:
From
String
he file name.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
From
String
he file name.
Name:
Type:
Description:
To
String
A folder, alias or path as string in which to place the packaged files.
CopyingFonts
Boolean
If true, copy required fonts.
CopyingLinkedGraphics
Boolean
If true, copy linked graphics file.
CopyingProfiles
Boolean
If true, copy profiles.
UpdatingGraphics
Boolean
If true, update graphics links before packaging.
IncludingHiddenLayers
Boolean
If true, include objects on hidden layers.
IgnorePreflightErrors
Boolean
If true, ignore preflight errors and package anyways.
CreatingReport
Boolean
If true, create package report.
Name:
Type:
Description:
Location
String
File location for package.
Name:
Type:
Description:
[PrintDialog]
Boolean
If true, display the Print dialog box.
[Using]
PrinterPreset or name of PrinterPreset as String
he printer preset.
InDesign CS Scripting Guide Visual Basic Reference 1271
Method:
Parameters:
Return:
Description:
Redo
None
Nothing
Redo the last action
Nothing
Save the document.
Nothing
Save a set of tags to an external file.
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
Save
SaveXMLTags
Search
Name:
Type:
Description:
[To]
file name as String
Where to save the document. If the document is already saved, a copy is saved at this path, the original file is closed the new copy is opened.
[Stationery]
Boolean
If true, save the file as stationery.
Name:
Type:
Description:
To
String
he file to export to.
Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
Undo
1272
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
SelectableItems
Object, Array of Objects, or idNothingEnum.idNothing (to deselect all)
he object(s) to select.
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
None
Visual Basic Reference
You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
InDesign CS Scripting Guide
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects an object or objects. If the object is a text object (e.g., characters, words, lines, paragraphs), any other selected objects are deselected (the AppendSelection parameter has no effect).
Nothing
Undo the last action
How to handle the existing selection.
DocumentPreference Properties Property:
Type:
Access:
Description:
AllowPageShuffle
Boolean
read/write
If false, adding a page to a spread always adds it to that spread (up to a maximum of 10 pages). If true, pages added to the spread can be moved (“shuffled”) to a different spread.
ColumnGuideColor
idUIColor or Array of Doubles (r, g, b)
read/write
he color of column guides.
DocumentBleedBottomOffset
Double or String
read/write
he height of the bottom document bleed offset.
DocumentBleedInsideOrLetOffset
Double or String
read/write
he width of the inside (or let) document bleed offset.
DocumentBleedOutsideOrRightOffset
Double or String
read/write
he width of the outside (or right) document bleed offset.
DocumentBleedTopOffset
Double or String
read/write
he height of the top document bleed offset.
DocumentBleedUniformSize
Boolean
read/write
he bleed uniform size flag
DocumentSlugUniformSize
Boolean
read/write
he slug uniform size flag
FacingPages
Boolean
read/write
If true, the document uses facing pages.
MarginGuideColor
idUIColor or Array of Doubles (r, g, b)
read/write
he color of margin guides.
OverprintBlack
Boolean
read/write
If true, overprint black when printing the document.
PageHeight
Double or String
read/write
he height of the pages in the document.
read/write
he orientation of the pages in the document.
PageOrientation
Name:
Decimal:
idPageOrientation.idLandscape
2003395685
idPageOrientation.idPortrait
1751738216
PagesPerDocument
Long
read/write
he number of pages in a document.
PageWidth
Double or String
read/write
he width of the pages in the document.
Parent
Variant
read only
he parent of the object.
PreserveLayoutWhenShuffling
Boolean
read/write
If true, then when setting ‘allow page shuffle’ and the document has spreads with a number of pages greater than the default, this layout is preserved. If false then the pages on these spreads get shuffled.
SlugBottomOffset
Double or String
read/write
he height of the bottom slug offset.
SlugInsideOrLetOffset
Double or String
read/write
he width of the inside (or let) slug offset.
SlugRightOrOutsideOffset
Double or String
read/write
he width of the outside (or right) slug offset.
SlugTopOffset
Double or String
read/write
he height of the top slug offset.
InDesign CS Scripting Guide Visual Basic Reference 1273
DocumentPreset Properties Property:
Type:
Access:
Description:
Bottom
Double or String
read/write
Bottom edge of the DocumentPreset as Unit (Double or String)
ColumnCount
Long
read/write
he number of columns
ColumnGutter
Double or String
read/write
he distance between columns in a text frame as Unit (Double or String)
DocumentBleedBottomOffset
Double or String
read/write
he bottom document bleed offset as Unit (Double or String)
DocumentBleedInsideOrLetOffset
Double or String
read/write
he let or inside document bleed offset as Unit (Double or String)
DocumentBleedOutsideOrRightOffset
Double or String
read/write
he outside or right document bleed offset as Unit (Double or String)
DocumentBleedTopOffset
Double or String
read/write
he top document bleed offset as Unit (Double or String)
FacingPages
Boolean
read/write
Whether the document has facing page.
Id
Long
read only
he DocumentPreset’s unique id
Index
Long
read only
Index of the DocumentPreset within its parent Application
Label
String
read/write
A label that can be set to any string
Let
Double or String
read/write
Let edge of the DocumentPreset as Unit (Double or String)
Name
String
read/write
he name of the DocumentPreset
PageHeight
Double or String
read/write
he height of the page as Unit (Double or String)
read/write
he orientation of the page
PageOrientation
Name:
Decimal:
idPageOrientation.idLandscape
2003395685
idPageOrientation.idPortrait
1751738216
PagesPerDocument
Long
read/write
he number of pages in a document
PageWidth
Double or String
read/write
he width of the page as Unit (Double or String)
Parent
Application
read only
he DocumentPreset’s parent
Right
Double or String
read/write
Right edge of the DocumentPreset as Unit (Double or String)
SlugBottomOffset
Double or String
read/write
he bottom slug offset as Unit (Double or String)
SlugInsideOrLetOffset
Double or String
read/write
he inside or let slug offset as Unit (Double or String)
SlugRightOrOutsideOffset
Double or String
read/write
he right or outside slug offset as Unit (Double or String)
SlugTopOffset
Double or String
read/write
he top slug offset as Unit (Double or String)
Top
Double or String
read/write
Top edge of the DocumentPreset as Unit (Double or String)
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
1274
Visual Basic Reference
InDesign CS Scripting Guide
Method: ExtractLabel
InsertLabel
Parameters: Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Return:
Description:
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
InDesign CS Scripting Guide Visual Basic Reference 1275
DocumentPresets Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of DocumentPresets
Item
DocumentPreset
read only
Returns the DocumentPreset with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
DocumentPreset
Create a new document preset.
AnyItem
None
DobumentPreset
Returns any DocumentPreset.
FirstItem
None
DobumentPreset
Returns the first DocumentPreset.
DobumentPreset
Returns the DocumentPreset with the specified ID.
DocumentPresets
Returns the document presets within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
DocumentPreset
he document preset at the start of the range.
To
DocumentPreset
he document preset at the end of the range.
LastItem
None
DobumentPreset
Returns the last DocumentPreset.
MiddleItem
None
DobumentPreset
Returns the middle DocumentPreset.
DobumentPreset
Returns the next DocumentPreset.
DobumentPreset
Returns the previous DocumentPreset.
NextItem
PreviousItem
1276
Name:
Type:
Description:
Obj
DocumentPreset
he DocumentPreset before the one desired.
Name:
Type:
Description:
Obj
DocumentPreset
he DocumentPreset ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Documents Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Documents
Item
Document
read only
Returns the Document with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[ShowingWindow]
Boolean
If true, open the document in a window.
[DocumentPreset]
DocumentPreset or String
Document preset to use.
Return:
Description:
Document
Create a new Document.
AnyItem
None
Object
Returns any Document.
FirstItem
None
Object
Returns the first Document.
Documents
Returns the Documents within the specified range.
ItemByRange
Name:
Type:
Description:
From
Document
he document at the start of the range.
To
Document
he document at the end of the range.
LastItem
None
Object
Returns the last Document.
MiddleItem
None
Object
Returns the middle Document.
Object
Returns the next Document.
Object
Returns the previous Document.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Document
he Document before the one desired.
Name:
Type:
Description:
Obj
Document
he Document ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1277
DottedStrokeStyle Properties Property:
Type:
Access:
Description:
DotArray
Array of Doubles (dot center, dot center, ...)
read/write
he position of the dots in the the dotted stroke style.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the DottedStrokeStyle within its parent Document or Application
Name
String
read/write
he name of the XML tag
Parent
Variant
read only
he parent of the object.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
read only
Stroke style type
StrokeCornerAdjustment
StrokeStyleType
Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
String
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
1278
Visual Basic Reference
InDesign CS Scripting Guide
DottedStrokeStyles Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of DottedStrokeStyles
Item
DottedStrokeStyle
read only
Returns the DottedStrokeStyle with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
DottedStrokeStyle
Create a new dotted stroke style.
AnyItem
None
DottedStrokeStyle
Returns any DottedStrokeStyle.
FirstItem
None
DottedStrokeStyle
Returns the first DottedStrokeStyle.
DottedStrokeStyle
Returns the DottedStrokeStyle with the specified ID.
DottedStrokeStyles
Returns the dotted stroke styles within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
DottedStrokeStyle
he dotted stroke style at the start of the range.
To
DottedStrokeStyle
he dotted stroke style at the end of the range.
LastItem
None
DottedStrokeStyle
Returns the last DottedStrokeStyle.
MiddleItem
None
DottedStrokeStyle
Returns the middle DottedStrokeStyle.
DottedStrokeStyle
Returns the next DottedStrokeStyle.
DottedStrokeStyle
Returns the previous DottedStrokeStyle.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
DottedStrokeStyle
he DottedStrokeStyle before the one desired.
Name:
Type:
Description:
Obj
DottedStrokeStyle
he DottedStrokeStyle ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1279
Dropdown Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Dropdown within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SelectedIndex
Long
read/write
index of the selected string in the dropdown
StringList
Variant
read/write
A list of the strings that appear on the menu of the control.
1280
Visual Basic Reference
InDesign CS Scripting Guide
Dropdowns Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Dropdowns
Item
DropDown
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
Dropdown
Create a new dropdown.
AnyItem
None
DropDown
Returns any Dropdown.
FirstItem
None
DropDown
Returns the first Dropdown.
DropDown
Returns the Dropdown with the specified ID.
Dropdowns
Returns the dropdowns within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
DropDown
he dropdown at the start of the range.
To
DropDown
he dropdown at the end of the range.
LastItem
None
DropDown
Returns the last Dropdown.
MiddleItem
None
DropDown
Returns the middle Dropdown.
DropDown
Returns the next Dropdown.
DropDown
Returns the previous Dropdown.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
DropDown
he Dropdown before the one desired.
Name:
Type:
Description:
Obj
DropDown
he Dropdown ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1281
DTD Properties Property:
Type:
Access:
Description:
Contents
Variant
read only
he text contents as String or idSpecialCharacters
Id
Long
read only
he DTD’s unique id
Index
Long
read only
Index of the DTD within its parent Document, XMLElement or XMLItem
Parent
Variant
read only
he DTD’s parent as Document, XMLElement or XMLItem
PublicId
String
read only
he public id of the DTD’S DOCTYPE declaration. Only valid if the DTD an an external subset
RootTag
XMLTag
read/write
he tag of the document’s root object
SystemId
String
read only
he system id of the DTD’S DOCTYPE declaration. Only valid if the DTD is an external subset
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
XMLElement
Move element before/ater another element or text object, or to beginning/end.
Nothing
Select this DTD.
Move
Name:
Type:
To
Select
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Location.
[Reference]
Variant
Before/ater this object as XMLItem or Text.
Name:
Type:
Description:
[ExistingSelection]
1282
Description:
Visual Basic Reference
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
DTDs Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of DTDs
Item
DTD
read only
Returns the DTD with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
DTD
Returns any DTD.
FirstItem
None
DTD
Returns the first DTD.
DTD
Returns the DTD with the specified ID.
DTDs
Returns the DTDs within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
DTD
he DTD at the start of the range.
To
DTD
he DTD at the end of the range.
LastItem
None
DTD
Returns the last DTD.
MiddleItem
None
DTD
Returns the middle DTD.
DTD
Returns the next DTD.
DTD
Returns the previous DTD.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
DTD
he DTD before the one desired.
Name:
Type:
Description:
Obj
DTD
he DTD ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1283
EnablingGroup Properties Property:
Type:
Access:
Description:
AngleComboboxes
AngleComboboxes
read only
All angle comboboxes
AngleEditboxes
AngleEditboxes
read only
All angle editboxes
BorderPanels
BorderPanels
read only
All border panels
CheckboxControls
CheckboxControls
read only
All checkbox controls
CheckedState
Boolean
read/write
True if this item is checked
DialogColumns
DialogColumns
read only
All columns
DialogRows
DialogRows
read only
All dialog rows
Dropdowns
Dropdowns
read only
All dropdowns
EnablingGroups
EnablingGroups
read only
All enabling checkbox panels
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the EnablingGroup within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
IntegerComboboxes
IntegerComboboxes
read only
All integer comboboxes
IntegerEditboxes
IntegerEditboxes
read only
All integer editboxes
MeasurementComboboxes
MeasurementComboboxes
read only
All measurement comboboxes
MeasurementEditboxes
MeasurementEditboxes
read only
All measurement editboxes
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
PercentComboboxes
PercentComboboxes
read only
All percent comboboxes
PercentEditboxes
PercentEditboxes
read only
All percent editboxes
RadiobuttonGroups
RadiobuttonGroups
read only
All radio button groups
RealComboboxes
RealComboboxes
read only
All real number comboboxes
RealEditboxes
RealEditboxes
read only
All real number editboxes
StaticLabel
String
read/write
static text label for the widget
StaticTexts
StaticTexts
read only
All static texts
TextEditboxes
TextEditboxes
read only
All text editboxes
Widgets
Widgets
read only
All widgets
1284
Visual Basic Reference
InDesign CS Scripting Guide
EnablingGroups Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of EnablingGroups
Item
EnablingGroup
read only
Returns the EnablingGroup with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
EnablingGroup
Create a new enabling group.
AnyItem
None
EnablingGroup
Returns any EnablingGroup.
FirstItem
None
EnablingGroup
Returns the first EnablingGroup.
EnablingGroup
Returns the EnablingGroup with the specified ID.
EnablingGroups
Returns the EnablingGroups within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
EnablingGroup
he enabling group at the start of the range.
To
EnablingGroup
he enabling group at the end of the range.
LastItem
None
EnablingGroup
Returns the last EnablingGroup.
MiddleItem
None
EnablingGroup
Returns the middle EnablingGroup.
EnablingGroup
Returns the next EnablingGroup.
EnablingGroup
Returns the previous EnablingGroup.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
EnablingGroup
he EnablingGroup before the one desired.
Name:
Type:
Description:
Obj
EnablingGroup
he EnablingGroup ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1285
EPS Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scale of the page item relative to its containing page item
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item
AbsoluteVerticalScale
Double
read/write
he vertical scale of the page item relative to its containing page item
ActualPpi
Variant
read only
he resolution of the native graphic file as Array of 2 Doubles
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he blend mode used to combine the object’s color with the background
BlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ClippingPath
ClippingPathSettings
read only
he clipping path settings
EffectivePpi
Variant
read only
he resolution of the graphic ater it has been resized as Array of 2 Doubles
read/write
he type of feathering to apply
read/write
he feather mode
FeatherCornerType
FeatherMode
Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
FeatherWidth
Double
read/write
he width of the feathering
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (Doubles or Strings)
HorizontalScale
Double
read/write
he scale percentage in the horizontal direction
1286
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Id
Long
read only
he EPS’s unique id
ImageTypeName
String
read only
he type of image
Index
Long
read only
Index of the EPS within its parent XMLElement, PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
IsolateBlending
Boolean
read/write
Indicates whether the object should blend in isolation
ItemLink
Link
read only
Link to a placed file
KnockoutGroup
Boolean
read/write
Indicates whether the object is a knockout group
Label
String
read/write
A label that can be set to any string
read/write
he display settings for this page item
LocalDisplaySetting
Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Nonprinting
Boolean
read/write
Whether the page item is non-printing
Opacity
Double
read/write
he opacity of the object
Parent
Variant
read only
he EPS’s parent as XMLElement, PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
RotationAngle
Double
read/write
Angle of rotation
read/write
he blend mode to use for drawing the shadow
ShadowBlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ShadowBlurRadius
Double
read/write
he radius of the blur to apply to the shadow
ShadowColor
Swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
Double
read/write
he opacity of the shadow
ShadowXOffset
Double
read/write
he horizontal offset of the shadow
ShadowYOffset
Double
read/write
he vertical offset of the shadow
ShadowMode
ShadowOpacity
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
InDesign CS Scripting Guide Visual Basic Reference 1287
Property:
Type:
Access:
Description:
ShearAngle
Double
read/write
he shear angle of the page item relative to the spread
Space
String
read only
he color space
TextWrapPreferences
TextWrapPreference
read only
he text wrap preferences
VerticalScale
Double
read/write
he scale percentage in the vertical direction
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Markup layout content with XML preserving the existing content.
Export
ExtractLabel
InsertLabel
Markup
1288
Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Move
Place
PlaceXML
Parameters: Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
Return:
Description:
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
InDesign CS Scripting Guide Visual Basic Reference 1289
Method: Resize
1290
Parameters: Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Method: Rotate
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Return:
Description:
Nothing
Rotate the page item.
InDesign CS Scripting Guide Visual Basic Reference 1291
Method: Shear
Store
Unlink
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
From
1292
Name:
Visual Basic Reference
Name:
Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
EPSExportPreference Properties Property:
Type:
Access:
Description:
AppliedFlattenerPreset
FlattenerPreset
read/write
he flattener preset
BleedBottom
Variant
read/write
Amount to image below the defined page size as Unit (Double or String)
BleedInside
Variant
read/write
Amount to image inside the defined page size as Unit (Double or String)
BleedOutside
Variant
read/write
Amount to image outside the defined page size as Unit (Double or String)
BleedTop
Variant
read/write
Amount to image above the defined page size as Unit (Double or String)
read/write
he format of data sent to the printer
read/write
he EPS color space
Boolean
read/write
Whether to export the pages as spreads
Name:
Decimal:
read/write
idFontEmbedding.idNone
1852796517
Control how fonts are embedded to the exported EPS
read/write
Whether to ignore flattener spread overrides
read/write
Control how much image data is exported to the EPS
DataFormat
EPSColor
EPSSpreads FontEmbedding
IgnoreSpreadOverrides ImageData
Name:
Decimal:
idDataFormat.idASCII
1095975753
idDataFormat.idBinary
1114534521
Name:
Decimal:
idEPSColorSpace.idRGB
1666336578
idEPSColorSpace.idCMYK
1129142603
idEPSColorSpace.idGray
1766290041
idEPSColorSpace.idUnchangedColorSpace
1970161251
idFontEmbedding.idComplete
2003332197
idFontEmbedding.idSubset
1768842098
Boolean Name:
Decimal:
idEPSImageData.idAllImageData
1853058416
idEPSImageData.idProxyImageData
1819243130
OmitBitmaps
Boolean
read/write
Replace bitmap images with OPI links
OmitEPS
Boolean
read/write
Replace EPS images with OPI links
OmitPDF
Boolean
read/write
Replace PDF images with OPI links
OPIImageReplacement
Boolean
read/write
Whether to print graphics that are either linked using OPI comments or OPI comments stored in imported EPS files
PageRange
Variant
read/write
he range of pages as idPageRange or String
Parent
Application
read only
he EPSExportPreference’s parent
read/write
he level of PostScript to send to the printer
read/write
the type of preview to save with the exported EPS
PostScriptLevel
Preview
Name:
Decimal:
idPostScriptLevels.idLevel2
1347636274
idPostScriptLevels.idLevel3
1347636275
Name:
Decimal:
idPreviewTypes.idNone
1852796517
idPreviewTypes.idTIFFPreview
1164997734
idPreviewTypes.idPICTPreview
1164996724
InDesign CS Scripting Guide Visual Basic Reference 1293
EPSImportPreference Properties Property:
Type:
Access:
Description:
EPSFrames
Boolean
read/write
Whether to create frames from clip path when imports EPS
read/write
he type of proxy created when imports EPS
EPSProxy
Name:
Decimal:
idCreateProxy.idAsNeeded
1699311204
idCreateProxy.idAlways
1699307895
OPIComments
Boolean
read/write
Whether to read OPI Image Links when imports EPS
Parent
Application
read only
he EPSImportPreference’s parent
1294
Visual Basic Reference
InDesign CS Scripting Guide
EPSs Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of EPSs
Item
EPS
read only
Returns the EPS with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
EPS
Returns any EPS.
FirstItem
None
EPS
Returns the first EPS.
EPS
Returns the EPS with the specified ID.
EPSs
Returns the EPSs within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
EPS
he enabling group at the start of the range.
To
EPS
he enabling group at the end of the range.
LastItem
None
EPS
Returns the last EPS.
MiddleItem
None
EPS
Returns the middle EPS.
EPS
Returns the next EPS.
EPS
Returns the previous EPS.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
EPS
he EPS before the one desired.
Name:
Type:
Description:
Obj
EPS
he EPS ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1295
ExcelImportPreference Properties Property: AlignmentStyle
Type: Name:
Decimal:
idAlignmentStyle.idSpreadsheet
1936749171
idAlignmentStyle.idLetAlign
1818584692
idAlignmentStyle.idRightAlign
1919379572
idAlignmentStyle.idCenterAlign
1667591796
Access:
Description:
read/write
he alignment of text in the cells of the imported Excel spreadsheet.
DecimalPlaces
Long
read/write
he number of decimal places.
ErrorCode
Long
read/write
he error code associated with the Excel spreadsheet import. (0-Success 1-Empty Sheet 2-Invalid sheet 3-Invalid range 4-Invalid View 5-Misc. Error).
Parent
Application
read only
he parent of the object.
RangeName
String
read/write
he name of selected range.
SheetIndex
Long
read/write
Index of the selected sheet.
SheetName
String
read/write
he name of the selected sheet.
ShowHiddenCells
Boolean
read/write
If true, show hidden cells in the imported spreadsheet.
read/write
Options for Table Formatting
read/write
he name of selected view.
TableFormatting
ViewName
1296
Name:
Decimal:
idTableFormatting.idExcelFormattedTable
2020361812
idTableFormatting.idExcelUnformattedTable
2020365652
idTableFormatting.idExcelUnformattedTabbedText
2018858068
String
Visual Basic Reference
InDesign CS Scripting Guide
FindPreference Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AppliedCharacterStyle
CharacterStyle or String
read/write
he character style applied to the text.
AppliedFont
Font or String
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Language
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
ParagraphStyle or String
read/write
he paragraph style applied to the text.
AutoLeading
Double
read/write
Percentage for calculating auto leading
BalanceRaggedLines
Boolean
read/write
Whether to balance ragged lines
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
Capitalization
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
CaseSensitive
Boolean
read/write
If true, then search only for text that matches case
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
FillColor
Swatch or String
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he text override of the fill’s tint percentage (-1 indicates no override)
FindText
String
read/write
he text to find
FirstLineIndent
Double or String
read/write
he indent applied to the first line of the paragraph containing the text.
InDesign CS Scripting Guide Visual Basic Reference 1297
Property:
Type:
Access:
Description:
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Double or “Auto”
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Double or String
read/write
he let indent applied to the paragraph containing the text.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
1298
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
Parent
Application
read only
he parent of the object.
PointSize
Double
read/write
he size of the text in points.
read/write
he position attribute applied to the text.
read/write
he right indent applied to the paragraph containing the text.
read/write
Justification for lines with only one word.
Position
RightIndent SingleWordJustification
Name:
Decimal:
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Double or String Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Double or String
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Double or String
read/write
he space before applied to the paragraph containing the text.
read/write
Where to start the paragraph
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he color of the strike through as Swatch or String
StrikehroughGapColor
Variant
read/write
he gap color of the strike through as Swatch or String
StrikehroughGapOverprint
Boolean
read/write
Whether to overprint the gap of the strike through
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
InDesign CS Scripting Guide Visual Basic Reference 1299
Property:
Type:
Access:
Description:
StrikehroughOffset
Double or String
read/write
he offset of the strike through as Unit (Double or String)
StrikehroughOverprint
Boolean
read/write
Whether to overprint the strike through
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strike through
StrikehroughWeight
Double
read/write
he line weight of the strike through
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Swatch or String
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he text override of the stroke’s tint percentage (-1 indicates no override)
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Swatch or String
read/write
he color of the underline as Swatch or String
UnderlineGapColor
Swatch or String
read/write
he gap color of the underline as Swatch or String
UnderlineGapOverprint
Boolean
read/write
Whether to overprint the gap of the underline
UnderlineGapTint
Double
read/write
he gap tint of the underline
UnderlineOffset
Double or String
read/write
he offset of the underline as Unit (Double or String)
UnderlineOverprint
Boolean
read/write
Whether to overprint the underline
UnderlineTint
Double
read/write
he tint of the underline
UnderlineType
StrokeStyle
read/write
he stroke type of the underline
UnderlineWeight
Double
read/write
he line weight of the underline
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
WholeWord
Boolean
read/write
If true, then disregard text embedded within a larger word
1300
Visual Basic Reference
InDesign CS Scripting Guide
FlattenerPreference Properties Property:
Type:
Access:
Description:
ClipComplexRegions
Boolean
read/write
If true, clip rasterized areas of the page to the objects which are actually rasterized.
ConvertAllStrokesToOutlines
Boolean
read/write
Convert all strokes to outlines, not just those involved with transparency
ConvertAllTextToOutlines
Boolean
read/write
Convert all text to outlines, not just the text involved with transparency
GradientAndMeshResolution
Double
read/write
Resolution at which gradient and mesh are rasterized, when necessary
LineArtAndTextResolution
Double
read/write
Resolution of transparency effects for line art and text (drop shadows and feathering)
Parent
Spread
read only
he parent of the object.
RasterVectorBalance
Variant
read/write
Raster vector balance as idFlattenerLevel or Double
InDesign CS Scripting Guide Visual Basic Reference 1301
FlattenerPreset Properties Property:
Type:
Access:
Description:
ClipComplexRegions
Boolean
read/write
Clip rasterized areas of the page to the objects which are actually rasterized
ConvertAllStrokesToOutlines
Boolean
read/write
Convert all strokes to outlines, not just those involved with transparency
ConvertAllTextToOutlines
Boolean
read/write
Convert all text to outlines, not just the text involved with transparency
GradientAndMeshResolution
Double
read/write
Resolution at which gradient and mesh are rasterized, when necessary
Id
Long
read only
he FlattenerPreset’s unique id
Index
Long
read only
Index of the FlattenerPreset within its parent Application
Label
String
read/write
A label that can be set to any string
LineArtAndTextResolution
Double
read/write
Resolution of transparency effects for line art and text (drop shadows and feathering)
Name
String
read/write
he name of the FlattenerPreset
Parent
Application
read only
he FlattenerPreset’s parent
RasterVectorBalance
Variant
read/write
Raster vector balance as idFlattenerLevel or Double
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
1302
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
FlattenerPresets Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of FlattenerPresets
Item
FlattenerPreset
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
FlattenerPreset
Create a new flattener preset.
AnyItem
None
FlattenerPreset
Returns any FlattenerPreset.
FirstItem
None
FlattenerPreset
Returns the first FlattenerPreset.
FlattenerPreset
Returns the FlattenerPreset with the specified ID.
FlattenerPreset
Returns the flattener presets within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
FlattenerPreset
he flattener preset at the start of the range.
To
FlattenerPreset
he flattener preset at the end of the range.
LastItem
None
FlattenerPreset
Returns the last FlattenerPreset.
MiddleItem
None
FlattenerPreset
Returns the middle FlattenerPreset.
FlattenerPreset
Returns the next FlattenerPreset.
FlattenerPreset
Returns the previous FlattenerPreset.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he FlattenerPreset before the one desired.
Name:
Type:
Description:
Obj
Object
he FlattenerPreset ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1303
Font Properties Property:
Type:
Access:
Description:
AllowEmbedding
Boolean
read only
If true, the font can be embedded.
AllowOutlines
Boolean
read only
If true, the font allows the creation of outlines from its character data.
AllowPDFEmbedding
Boolean
read only
Can the font be embedded in a PDF
AllowPrinting
Boolean
read only
If true, the font can be printed.
FontFamily
String
read only
he name of the font family.
FontStyleName
String
read only
he name of the font style.
read only
he type of the font (TrueType, Type1, etc.).
FontType
Name:
Decimal:
idFontTypes.idType1
1718899761
idFontTypes.idTrueType
1718899796
idFontTypes.idCID
1718895433
idFontTypes.idATC
1718894932
idFontTypes.idBitmap
1718895209
idFontTypes.idOCF
1718898499
idFontTypes.idOpenTypeCFF
1718898502
idFontTypes.idOpenTypeCID
1718898505
idFontTypes.idOpenTypeTT
1718898516
Index
Long
read only
Index of the Font within its parent Document or Application
Location
String
read only
he location of the font file on disk, including the file name.
Name
String
read only
he name of the font.
Parent
Variant
read only
he parent of the object.
PostScriptName
String
read only
he PostScript name of the font
RestrictedPrinting
Boolean
read only
If true, printing of the font is restricted.
Name:
Decimal:
read only
he status of the font.
idFontStatus.idInstalled
1718831470
idFontStatus.idNotAvailable
1718832705
Status
1304
idFontStatus.idFauxed
1718830689
idFontStatus.idSubstituted
1718834037
idFontStatus.idUnknown
1433299822
Visual Basic Reference
InDesign CS Scripting Guide
Methods Method: CheckOpenTypeFeature
Parameters: Name: Using
Type:
Description:
Name:
Decimal:
idOpenTypeFeature. idLow
1701727351
idOpenTypeFeature. idDiscretionaryLigaturesFeature
1330930764
idOpenTypeFeature. idFractionsFeature
1330931282
idOpenTypeFeature. idOrdinalFeature
1330933586
idOpenTypeFeature. idSwashFeature
1330934615
idOpenTypeFeature. idTitlingFeature
1330934857
idOpenTypeFeature. idContextualAlternatesFeature
1330930497
idOpenTypeFeature. idAllSmallCapsFeature
1664250691
idOpenTypeFeature. idSuperscriptFeature
1884247123
idOpenTypeFeature. idSubscriptFeature
1884247106
idOpenTypeFeature. idNumeratorFeature
1884247118
idOpenTypeFeature.idDenominatorFeature
1884247108
idOpenTypeFeature. idTabularLiningFeature
1330931284
idOpenTypeFeature. idProportionalOldstyleFeature
1330933587
idOpenTypeFeature. idProportionalLiningFeature
1330932816
idOpenTypeFeature. idTabularOldstyleFeature
1330933588
idOpenTypeFeature.idDefaultFigureStyleFeature
1330931268
Which OpenType feature to use.
Return:
Description:
Boolean
Check to see if a font object supports a specific OpenType feature. Pass in either one of the OpenTypeFeature enumeration values or a string with the 4 character code of the feature.
InDesign CS Scripting Guide Visual Basic Reference 1305
Fonts Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Fonts
Item
Font
read only
Returns the Font with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Font
Returns any Font.
FirstItem
None
Font
Returns the first Font.
Fonts
Returns the fonts within the specified range.
ItemByRange
Name:
Type:
Description:
From
Font
he font at the start of the range.
To
Font
he font at the end of the range.
LastItem
None
Font
Returns the last Font.
MiddleItem
None
Font
Returns the middle Font.
Font
Returns the next Font.
Font
Returns the previous Font.
NextItem
PreviousItem
1306
Name:
Type:
Description:
Obj
Font
he Font before the one desired.
Name:
Type:
Description:
Obj
Font
he Font ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
FormField Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item.
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item.
AbsoluteVerticalScale
Double
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AppearanceName
String
read only
Name of any appearance of field
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
Behaviors
Behaviors
read only
Every behavior object
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read only
Every close window behavior object
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
BlendMode
CloseWindowBehaviors CornerEffect
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
CloseWindowBehaviors Name:
Decimal:
idCornerEffects.idNone
1852796517
idCornerEffects.idRoundedCorner
1667592804
idCornerEffects.idInverseRoundedCorner
1667591798
idCornerEffects.idInsetCorner
1667591795
idCornerEffects.idBevelCorner
1667588726
idCornerEffects.idFancyCorner
1667589742
InDesign CS Scripting Guide Visual Basic Reference 1307
Property:
Type:
Access:
Description:
CornerRadius
Double
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
Description
String
read/write
Description
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
EndCap
EndJoin
FeatherCornerType
FeatherMode
Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
FeatherWidth
Double
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
FillColor
Swatch or String
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
FillTint
Double
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
GapColor
Swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
GapTint
Double
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
GeometricBounds
Array of Doubles or Strings (y1, x1, y2, x2)
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
GotoAnchorBehaviors
GotoAnchorBehaviors
read only
Every goto anchor behavior object
GotoFirstPageBehaviors
GotoFirstPageBehaviors
read only
Every goto first page behavior object
GotoLastPageBehaviors
GotoLastPageBehaviors
read only
Every goto last page behavior object
GotoNextPageBehaviors
GotoNextPageBehaviors
read only
Every goto next page behavior object
GotoNextViewBehaviors
GotoNextViewBehaviors
read only
Every goto next view behavior object
GotoPreviousPageBehaviors
GotoPreviousPageBehaviors
read only
Every goto previous page behavior object
1308
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
GotoPreviousViewBehaviors
GotoPreviousViewBehaviors
read only
Every goto previous view behavior object
GotoURLBehaviors
GotoURLBehaviors
read only
Every goto URL behavior object
GradientFillAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientFillLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
GradientFillStart
Array of Doubles or Strings (x, y)
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GradientStrokeAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientStrokeLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
GradientStrokeStart
Variant
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the FormField within its parent Spread, MasterSpread, Group, TextFrame, Story, Text, Character, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table, Page, Document, Layer or InsertionPoint
IsolateBlending
Boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
ItemLayer
Layer
read/write
he layer containing the page item.
KnockoutGroup
Boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout Group option in the Transparency palette.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
InDesign CS Scripting Guide Visual Basic Reference 1309
Property: LetLineEnd
LocalDisplaySetting
Type: Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Access:
Description:
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
read/write
he display setting for this page item.
Locked
Boolean
read/write
If true, the page item is locked.
MiterLimit
Double
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
MovieBehaviors
MovieBehaviors
read only
Movie behaviors collection object
Name
String
read/write
he name of the behavior.
Nonprinting
Boolean
read/write
If true, the page item is non-printing.
Opacity
Double
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
OpenFileBehaviors
OpenFileBehaviors
read only
Open file behaviors collection object
OverprintFill
Boolean
read/write
If true, the fill of the page item will overprint.
OverprintGap
Boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
OverprintStroke
Boolean
read/write
If true, overprint the stroke of the page item.
Overridden
Boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
OverriddenMasterPageItem
PageItem
read only
A reference to the master page item linked to the page item (if any).
Parent
Variant
read only
he parent of the page item.
QuitBehaviors
QuitBehaviors
read only
Quit behaviors collection object
1310
Visual Basic Reference
InDesign CS Scripting Guide
Property: RightLineEnd
RotationAngle ShadowBlendMode
Type: Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Double Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Access:
Description:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
ShadowBlurRadius
Double
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
ShadowColor
Swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the Color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
ShadowMode
ShadowOpacity
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
Double
InDesign CS Scripting Guide Visual Basic Reference 1311
Property:
Type:
Access:
Description:
ShadowXOffset
Double
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
ShadowYOffset
Double
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
ShearAngle
Double
read/write
he shear angle applied to the page item.
ShowHideFieldsBehaviors
ShowHideFieldsBehaviors
read only
Show/hide fields behaviors collection object
SoundBehaviors
SoundBehaviors
read only
Sound behaviors collection object
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
StrokeAlignment
StrokeColor StrokeCornerAdjustment
Name:
Decimal:
idStrokeAlignment.idCenterAlignment
1936998723
idStrokeAlignment.idInsideAlignment
1936998729
idStrokeAlignment.idOutsideAlignment
1936998735
Variant Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
StrokeDashAndGap
Array of Doubles or Strings (dash, gap, ...>)
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
StrokeTint
Double
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
StrokeType
StrokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
StrokeWeight
Double
read/write
he weight (in points) of the stroke applied to the page item.
TextWrapPreferences
TextWrapPreference
read only
he text wrap applied to the page item.
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
ViewZoomBehaviors
ViewZoomBehaviors
read only
View Zoom behaviors collection object
read/write
visibility of the item in the output PDF
VisibilityInPdf
1312
Name:
Decimal:
idVisibilityInPdf.idVisibleInPdf
1180068211
idVisibilityInPdf.idHiddenInPdf
1181247844
idVisibilityInPdf.idVisibleButDoesNotPrintInPdf
1180061264
idVisibilityInPdf.idHiddenButPrintableInPdf
1179140688
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method: AddPath
Parameters: Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
PageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
PageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
Nothing
Exports the object to a file.
ExcludeOverlapPath
Name:
Type:
Description:
With
Objects
he objects to exclude.
Export
Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
InDesign CS Scripting Guide Visual Basic Reference 1313
Method: ExtractLabel
Fit
Parameters: Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
he objects to intersect with.
MakeCompoundPath
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Markup
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
[To]
Variant
he new location of the object.
[By]
Variant
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
MinusBack
Move
Override
1314
Visual Basic Reference
InDesign CS Scripting Guide
Description:
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
PageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
PageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound Paths>Make command.
Nothing
Markup layout content with XML preserving the existing content.
PageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
Nothing
Move Page Item to a new location. One of the ‘To’ or ‘By’ parameters is required.
PageItem
Overrides an item from the master page and places it on the page.
he fit option.
Name:
IntersectPath
Return:
Method: Place
PlaceXML
Parameters: Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
Return:
Description:
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
ReleaseCompoundPath
None
Objects
Releases a compound path and returns the released page items. Corresponds to the Object>Compound Path>Release menu option.
RemoveOverride
None
Nothing
Removes a locally overriden master page item
ResetScaling
None
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
InDesign CS Scripting Guide Visual Basic Reference 1315
Method: Resize
1316
Parameters: Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Method: Rotate
Select
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Rotate the page item.
Nothing
Select this form field.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
InDesign CS Scripting Guide Visual Basic Reference 1317
Method: Shear
Store
SubtractPath
1318
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
PageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
Method: Unlink
Parameters: Name: From
Type: Name:
Description: Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
What to unlink from.
Return:
Description:
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide Visual Basic Reference 1319
FormFields Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of FormFields
Item
FormField
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
FormField
Returns any FormField.
FirstItem
None
FormField
Returns the first FormField.
FormField
Returns the FormField with the specified ID.
FormFields
Returns the form fields within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
FormField
he form field at the start of the range.
To
FormField
he form field at the end of the range.
LastItem
None
FormField
Returns the last FormField.
MiddleItem
None
FormField
Returns the middle FormField.
FormField
Returns the next FormField.
FormField
Returns the previous FormField.
NextItem
PreviousItem
1320
Name:
Type:
Description:
Obj
FormField
he FormField before the one desired.
Name:
Type:
Description:
Obj
FormField
he FormField ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GalleyPreference Properties Property:
Type:
Access:
Description:
BackgroundColor
uiColor or Array of Doubles (r, g, b)
read/write
he background color of the Story Editor. his property corresponds to the Background pop-up menu in the Story Editor Display panel of the Preferences dialog box.
BlinkCursor
Boolean
read/write
If true, the Story Editor cursor will blink. his property corresponds to the Blink option in the Story Editor Display panel of the Preferences dialog box.
read/write
Sets the type of cursor should be used in galley and story views.
String
read/write
he font to use for displaying text in the Story Editor.
Parent
Variant
read only
he parent of the object.
SmoothText
Boolean
read/write
If true, antialias text displayed in the Story Editor. this property corresponds to the Enable Anti-Aliasing option in the Story Editor Display panel of the Preferences dialog box.
TextColor
uiColor or Array of Doubles (r, g, b)
read/write
he color of text displayed in the Story Editor. his property corresponds to the Text Color pop-up menu in the Story Editor Display panel of the Preferences dialog box.
UseOverridePreviewFont
Boolean
read/write
If true, use the font specified in the override preview font property.
CursorType
OverridePreviewFont
Name:
Decimal:
idCursorTypes.idStandardCursor
1699968100
idCursorTypes.idhickCursor
1700029291
idCursorTypes.idBarbellCursor
1698841196
idCursorTypes.idBlockCursor
1698851951
InDesign CS Scripting Guide Visual Basic Reference 1321
GeneralPreference Properties Property:
Type:
Access:
Description:
CompleteFontDownloadGlyphLimit
Long
read/write
Complete font download glyph limit
IncludePreview
Boolean
read/write
Whether to include a preview when saving the document
read/write
How to number pages
PageNumbering
Name:
Decimal:
idPageNumberingOptions.idSection
1935897710
idPageNumberingOptions.idAbsolute
1096971116
Parent
Application
read only
he parent of the object.
TemporaryFolder
String
read/write
Where temporary files should be stored
read/write
Controls the appearance of the tools palette
read/write
Controls the appearance of tool tips
ToolsPalette
ToolTips
1322
Name:
Decimal:
idToolsPaletteOptions.idSingleColumn
1163092844
idToolsPaletteOptions.idDoubleColumn
1162109804
idToolsPaletteOptions.idSingleRow
1163096695
Name:
Decimal:
idToolTipOptions.idNormal
1852797549
idToolTipOptions.idNone
1852796517
idToolTipOptions.idFast
1180791668
Visual Basic Reference
InDesign CS Scripting Guide
GotoAnchorBehavior Properties Property:
Type:
Access:
Description:
AnchorItem
Hyperlink
read/write
he anchor item
AnchorName
String
read only
he anchor name
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
FilePath
String
read/write
he file path
Id
Long
read only
he GotoAnchorBehavior’s unique id
Index
Long
read only
Index of the GotoAnchorBehavior within its parent FormField or Button
Label
String
read/write
A label that can be set to any string
Name
String
read only
he name of the GotoAnchorBehavior
Parent
Variant
read only
he GotoAnchorBehavior’s parent as FormField or Button
read/write
he zoom setting
ZoomSetting
Name:
Decimal:
idGoToZoomOptions.idInheritZoom
1212437370
idGoToZoomOptions.idFitWindow
1212437367
idGoToZoomOptions.idFitWidth
1212437335
idGoToZoomOptions.idFitVisible
1212437334
idGoToZoomOptions.idActualSize
2053206906
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1323
GotoAnchorBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GotoAnchorBehaviors
Item
GotoAnchorBehaviors
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
GotoAnchorBehavior
Create a new goto anchor behavior.
AnyItem
None
GotoAnchorBehaviors
Returns any GotoAnchorBehavior.
FirstItem
None
GotoAnchorBehaviors
Returns the first GotoAnchorBehavior.
GotoAnchorBehaviors
Returns the GotoAnchorBehavior with the specified ID.
GotoAnchorBehaviors
Returns the goto anchor behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
GotoAnchorBehaviors
he goto anchor behavior at the start of the range.
To
GotoAnchorBehaviors
he goto anchor behavior at the end of the range.
LastItem
None
GotoAnchorBehaviors
Returns the last GotoAnchorBehavior.
MiddleItem
None
GotoAnchorBehaviors
Returns the middle GotoAnchorBehavior.
GotoAnchorBehaviors
Returns the next GotoAnchorBehavior.
GotoAnchorBehaviors
Returns the previous GotoAnchorBehavior.
NextItem
PreviousItem
1324
Name:
Type:
Description:
Obj
GotoAnchorBehaviors
he GotoAnchorBehavior before the one desired.
Name:
Type:
Description:
Obj
GotoAnchorBehaviors
he GotoAnchorBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GotoFirstPageBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the GotoFirstPageBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the behavior.
Parent
Variant
read only
he parent of the object.
read/write
he zoom setting
ZoomSetting
Name:
Decimal:
idGoToZoomOptions.idInheritZoom
1212437370
idGoToZoomOptions.idFitWindow
1212437367
idGoToZoomOptions.idFitWidth
1212437335
idGoToZoomOptions.idFitVisible
1212437334
idGoToZoomOptions.idActualSize
2053206906
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1325
GotoFirstPageBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GotoFirstPageBehaviors
Item
GotoFirstPageBehavior
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
GotoFirstPageBehavior
Create a new goto first page behavior.
AnyItem
None
GotoFirstPage- Returns any GotoFirstPageBehavior Behavior.
FirstItem
None
GotoFirstPage- Returns the first GotoFirstBehavior PageBehavior.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Variant
he goto first page behavior at the start of the range.
To
Variant
he goto first page behavior at the end of the range.
GotoFirstPage- Returns the GotoFirstPageBehavior Behavior with the specified ID. GotoFirstPageBehaviors
Returns the goto first page behaviors within the specified range.
LastItem
None
GotoFirstPage- Returns the last GotoFirstPageBehavior Behavior.
MiddleItem
None
GotoFirstPage- Returns the middle GotoFirstBehavior PageBehavior.
NextItem
PreviousItem
1326
Name:
Type:
Description:
Obj
GotoFirstPageBehavior
he GotoFirstPageBehavior before the one desired.
Name:
Type:
Description:
Obj
GotoFirstPageBehavior
he GotoFirstPageBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GotoFirstPage- Returns the next GotoFirstBehavior PageBehavior.
GotoFirstPage- Returns the previous GotoBehavior FirstPageBehavior.
GotoLastPageBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the GotoLastPageBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the behavior.
Parent
Variant
read only
he parent of the object.
read/write
he zoom setting
ZoomSetting
Name:
Decimal:
idGoToZoomOptions.idInheritZoom
1212437370
idGoToZoomOptions.idFitWindow
1212437367
idGoToZoomOptions.idFitWidth
1212437335
idGoToZoomOptions.idFitVisible
1212437334
idGoToZoomOptions.idActualSize
2053206906
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1327
GotoLastPageBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GotoLastPageBehaviors
Item
GotoLastPageBehavior
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
GotoLastPageBehavior
Create a new goto last page behavior.
AnyItem
None
GotoLastPage- Returns any GotoLastPageBehavior Behavior.
FirstItem
None
GotoLastPage- Returns the first GotoLastBehavior PageBehavior.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
GotoLastPageBehavior
he goto last page behavior at the start of the range.
To
GotoLastPageBehavior
he goto last page behavior at the end of the range.
GotoLastPage- Returns the GotoLastPageBehavior Behavior with the specified ID. GotoLastPageBehaviors
Returns the goto last page behaviors within the specified range.
LastItem
None
GotoLastPage- Returns the last GotoLastPageBehavior Behavior.
MiddleItem
None
GotoLastPage- Returns the middle GotoLastBehavior PageBehavior.
NextItem
PreviousItem
1328
Name:
Type:
Description:
Obj
GotoLastPageBehavior
he GotoLastPageBehavior before the one desired.
Name:
Type:
Description:
Obj
GotoLastPageBehavior
he GotoLastPageBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GotoLastPage- Returns the next GotoLastBehavior PageBehavior.
GotoLastPage- Returns the previous GotoLastBehavior PageBehavior.
GotoNextPageBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the GotoNextPageBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the behavior.
Parent
Variant
read only
he parent of the object.
read/write
he zoom setting
ZoomSetting
Name:
Decimal:
idGoToZoomOptions.idInheritZoom
1212437370
idGoToZoomOptions.idFitWindow
1212437367
idGoToZoomOptions.idFitWidth
1212437335
idGoToZoomOptions.idFitVisible
1212437334
idGoToZoomOptions.idActualSize
2053206906
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1329
GotoNextPageBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GotoNextPageBehaviors
Item
GotoNextPageBehavior
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
GotoNextPageBehavior
Create a new goto next page behavior.
AnyItem
None
GotoNextPageBehavior
Returns any GotoNextPageBehavior.
FirstItem
None
GotoNextPageBehavior
Returns the first GotoNextPageBehavior.
GotoNextPageBehavior
Returns the GotoNextPageBehavior with the specified ID.
GotoNextPageBehaviors
Returns the goto next page behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Variant
he goto next page behavior at the start of the range.
To
Variant
he goto next page behavior at the end of the range.
LastItem
None
GotoNextPageBehavior
Returns the last GotoNextPageBehavior.
MiddleItem
None
GotoNextPageBehavior
Returns the middle GotoNextPageBehavior.
GotoNextPageBehavior
Returns the next GotoNextPageBehavior.
GotoNextPageBehavior
Returns the previous GotoNextPageBehavior.
NextItem
PreviousItem
1330
Name:
Type:
Description:
Obj
GotoNextPageBehavior
he GotoNextPageBehavior before the one desired.
Name:
Type:
Description:
Obj
GotoNextPageBehavior
he GotoNextPageBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GotoNextViewBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the GotoNextViewBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the behavior.
Parent
Variant
read only
he parent of the object.
read/write
he zoom setting
ZoomSetting
Name:
Decimal:
idGoToZoomOptions.idInheritZoom
1212437370
idGoToZoomOptions.idFitWindow
1212437367
idGoToZoomOptions.idFitWidth
1212437335
idGoToZoomOptions.idFitVisible
1212437334
idGoToZoomOptions.idActualSize
2053206906
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1331
GotoNextViewBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GotoNextViewBehaviors
Item
GotoNextViewBehavior
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
GotoNextViewBehavior
Create a new goto next view behavior.
AnyItem
None
GotoNextViewBehavior
Returns any GotoNextViewBehavior.
FirstItem
None
GotoNextViewBehavior
Returns the first GotoNextViewBehavior.
GotoNextViewBehavior
Returns the GotoNextViewBehavior with the specified ID.
GotoNextViewBehaviors
Returns the goto next view behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
GotoNextViewBehavior
he goto next view behavior at the start of the range.
To
GotoNextViewBehavior
he goto next view behavior at the end of the range.
LastItem
None
GotoNextViewBehavior
Returns the last GotoNextViewBehavior.
MiddleItem
None
GotoNextViewBehavior
Returns the middle GotoNextViewBehavior.
GotoNextViewBehavior
Returns the next GotoNextViewBehavior.
GotoNextViewBehavior
Returns the previous GotoNextViewBehavior.
NextItem
PreviousItem
1332
Name:
Type:
Description:
Obj
GotoNextViewBehavior
he GotoNextViewBehavior before the one desired.
Name:
Type:
Description:
Obj
GotoNextViewBehavior
he GotoNextViewBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GotoPreviousPageBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the GotoPreviousPageBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the behavior.
Parent
Variant
read only
he parent of the object.
read/write
he zoom setting
ZoomSetting
Name:
Decimal:
idGoToZoomOptions.idInheritZoom
1212437370
idGoToZoomOptions.idFitWindow
1212437367
idGoToZoomOptions.idFitWidth
1212437335
idGoToZoomOptions.idFitVisible
1212437334
idGoToZoomOptions.idActualSize
2053206906
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1333
GotoPreviousPageBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GotoPreviousPageBehaviors
Item
GotoPreviousPageBehavior
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
GotoPreviousPageBehavior
Create a new goto previous page behavior.
AnyItem
None
GotoPrevious- Returns any GotoPreviousPageBehavior PageBehavior.
FirstItem
None
GotoPrevious- Returns the first GotoPreviousPageBehavior PageBehavior.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
GotoPreviousPageBehavior
he goto previous page behavior at the start of the range.
To
GotoPreviousPageBehavior
he goto previous page behavior at the end of the range.
GotoPrevious- Returns the GotoPreviousPagePageBehavior Behavior with the specified ID. GotoPreviousPageBehavior
Returns the goto previous page behaviors within the specified range.
LastItem
None
GotoPrevious- Returns the last GotoPreviousPageBehavior PageBehavior.
MiddleItem
None
GotoPrevious- Returns the middle GotoPageBehavior PreviousPageBehavior.
NextItem
PreviousItem
1334
Name:
Type:
Description:
Obj
GotoPreviousPageBehavior
he GotoPreviousPageBehavior before the one desired.
Name:
Type:
Description:
Obj
GotoPreviousPageBehavior
he GotoPreviousPageBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GotoPrevious- Returns the next GotoPageBehavior PreviousPageBehavior.
GotoPrevious- Returns the previous GotoPageBehavior PreviousPageBehavior.
GotoPreviousViewBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the GotoPreviousViewBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the behavior.
Parent
Variant
read only
he parent of the object.
read/write
he zoom setting
ZoomSetting
Name:
Decimal:
idGoToZoomOptions.idInheritZoom
1212437370
idGoToZoomOptions.idFitWindow
1212437367
idGoToZoomOptions.idFitWidth
1212437335
idGoToZoomOptions.idFitVisible
1212437334
idGoToZoomOptions.idActualSize
2053206906
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1335
GotoPreviousViewBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GotoPreviousViewBehaviors
Item
GotoPreviousViewBehavior
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Add
None
GotoPrevious- Create a new goto previous ViewBehavior view behavior.
AnyItem
None
GotoPrevious- Returns any GotoPreviousViewBehavior ViewBehavior.
FirstItem
None
GotoPrevious- Returns the first GotoPreviousViewBehavior ViewBehavior.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
GotoPreviousViewBehavior
he goto previous view behavior at the start of the range.
To
GotoPreviousViewBehavior
he goto previous view behavior at the end of the range.
Description:
GotoPrevious- Returns the GotoPreviousViewBehavior ViewBehavior with the specified ID. GotoPrevious- Returns the goto previous view Viewbehaviors within the specified Behaviors range.
LastItem
None
GotoPrevious- Returns the last GotoPreviousViewBehavior ViewBehavior.
MiddleItem
None
GotoPrevious- Returns the middle GotoViewBehavior PreviousViewBehavior.
NextItem
PreviousItem
1336
Name:
Type:
Description:
Obj
GotoPreviousViewBehavior
he GotoPreviousViewBehavior before the one desired.
Name:
Type:
Description:
Obj
GotoPreviousViewBehavior
he GotoPreviousViewBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GotoPrevious- Returns the next GotoViewBehavior PreviousViewBehavior.
GotoPrevious- Returns the previous GotoViewBehavior PreviousViewBehavior.
GotoURLBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
he GotoURLBehavior’s unique id
Index
Long
read only
Index of the GotoURLBehavior within its parent FormField or Button
Label
String
read/write
A label that can be set to any string
Name
String
read only
he name of the GotoURLBehavior
Parent
Variant
read only
he GotoURLBehavior’s parent as FormField or Button
URL
String
read/write
he URL
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1337
GotoURLBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GotoURLBehaviors
Item
GotoURLBehavior
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
GotoURLBehavior
Create a new goto URL behavior.
AnyItem
None
GotoURLBehavior
Returns any GotoURLBehavior.
FirstItem
None
GotoURLBehavior
Returns the first GotoURLBehavior.
GotoURLBehavior
Returns the GotoURLBehavior with the specified ID.
GotoURLBehavior
Returns the goto url behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
GotoURLBehavior
he goto URL behavior at the start of the range.
To
GotoURLBehavior
he goto URL behavior at the end of the range.
LastItem
None
GotoURLBehavior
Returns the last GotoURLBehavior.
MiddleItem
None
Goto^URLBehaior
Returns the middle GotoURLBehavior.
GotoURLBehavior
Returns the next GotoURLBehavior.
GotoURLBehavior
Returns the previous GotoURLBehavior.
NextItem
PreviousItem
1338
Name:
Type:
Description:
Obj
GotoURLBehavior
he GotoURLBehavior before the one desired.
Name:
Type:
Description:
Obj
GotoURLBehavior
he GotoURLBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Gradient Properties Property:
Type:
Access:
Description:
GradientStops
GradientStops
read only
Every gradient stop
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Gradient within its parent Application or Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the gradient swatch.
Parent
Variant
read only
he parent of the object.
read/write
he type of the gradient.
Type
Name:
Decimal:
idGradientType.idLinear
1635282023
idGradientType.idRadial
1918985319
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Merge one or more other swatches into this one.
ExtractLabel
InsertLabel
Merge
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Variant
he swatches to merge.
InDesign CS Scripting Guide Visual Basic Reference 1339
Gradients Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Gradients
Item
Gradient
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
Gradient
Create a new gradient.
AnyItem
None
Gradient
Returns any Gradient.
FirstItem
None
Gradient
Returns the first Gradient.
Gradient
Returns the Gradient with the specified ID.
Gradients
Returns the gradients within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Gradient
he gradient at the start of the range.
To
Gradient
he gradient at the end of the range.
LastItem
None
Gradient
Returns the last Gradient.
MiddleItem
None
Gradient
Returns the middle Gradient.
Gradient
Returns the next Gradient.
Gradient
Returns the previous Gradient.
NextItem
PreviousItem
1340
Name:
Type:
Description:
Obj
Gradient
he Gradient before the one desired.
Name:
Type:
Description:
Obj
Gradient
he Gradient ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GradientStop Properties Property:
Type:
Access:
Description:
Index
Long
read only
Index of the GradientStop within its parent Gradient
Location
Double
read/write
he location of the gradient stop, as a percentage of the length of the gradient ramp.
Midpoint
Double
read/write
he mid-point of the gradient stop, as a percentage of the distance from the gradient stop to the next gradient stop.
Parent
Gradient
read only
he parent of the object.
StopColor
Color
read/write
he color of the gradient stop.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
InDesign CS Scripting Guide Visual Basic Reference 1341
GradientStops Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GradientStops
Item
GradientStop
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
GradientStop
Create a new gradient stop.
AnyItem
None
GradientStop
Returns any GradientStop.
FirstItem
None
GradientStop
Returns the first GradientStop.
GradientStops
Returns the gradient stops within the specified range.
ItemByRange
Name:
Type:
Description:
From
GradientStop
he gradient stop at the start of the range.
To
GradientStop
he gradient stop at the end of the range.
LastItem
None
GradientStop
Returns the last GradientStop.
MiddleItem
None
GradientStop
Returns the middle GradientStop.
GradientStop
Returns the next GradientStop.
GradientStop
Returns the previous GradientStop.
NextItem
PreviousItem
1342
Name:
Type:
Description:
Obj
GradientStop
he GradientStop before the one desired.
Name:
Type:
Description:
Obj
GradientStop
he GradientStop ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Graphic Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scale of the page item relative to its containing page item
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item
AbsoluteVerticalScale
Double
read/write
he vertical scale of the page item relative to its containing page item
GeometricBounds
Array of Doubles or Strings (y1, x1, y2, x2)
read/write
he bounds of the page item excluding the stroke width, in the format.
HorizontalScale
Double
read/write
he scale percentage in the horizontal direction
Id
Long
read only
he Graphic’s unique id
ImageTypeName
String
read only
he type of image
Index
Long
read only
Index of the Graphic within its parent PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
ItemLink
Link
read only
Link to a placed file
Label
String
read/write
A label that can be set to any string
read/write
he display settings for this page item
LocalDisplaySetting
Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Parent
Variant
read only
he Graphic’s parent as PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
RotationAngle
Double
read/write
Angle of rotation
ShearAngle
Double
read/write
he shear angle of the page item relative to the spread
VerticalScale
Double
read/write
he scale percentage in the vertical direction
VisibleBounds
Array of Doubles or Strings (y1, x1, y2, x2)
read/write
he bounds of the page item including the stroke width.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
InDesign CS Scripting Guide Visual Basic Reference 1343
Method: Export
ExtractLabel
InsertLabel
Move
1344
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
Method: Place
Parameters: Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Return:
Description:
Object
Place a file.
InDesign CS Scripting Guide Visual Basic Reference 1345
Method: Resize
1346
Parameters: Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Method: Rotate
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Return:
Description:
Nothing
Rotate the page item.
InDesign CS Scripting Guide Visual Basic Reference 1347
Method: Shear
Unlink
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
From
1348
Name:
Visual Basic Reference
Name:
Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
Nothing
Shear the page item.
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
GraphicLine Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item.
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item.
AbsoluteVerticalScale
Double
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he type of content
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
BlendMode
ContentType
CornerEffect
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Name:
Decimal:
idContentType.idUnassigned
1970168179
idContentType.idGraphicType
1735553140
idContentType.idTextType
1952412773
Name:
Decimal:
idCornerEffects.idNone
1852796517
idCornerEffects.idRoundedCorner
1667592804
idCornerEffects.idInverseRoundedCorner
1667591798
idCornerEffects.idInsetCorner
1667591795
idCornerEffects.idBevelCorner
1667588726
idCornerEffects.idFancyCorner
1667589742
InDesign CS Scripting Guide Visual Basic Reference 1349
Property:
Type:
Access:
Description:
CornerRadius
Double
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
EndCap
EndJoin
EPSs
Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
EPSs
FeatherCornerType
FeatherMode
Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
FeatherWidth
Double
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
FillTint
Double
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
GapColor
Swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
GapTint
Double
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
GeometricBounds
Array of Doubles or Strings (y1, x1, y2, x2)
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
GradientFillAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientFillLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
GradientFillStart
Array of Doubles or Strings (x, y)
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
1350
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
GradientStrokeAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientStrokeLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
GradientStrokeStart
Array of Doubles or Strings (x, y)
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GraphicLines
GraphicLines
read only
All graphic lines
Graphics
Graphics
read only
All graphics
Groups
Groups
read only
Groups
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Images
Images
read only
Images
Index
Long
read only
Index of the GraphicLine within its parent Spread, MasterSpread, PageItem, Oval, Rectangle, Polygon, GraphicLine, Group, State, Document, Layer, Page, Button, TextFrame, Story, Text, Character, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table or InsertionPoint
IsolateBlending
Boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
ItemLayer
Layer
read/write
he layer containing the page item.
KnockoutGroup
Boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout Group option in the Transparency palette.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
LetLineEnd
Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
InDesign CS Scripting Guide Visual Basic Reference 1351
Property: LocalDisplaySetting
Type: Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Access:
Description:
read/write
he display setting for this page item.
Locked
Boolean
read/write
If true, the page item is locked.
MiterLimit
Double
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
Nonprinting
Boolean
read/write
If true, the page item is non-printing.
Opacity
Double
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the page item will overprint.
OverprintGap
Boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
OverprintStroke
Boolean
read/write
If true, overprint the stroke of the page item.
Overridden
Boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
OverriddenMasterPageItem
PageItem
read only
A reference to the master page item linked to the page item (if any).
PageItems
PageItems
read only
All page items
Parent
Variant
read only
he parent of the page item.
Paths
Paths
read only
All paths
PDFs
PDFs
read only
PDFs
PICTs
PICTs
read only
PICTs
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
read/write
he rotation angle of the page item.
RightLineEnd
RotationAngle
1352
Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Double
Visual Basic Reference
InDesign CS Scripting Guide
Property: ShadowBlendMode
Type: Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Access:
Description:
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
ShadowBlurRadius
Double
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
ShadowColor
Swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the Color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
ShadowMode
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
ShadowOpacity
Double
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
ShadowXOffset
Double
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
ShadowYOffset
Double
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
ShearAngle
Double
read/write
he shear angle applied to the page item.
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
StrokeAlignment
Name:
Decimal:
idStrokeAlignment.idCenterAlignment
1936998723
idStrokeAlignment.idInsideAlignment
1936998729
idStrokeAlignment.idOutsideAlignment
1936998735
InDesign CS Scripting Guide Visual Basic Reference 1353
Property:
Type:
Access:
Description:
StrokeColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
StrokeCornerAdjustment
Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
StrokeDashAndGap
Array of Doubles (dash, gap, ...)
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
StrokeTint
Double
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
StrokeType
StrokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
StrokeWeight
Double
read/write
he weight (in points) of the stroke applied to the page item.
TextFrames
TextFrames
read only
Text Frames
TextPaths
TextPaths
read only
All text paths
TextWrapPreferences
TextWrapPreference
read only
he text wrap applied to the page item.
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
VisibleBounds
Array of Doubles or Strings (y1, x1, y2, x2)
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
WMFs
WMFs
read only
WMFs
Methods Method: AddPath
Parameters: Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
PageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
PageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
ExcludeOverlapPath
1354
Name:
Type:
Description:
With
Objects
he objects to exclude.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Export
ExtractLabel
Fit
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
IntersectPath
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
Name:
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
Return:
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
PageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
he fit option.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
he objects to intersect with.
InDesign CS Scripting Guide Visual Basic Reference 1355
Method:
Parameters:
MakeCompoundPath
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Markup
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
MinusBack
Move
Override
Place
PlaceXML
Return:
Description:
PageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound Paths>Make command.
Nothing
Markup layout content with XML preserving the existing content.
PageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
PageItem
Overrides an item from the master page and places it on the page.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
ReleaseCompoundPath
None
Objects
Releases a compound path and returns the released page items. Corresponds to the Object>Compound Path>Release menu option.
RemoveOverride
None
Nothing
Removes a locally overriden master page item
1356
Visual Basic Reference
InDesign CS Scripting Guide
Method:
Parameters:
Return:
Description:
ResetScaling
None
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Resize
Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
InDesign CS Scripting Guide Visual Basic Reference 1357
Method: Rotate
Select
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Rotate the page item.
Nothing
Select this graphic line.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
1358
Visual Basic Reference
InDesign CS Scripting Guide
Method: Shear
Store
SubtractPath
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
PageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
InDesign CS Scripting Guide Visual Basic Reference 1359
Method: Unlink
Parameters: Name: From
1360
Visual Basic Reference
Type: Name:
Description: Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
GraphicLines Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of GraphicLines
Item
GraphicLine
read only
Returns the GraphicLine with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Layer]
Variant
he layer on which to create the GraphicLine as Layer.
[At]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
PageItem, Document, Spread, Master Spread, Page, or Layer
Return:
Description:
GraphicLine
Create a new graphic line.
Location.
Before/ater this object.
AnyItem
None
GraphicLine
Returns any GraphicLine.
FirstItem
None
GraphicLine
Returns the first GraphicLine.
GraphicLine
Returns the GraphicLine with the specified ID.
GraphicLines
Returns the graphic lines within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
GraphicLine
he graphic line at the start of the range.
To
GraphicLine
he graphic line at the end of the range.
LastItem
None
GraphicLine
Returns the last GraphicLine.
MiddleItem
None
GraphicLine
Returns the middle GraphicLine.
GraphicLine
Returns the next GraphicLine.
GraphicLine
Returns the previous GraphicLine.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
GraphicLine
he GraphicLine before the one desired.
Name:
Type:
Description:
Obj
GraphicLine
he GraphicLine after the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1361
Graphics Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Graphics
Item
Graphic
read only
Returns the Graphic with the specified index (as Long) or label (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Graphic
Returns any Graphic.
FirstItem
None
Graphic
Returns the first Graphic.
Graphic
Returns the Graphic with the specified ID.
Graphics
Returns the graphics within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Graphic
he graphic at the start of the range.
To
Graphic
he graphic at the end of the range.
LastItem
None
Graphic
Returns the last Graphic.
MiddleItem
None
Graphic
Returns the middle Graphic.
Graphic
Returns the next Graphic.
Graphic
Returns the previous Graphic.
NextItem
PreviousItem
1362
Name:
Type:
Description:
Obj
Graphic
he Graphic before the one desired.
Name:
Type:
Description:
Obj
Graphic
he Graphic ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
GridPreference Properties Property:
Type:
Access:
Description:
BaselineColor
idUIColor or Array of Doubles (r, g, b)
read/write
he color of the baseline grid.
BaselineDivision
Double
read/write
he distance between baseline grid lines.
BaselineGridShown
Boolean
read/write
If true, display the baseline grid.
BaselineStart
Double
read/write
he distance from the top of the page to the first increment of the baseline grid.
BaselineViewhreshold
Double
read/write
Sets the threshold (as a magnification percentage) at which the baseline grid will appear. If this property is set to 75%, the baseline grid will appear at all magnifications greater than or equal to 75% (100%, 200%, etc.), but will not be visible at magnifications less than 75%.
DocumentGridShown
Boolean
read/write
If true, display the document grid.
DocumentGridSnapto
Boolean
read/write
If true, object edges snap to the nearest document grid intersection when drawing, moving or resizing objects on a page.
GridColor
idUIColor or Array of Doubles (r, g, b)
read/write
he color of the document grid.
GridsInBack
Boolean
read/write
If true, to display grids behind all other objects.
HorizontalGridlineDivision
Double
read/write
A spacing value between major horizontal document grid lines.
HorizontalGridSubdivision
Long
read/write
he number of evenly spaced minor horizontal document grid lines between major horizontal document grid lines.
Parent
Variant
read only
he parent of the object.
VerticalGridlineDivision
Double
read/write
he distance between major vertical document grid lines.
VerticalGridSubdivision
Long
read/write
he number of evenly spaced minor vertical document grid lines between major vertical document grid lines.
InDesign CS Scripting Guide Visual Basic Reference 1363
Group Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item.
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item.
AbsoluteVerticalScale
Double
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read only
Every button
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
BlendMode
Buttons
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Buttons
CornerEffect
CornerRadius
1364
Name:
Name:
Decimal:
idCornerEffects.idNone
1852796517
idCornerEffects.idRoundedCorner
1667592804
idCornerEffects.idInverseRoundedCorner
1667591798
idCornerEffects.idInsetCorner
1667591795
idCornerEffects.idBevelCorner
1667588726
idCornerEffects.idFancyCorner
1667589742
Double
Visual Basic Reference
InDesign CS Scripting Guide
Property: EndCap
EndJoin
EPSs FeatherCornerType
FeatherMode
Type: Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
EPSs Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
Access:
Description:
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
FeatherWidth
Double
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
FillColor
Swatch or String
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
FillTint
Double
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
FormFields
FormFields
read only
Every form field item
GapColor
Swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
GapTint
Double
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
GeometricBounds
Array of Doubles or Strings (y1, x1, y2, x2)
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
GradientFillAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientFillLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
GradientFillStart
Array of Doubles or Strings (x, y)
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GradientStrokeAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
InDesign CS Scripting Guide Visual Basic Reference 1365
Property:
Type:
Access:
Description:
GradientStrokeLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
GradientStrokeStart
Array of Doubles or Strings (x, y)
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GraphicLines
GraphicLines
read only
All graphic lines
Graphics
Graphics
read only
All graphics
Groups
Groups
read only
Groups
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Images
Images
read only
Images
Index
Long
read only
Index of the Group within its parent Spread, MasterSpread, PageItem, Oval, Rectangle, Polygon, GraphicLine, Group, State, Document, Layer, Page, Button, TextFrame, Story, Text, Character, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table or InsertionPoint
IsolateBlending
Boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
ItemLayer
Layer
read/write
he layer containing the page item.
KnockoutGroup
Boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout Group option in the Transparency palette.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
LetLineEnd
1366
Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Visual Basic Reference
InDesign CS Scripting Guide
Property: LocalDisplaySetting
Type: Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Access:
Description:
read/write
he display setting for this page item.
Locked
Boolean
read/write
If true, the page item is locked.
MiterLimit
Double
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
Nonprinting
Boolean
read/write
If true, the page item is non-printing.
Opacity
Double
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the page item will overprint.
OverprintGap
Boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
OverprintStroke
Boolean
read/write
If true, overprint the stroke of the page item.
Overridden
Boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
OverriddenMasterPageItem
PageItem
read only
A reference to the master page item linked to the page item (if any).
PageItems
PageItems
read only
All page items
Parent
Variant
read only
he parent of the page item.
PDFs
PDFs
read only
PDFs
PICTs
PICTs
read only
PICTs
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
read/write
he rotation angle of the page item.
RightLineEnd
RotationAngle
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Double
InDesign CS Scripting Guide Visual Basic Reference 1367
Property: ShadowBlendMode
Type: Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Access:
Description:
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
ShadowBlurRadius
Double
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
ShadowColor
Swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the Color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
ShadowMode
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
ShadowOpacity
Double
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
ShadowXOffset
Double
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
ShadowYOffset
Double
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
ShearAngle
Double
read/write
he shear angle applied to the page item.
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
StrokeAlignment
1368
Name:
Decimal:
idStrokeAlignment.idCenterAlignment
1936998723
idStrokeAlignment.idInsideAlignment
1936998729
idStrokeAlignment.idOutsideAlignment
1936998735
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
StrokeColor
Swatch or String
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
StrokeCornerAdjustment
Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
StrokeDashAndGap
Array of Doubles (dash, gap, ...)
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
StrokeTint
Double
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
StrokeType
StrokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
StrokeWeight
Double
read/write
he weight (in points) of the stroke applied to the page item.
TextFrames
TextFrames
read only
Text Frames
TextWrapPreferences
TextWrapPreference
read only
he text wrap applied to the page item.
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
VisibleBounds
Array of Doubles or Strings (y1, x1, y2, x2)
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
WMFs
WMFs
read only
WMFs
Methods Method: AddPath
Parameters: Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
PageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
PageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
ExcludeOverlapPath
Name:
Type:
Description:
With
Objects
he objects to exclude.
InDesign CS Scripting Guide Visual Basic Reference 1369
Method: Export
ExtractLabel
Fit
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
IntersectPath
1370
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
Name:
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
he objects to intersect with.
InDesign CS Scripting Guide
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
PageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
he fit option.
Name:
Visual Basic Reference
Return:
Method:
Parameters:
MakeCompoundPath
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Markup
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
MinusBack
Move
Override
Place
PlaceXML
Return:
Description:
PageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound Paths>Make command.
Nothing
Markup layout content with XML preserving the existing content.
PageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
PageItem
Overrides an item from the master page and places it on the page.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
ReleaseCompoundPath
None
Objects
Releases a compound path and returns the released page items. Corresponds to the Object>Compound Path>Release menu option.
RemoveOverride
None
Nothing
Removes a locally overriden master page item
InDesign CS Scripting Guide Visual Basic Reference 1371
Method:
Parameters:
Return:
Description:
ResetScaling
None
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Resize
1372
Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Rotate
Select
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Rotate the page item.
Nothing
Select this group.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
InDesign CS Scripting Guide Visual Basic Reference 1373
Method: Shear
Store
SubtractPath
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
PageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
TransformGroupContents
None
Nothing
Move a group’s transform to its children
Ungroup
None
Nothing
Ungroups a grouped page item
1374
Visual Basic Reference
InDesign CS Scripting Guide
Method: Unlink
Parameters: Name: From
Type: Name:
Description: Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
What to unlink from.
Return:
Description:
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide Visual Basic Reference 1375
Groups Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Groups
Item
Group
read only
Returns the group with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
GroupItems
Array of Objects
A list of page items to group.
[Layer]
Variant
he layer on which to create the Group as Layer.
[At]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Document, Spread, Master Spread, Page, or Layer
Return:
Description:
Group
Create a new group.
Location.
Before/ater or at the beginning/end of this object.
AnyItem
None
Group
Returns any Group.
FirstItem
None
Group
Returns the first Group.
Group
Returns the Group with the specified ID.
Groups
Returns the groups within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Group
he group at the start of the range.
To
Group
he group at the end of the range.
LastItem
None
Group
Returns the last Group.
MiddleItem
None
Group
Returns the middle Group.
Group
Returns the next Group.
Group
Returns the previous Group.
NextItem
PreviousItem
1376
Name:
Type:
Description:
Obj
Object
he Group before the one desired.
Name:
Type:
Description:
Obj
Object
he Group ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Guide Properties Property:
Type:
Access:
Description:
FitToPage
Boolean
read/write
If true, the guide is limited to the page, if false, the guide extends across the spread.
GuideColor
idUIColor or Array of Doubles (r, g, b)
read/write
he color of the guide.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Guide within its parent Spread, MasterSpread, Document, Layer or Page
ItemLayer
Layer
read/write
he layer containing the guide.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Location
Variant
read/write
he location of the guide, in current page coordinates.
Locked
Boolean
read/write
If true, the guide is locked.
Name:
Decimal:
read/write
he orientation of the guide.
idHorizontalOrVertical.idHorizontal
1752134266
idHorizontalOrVertical.idVertical
1986359924
Orientation
Parent
Variant
read only
he parent of the object.
Viewhreshold
Double
read/write
Sets the threshold (as a magnification percentage) at which the guide will appear. If this property is set to 75%, the guide will appear at all magnifications greater than or equal to 75% (100%, 200%, etc.), but will not be visible at magnifications less than 75%.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
PageItem
Overrides an item from the master page and places it on the page.
Nothing
Removes a locally overriden master page item
ExtractLabel
InsertLabel
Override
RemoveOverride
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
None
InDesign CS Scripting Guide Visual Basic Reference 1377
Method: Select
Parameters: Name:
Type:
[ExistingSelection]
1378
Visual Basic Reference
Description:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
Return:
Description:
Nothing
Select this guide.
GuidePreference Properties Property:
Type:
Access:
Description:
GuidesInBack
Boolean
read/write
If true, display guides behind all other objects.
GuidesLocked
Boolean
read/write
If true, guides are locked.
GuidesShown
Boolean
read/write
If true, all types of guides are displayed.
GuidesSnapto
Boolean
read/write
If true, object edges snap to the nearest guide when drawing, moving or resizing an object.
Parent
Variant
read only
he parent of the object.
RulerGuidesColor
idUIColor or Array of Doubles (r, g, b)
read/write
he color of ruler guides.
RulerGuidesViewhreshold
Double
read/write
Sets the default threshold (as a magnification percentage) at which the guides will appear. If this property is set to 75%, the guides will appear at all magnifications greater than or equal to 75% (100%, 200%, etc.), but will not be visible at magnifications less than 75%. his property can be changed for individual guides.
InDesign CS Scripting Guide Visual Basic Reference 1379
Guides Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Guides
Item
Guide
read only
Returns the Guide with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Layer]
Layer or layer name as String
he layer on which to create the Guide
Return:
Description:
Guide
Create a new guide.
AnyItem
None
Guide
Returns any Guide.
FirstItem
None
Guide
Returns the first Guide.
Guide
Returns the Guide with the specified ID.
Guides
Returns the guides within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Guide
he guide at the start of the range.
To
Guide
he guide at the end of the range.
LastItem
None
Guide
Returns the last Guide.
MiddleItem
None
Guide
Returns the middle Guide.
Guide
Returns the next Guide.
Guide
Returns the previous Guide.
NextItem
PreviousItem
1380
Name:
Type:
Description:
Obj
Guide
he Guide before the one desired.
Name:
Type:
Description:
Obj
Guide
he Guide ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Hyperlink Properties Property:
Type:
Access:
Description:
BorderColor
idUIColor or Array of Doubles (r, g, b)
read/write
he border color of the hyperlink.
read/write
he border style of the hyperlink.
BorderStyle
Name:
Decimal:
idHyperlinkAppearanceStyle.idSolid
1936682084
idHyperlinkAppearanceStyle.idDashed
1684108136
Destination
Variant
read/write
he destination of the hyperlink.
Hidden
Boolean
read only
If true, the hyperlink will be hidden in the exported version of the document.
read/write
he appearance of the hyperlink’s highlight.
Highlight
Name:
Decimal:
idHyperlinkAppearanceHighlight.idNone
1852796517
idHyperlinkAppearanceHighlight.idInvert
1853256308
idHyperlinkAppearanceHighlight.idOutline
1869900910
idHyperlinkAppearanceHighlight.idInset
1853056372
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Hyperlink within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the hyperlink.
Parent
Document
read only
he parent of the page item.
Source
Variant
read/write
he source of this hyperlink.
Visible
Boolean
read/write
If true, the hyperlink is visible.
Width
Name:
Decimal:
read/write
he border width of the hyperlink.
idHyperlinkAppearanceWidth.idhin
1952999790
idHyperlinkAppearanceWidth.idMedium
1701727588
idHyperlinkAppearanceWidth.idhick
1952999787
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
ShowDestination
None
Nothing
Go to Hyperlink destination
ShowSource
None
Nothing
Go to Hyperlink source
InDesign CS Scripting Guide Visual Basic Reference 1381
HyperlinkExternalPageDestination Properties Property:
Type:
Access:
Description:
DestinationPageIndex
Long
read/write
he index of the page this destination points to.
DocumentPath
String
read/write
he path to the document this destination points to.
Hidden
Boolean
read only
If true, the hyperlink external page destination will be hidden in the exported version of the document.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the HyperlinkExternalPageDestination within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read only
he name of the hyperlink external page destination.
Parent
Document
read only
he parent of the object.
ViewBounds
Array of Doubles (y1, x1, y2, x2)
read/write
he view rectangle (ignored unless view setting is fixed) of the hyperlink external page destination.
ViewPercentage
Double
read/write
he zoom percentage (ignored unless view setting is fixed).
read/write
he view setting for the target page.
ViewSetting
Name:
Decimal:
idHyperlinkDestinationPageSetting.idFixed
1212437350
idHyperlinkDestinationPageSetting.idFitView
1212437366
idHyperlinkDestinationPageSetting.idFitWindow
1212437367
idHyperlinkDestinationPageSetting.idFitWidth
1212437335
idHyperlinkDestinationPageSetting.idFitHeight
1212437352
idHyperlinkDestinationPageSetting.idFitVisible
1212437334
idHyperlinkDestinationPageSetting.idInheritZoom
1212437370
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Go to Hyperlink destination
ExtractLabel
InsertLabel
ShowDestination
1382
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
None
Visual Basic Reference
InDesign CS Scripting Guide
HyperlinkExternalPageDestinations Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of HyperlinkExternalPageDestinations
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Destination]
Variant
he destination page as Page.
Return:
Description:
HyperlinkExternalPageDestination
Create a new hyperlink external page destination.
AnyItem
None
Object
Returns any HyperlinkExternalPageDestination.
FirstItem
None
Object
Returns the first HyperlinkExternalPageDestination.
Object
Returns the HyperlinkExternalPageDestination with the specified ID.
HyperlinkExternalPageDestination
Returns the hyperlink external page destinations within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
Name:
Type:
Description:
From
Variant
he hyperlink external page destination at the start of the range, or the index of the hyperlink external page destination at the start of the range.
To
Variant
he hyperlink external page destination at the end of the range, or the index of the hyperlink external page destination at the end of the range.
LastItem
None
Object
Returns the last HyperlinkExternalPageDestination.
MiddleItem
None
Object
Returns the middle HyperlinkExternalPageDestination.
Object
Returns the next HyperlinkExternalPageDestination.
Object
Returns the previous HyperlinkExternalPageDestination.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he HyperlinkExternalPageDestination before the one desired.
Name:
Type:
Description:
Obj
Object
he HyperlinkExternalPageDestination ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1383
HyperlinkPageDestination Properties Property:
Type:
Access:
Description:
DestinationPage
Page
read/write
he page this destination points to.
Hidden
Boolean
read only
If true, the hyperlink page destination will be hidden in the exported version of the document.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the HyperlinkPageDestination within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the hyperlink page destination.
NameManually
Boolean
read/write
If true, use a user supplied name for the destination.
Parent
Document
read only
he parent of the object.
ViewBounds
Variant
read/write
he view rectangle (ignored unless view setting is fixed) of the hyperlink page destination.
ViewPercentage
Double
read/write
he zoom percentage (ignored unless view setting is fixed).
read/write
he view setting for the target page.
ViewSetting
Name:
Decimal:
idHyperlinkDestinationPageSetting.idFixed
1212437350
idHyperlinkDestinationPageSetting.idFitView
1212437366
idHyperlinkDestinationPageSetting.idFitWindow
1212437367
idHyperlinkDestinationPageSetting.idFitWidth
1212437335
idHyperlinkDestinationPageSetting.idFitHeight
1212437352
idHyperlinkDestinationPageSetting.idFitVisible
1212437334
idHyperlinkDestinationPageSetting.idInheritZoom
1212437370
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Go to Hyperlink destination
ExtractLabel
InsertLabel
ShowDestination
1384
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
None
Visual Basic Reference
InDesign CS Scripting Guide
HyperlinkPageDestinations Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of HyperlinkPageDestinations
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Destination]
Variant
he destination page as Page.
Return:
Description:
HyperlinkPageDestination
Create a new hyperlink page destination.
AnyItem
None
Object
Returns any HyperlinkPageDestination.
FirstItem
None
Object
Returns the first HyperlinkPageDestination.
Object
Returns the HyperlinkPageDestination with the specified ID.
HyperlinkPageDestination
Returns the hyperlink page destinations within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
Name:
Type:
Description:
From
Variant
he hyperlink page destination at the start of the range, or the index of the hyperlink page destination at the start of the range.
To
Variant
he hyperlink page destination at the end of the range, or the index of the hyperlink page destination at the end of the range.
LastItem
None
Object
Returns the last HyperlinkPageDestination.
MiddleItem
None
Object
Returns the middle HyperlinkPageDestination.
Object
Returns the next HyperlinkPageDestination.
Object
Returns the previous HyperlinkPageDestination.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he HyperlinkPageDestination before the one desired.
Name:
Type:
Description:
Obj
Object
he HyperlinkPageDestination ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1385
HyperlinkPageItemSource Properties Property:
Type:
Access:
Description:
Hidden
Boolean
read only
If true, the hyperlink page item source will be hidden in the exported version of the document.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the HyperlinkPageItemSource within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the hyperlink page item source.
Parent
Document
read only
he parent of the object.
SourcePageItem
PageItem
read/write
he page item this source resides on
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Go to Hyperlink source
ExtractLabel
InsertLabel
ShowSource
1386
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
None
Visual Basic Reference
InDesign CS Scripting Guide
HyperlinkPageItemSources Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of HyperlinkPageItemSources
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
Source
PageItem
he source page item.
Return:
Description:
HyperlinkPageItemSource
Create a new hyperlink page item source.
AnyItem
None
Object
Returns any HyperlinkPageItemSource.
FirstItem
None
Object
Returns the first HyperlinkPageItemSource.
Object
Returns the HyperlinkPageItemSource with the specified ID.
HyperlinkPageItemSource
Returns the hyperlink page item sources within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
Name:
Type:
Description:
From
Variant
he hyperlink page item source at the start of the range, or the index of the hyperlink page item source at the start of the range.
To
Variant
he hyperlink page item source at the end of the range, or the index of the hyperlink page item source at the end of the range.
LastItem
None
Object
Returns the last HyperlinkPageItemSource.
MiddleItem
None
Object
Returns the middle HyperlinkPageItemSource.
Object
Returns the next HyperlinkPageItemSource.
Object
Returns the previous HyperlinkPageItemSource.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he HyperlinkPageItemSource before the one desired.
Name:
Type:
Description:
Obj
Object
he HyperlinkPageItemSource ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1387
Hyperlinks Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Hyperlinks
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
HyperlinkSource
Variant
he hyperlink source as HyperlinkPageItemSource or HyperlinkTextSource.
[HyperlinkDestination]
Variant
he hyperlink destination as HyperlinkTextDestination, HyperlinkPageDestination, HyperlinkExternalPageDestination or HyperlinkURLDestination.
Return:
Description:
Hyperlink
Create a new hyperlink.
AnyItem
None
Object
Returns any Hyperlink.
FirstItem
None
Object
Returns the first Hyperlink.
Description:
Object
Returns the Hyperlink with the specified ID.
Hyperlink
Returns the hyperlinks within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he hyperlink at the start of the range, or the index of the hyperlink at the start of the range.
To
Variant
he hyperlink at the end of the range, or the index of the hyperlink at the end of the range.
LastItem
None
Object
Returns the last Hyperlink.
MiddleItem
None
Object
Returns the middle Hyperlink.
Object
Returns the next Hyperlink.
Object
Returns the previous Hyperlink.
NextItem
PreviousItem
1388
Name:
Type:
Description:
Obj
Object
he Hyperlink before the one desired.
Name:
Type:
Description:
Obj
Object
he Hyperlink ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
HyperlinkTextDestination Properties Property:
Type:
Access:
Description:
DestinationText
InsertionPoint
read/write
he insertion point this destination points to.
Hidden
Boolean
read only
If true, the hyperlink text destination will be hidden in the exported version of the document.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the HyperlinkTextDestination within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the hyperlink text destination.
Parent
Document
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Go to Hyperlink destination
ExtractLabel
InsertLabel
ShowDestination
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
None
InDesign CS Scripting Guide Visual Basic Reference 1389
HyperlinkTextDestinations Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of HyperlinkTextDestinations
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
Destination
Text
he destination text.
Return:
Description:
HyperlinkTextDestination
Create a new hyperlink text destination.
AnyItem
None
Object
Returns any HyperlinkTextDestination.
FirstItem
None
Object
Returns the first HyperlinkTextDestination.
Object
Returns the HyperlinkTextDestination with the specified ID.
HyperlinkTextDestination
Returns the hyperlink text destinations within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
Name:
Type:
Description:
From
Variant
he hyperlink text destination at the start of the range, or the index of the hyperlink text destination at the start of the range.
To
Variant
he hyperlink text destination at the end of the range, or the index of the hyperlink text destination at the end of the range.
LastItem
None
Object
Returns the last HyperlinkTextDestination.
MiddleItem
None
Object
Returns the middle HyperlinkTextDestination.
Object
Returns the next HyperlinkTextDestination.
Object
Returns the previous HyperlinkTextDestination.
NextItem
PreviousItem
1390
Name:
Type:
Description:
Obj
Object
he HyperlinkTextDestination before the one desired.
Name:
Type:
Description:
Obj
Object
he HyperlinkTextDestination ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
HyperlinkTextSource Properties Property:
Type:
Access:
Description:
Hidden
Boolean
read only
If true, the hyperlink text source will be hidden in the exported version of the document.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the HyperlinkTextSource within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the hyperlink text source.
Parent
Document
read only
he parent of the object.
SourceText
Text
read/write
he text in which this hyperlink text source is located.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Go to Hyperlink source
ExtractLabel
InsertLabel
ShowSource
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
None
InDesign CS Scripting Guide Visual Basic Reference 1391
HyperlinkTextSources Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of HyperlinkTextSources
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
Source
Text
he source text.
Return:
Description:
HyperlinkTextSource
Create a new hyperlink text source.
AnyItem
None
Object
Returns any HyperlinkTextSource.
FirstItem
None
Object
Returns the first HyperlinkTextSource.
Description:
Object
Returns the HyperlinkTextSource with the specified ID.
HyperlinkTextSource
Returns the hyperlink text sources within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he hyperlink text source at the start of the range, or the index of the hyperlink text source at the start of the range.
To
Variant
he hyperlink text source at the end of the range, or the index of the hyperlink text source at the end of the range.
LastItem
None
Object
Returns the last HyperlinkTextSource.
MiddleItem
None
Object
Returns the middle HyperlinkTextSource.
Object
Returns the next HyperlinkTextSource.
Object
Returns the previous HyperlinkTextSource.
NextItem
PreviousItem
1392
Name:
Type:
Description:
Obj
Object
he HyperlinkTextSource before the one desired.
Name:
Type:
Description:
Obj
Object
he HyperlinkTextSource ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
HyperlinkURLDestination Properties Property:
Type:
Access:
Description:
DestinationURL
String
read/write
he URL this destination points to
Hidden
Boolean
read only
Is this object hidden in the UI
Id
Long
read only
he HyperlinkURLDestination’s unique id
Index
Long
read only
Index of the HyperlinkURLDestination within its parent Document
Label
String
read/write
A label that can be set to any string
Name
String
read/write
he name of the HyperlinkURLDestination
Parent
Document
read only
he HyperlinkURLDestination’s parent
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Go to Hyperlink destination
ExtractLabel
InsertLabel
ShowDestination
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
None
InDesign CS Scripting Guide Visual Basic Reference 1393
HyperlinkURLDestinations Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of HyperlinkURLDestinations
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Destination]
Variant
he destination URL as String.
Return:
Description:
HyperlinkURLDestination
Create a new hyperlink text destination.
AnyItem
None
Object
Returns any HyperlinkURLDestination.
FirstItem
None
Object
Returns the first HyperlinkURLDestination.
Object
Returns the HyperlinkURLDestination with the specified ID.
HyperlinkURLDestination
Returns the hyperlink url destinations within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
Name:
Type:
Description:
From
Variant
he hyperlink url destination at the start of the range, or the index of the hyperlink url destination at the start of the range.
To
Variant
he hyperlink url destination at the end of the range, or the index of the hyperlink url destination at the end of the range.
LastItem
None
Object
Returns the last HyperlinkURLDestination.
MiddleItem
None
Object
Returns the middle HyperlinkURLDestination.
Object
Returns the next HyperlinkURLDestination.
Object
Returns the previous HyperlinkURLDestination.
NextItem
PreviousItem
1394
Name:
Type:
Description:
Obj
Object
he HyperlinkURLDestination before the one desired.
Name:
Type:
Description:
Obj
Object
he HyperlinkURLDestination ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
HyphenationException Properties Property:
Type:
Access:
Description:
AddedExceptions
Variant
read/write
Hyphenation exceptions in the document.
Index
Long
read only
Index of the HyphenationException within its parent Document
Name
String
read only
he name of the object.
Parent
Document
read only
he parent of the object.
RemovedExceptions
Variant
read/write
Excluded words in the document.
Methods Method: AddException
RemoveException
Parameters: Name:
Type:
Description:
AddedExceptions
Variant
he list of exceptions to add to the document.
[RemovedList]
Boolean
If true, modify the ‘removed exceptions’ list, the ‘added exceptions’ list is modified by default.
Name:
Type:
Description:
RemovedExceptions
Variant
he list of exceptions to remove from document.
[RemovedList]
Boolean
If true, modify the ‘removed exceptions’ list, the ‘added exceptions’ list is modified by default.
Return:
Description:
Nothing
Add an exception to the document.
Nothing
Remove an exception from the document.
InDesign CS Scripting Guide Visual Basic Reference 1395
HyphenationExceptions Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of HyphenationExceptions
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any HyphenationException.
FirstItem
None
Object
Returns the first HyphenationException.
HyphenationException
Returns the hyphenation exceptions within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he hyphenation exception at the start of the range, or the index of the hyphenation exception at the start of the range.
To
Variant
he hyphenation exception at the end of the range, or the index of the hyphenation exception at the end of the range.
LastItem
None
Object
Returns the last HyphenationException.
MiddleItem
None
Object
Returns the middle HyphenationException.
Object
Returns the next HyphenationException.
Object
Returns the previous HyphenationException.
NextItem
PreviousItem
1396
Name:
Type:
Description:
Obj
Object
he HyphenationException before the one desired.
Name:
Type:
Description:
Obj
Object
he HyphenationException ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Image Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item.
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item.
AbsoluteVerticalScale
Double
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
ActualPpi
Variant
read only
he resolution of the native graphic file as Array of 2 Doubles
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
BlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ClippingPath
ClippingPathSettings
read only
he clipping path settings
EffectivePpi
Variant
read only
he resolution of the graphic ater it has been resized as Array of 2 Doubles
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
FeatherCornerType
FeatherMode
Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
FeatherWidth
Double
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
InDesign CS Scripting Guide Visual Basic Reference 1397
Property:
Type:
Access:
Description:
FillTint
Double
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
ImageIOPreferences
ImageIOPreference
read only
Image IO preferences
read/write
he rendering intent applied to the image
ImageRenderingIntent
Name:
Decimal:
idRenderingIntent.idUseColorSettings
1380541299
idRenderingIntent.idPerceptual
1380544611
idRenderingIntent.idSaturation
1380545377
idRenderingIntent.idRelativeColorimetric
1380545123
idRenderingIntent.idAbsoluteColorimetric
1380540771
ImageTypeName
String
read only
he type of image
Index
Long
read only
Index of the Image within its parent XMLElement, Sound, Movie, PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
IsolateBlending
Boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
ItemLink
Link
read only
Link to a placed file
KnockoutGroup
Boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout Group option in the Transparency palette.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he display setting for this page item.
LocalDisplaySetting
Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Nonprinting
Boolean
read/write
Whether the page item is non-printing
Opacity
Double
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
OverprintFill
Boolean
read/write
If true, the fill of the page item will overprint.
Parent
Variant
read only
he parent of the page item.
Profile
Variant
read/write
he color profile to use. Either one the idProfile enumerations or a profile name
ProfileList
Variant
read only
he list of available RGB profiles
RotationAngle
Double
read/write
he rotation angle of the page item.
1398
Visual Basic Reference
InDesign CS Scripting Guide
Property: ShadowBlendMode
Type: Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Access:
Description:
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
ShadowBlurRadius
Double
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
ShadowColor
Swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the Color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
ShadowMode
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
ShadowOpacity
Double
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
ShadowXOffset
Double
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
ShadowYOffset
Double
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
ShearAngle
Double
read/write
he shear angle applied to the page item.
Space
String
read only
he color space
TextWrapPreferences
TextWrapPreference
read only
he text wrap applied to the page item.
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
InDesign CS Scripting Guide Visual Basic Reference 1399
Property:
Type:
Access:
Description:
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Markup layout content with XML preserving the existing content.
Export
ExtractLabel
InsertLabel
Markup
1400
Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Move
Place
PlaceXML
Parameters: Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
Return:
Description:
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
InDesign CS Scripting Guide Visual Basic Reference 1401
Method: Resize
1402
Parameters: Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Method: Rotate
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Return:
Description:
Nothing
Rotate the page item.
InDesign CS Scripting Guide Visual Basic Reference 1403
Method: Shear
Store
Unlink
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
From
1404
Name:
Visual Basic Reference
Name:
Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
ImageIOPreference Properties Property:
Type:
Access:
Description:
AllowAutoEmbedding
Boolean
read/write
Whether to allow auto embedding
AlphaChannelName
String
read/write
Alpha channel name
CreateClippingFrame
Boolean
read/write
Whether to create a clipping frame
Parent
Variant
read only
he ImageIOPreference’s parent as Application or Image
PreviewResolution
Long
read only
Preview resolution
InDesign CS Scripting Guide Visual Basic Reference 1405
Images Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Images
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Image.
FirstItem
None
Object
Returns the first Image.
Description:
Object
Returns the Image with the specified ID.
Image
Returns the images within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he image at the start of the range, or the index of the image at the start of the range.
To
Variant
he image at the end of the range, or the index of the image at the end of the range.
LastItem
None
Object
Returns the last Image.
MiddleItem
None
Object
Returns the middle Image.
Object
Returns the next Image.
Object
Returns the previous Image.
NextItem
PreviousItem
1406
Name:
Type:
Description:
Obj
Object
he Image before the one desired.
Name:
Type:
Description:
Obj
Object
he Image ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
IMEPreference Properties Property:
Type:
Access:
Description:
InlineInput
Boolean
read/write
Toggles inline and the bottom window text input methods
Parent
Application
read only
he IMEPreference’s parent
InDesign CS Scripting Guide Visual Basic Reference 1407
Index Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Index within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the XML tag
Parent
Document
read only
he parent of the object.
Topics
Topics
read only
All index topics
Methods Method: Capitalize
Parameters: Name:
Type:
[CapitalizationOption]
ExtractLabel
Generate
ImportTopics
1408
Description:
Name:
Decimal:
idIndexCapitalizationOptions.idSelectedEntry
1398042725
idIndexCapitalizationOptions.idIncludeSubentries
1767072325
idIndexCapitalizationOptions. idAllLevel1Entries
1095517556
idIndexCapitalizationOptions.idAllEntries
1097624645
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
[On]
Variant
he spread or page on which to place the index story.
[PlacePoint]
Variant
he location at which to place the index story.
[DestinationLayer]
Variant
he layer on which to place the index story.
[Autoflowing]
Boolean
If true, autoflow the placed index story.
[IncludeOverset]
Boolean
If true, include index in overset.
Name:
Type:
Description:
From
String
he file to import topics from.
InDesign CS Scripting Guide
Description:
Nothing
Applies capitalization options to the index entries.
String
Gets the label value associated with the given key (label name).
Objects
Generate a new index story.
Nothing
Imports a list of topics.
What to capitalize.
Name:
Visual Basic Reference
Return:
Method: InsertLabel
Parameters: Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Return:
Description:
Nothing
Sets the string associated with the given key (label name).
RemoveUnusedTopics
None
Nothing
Removes all unused index entries
Update
None
Nothing
Update the page numbers in the index
InDesign CS Scripting Guide Visual Basic Reference 1409
Indexes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Indexes
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
Index
Create a new index.
AnyItem
None
Object
Returns any Index.
FirstItem
None
Object
Returns the first Index.
Description:
Object
Returns the Index with the specified ID.
Index
Returns the indexes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he index at the start of the range, or the index of the index at the start of the range.
To
Variant
he index at the end of the range, or the index of the index at the end of the range.
LastItem
None
Object
Returns the last Index.
MiddleItem
None
Object
Returns the middle Index.
Object
Returns the next Index.
Object
Returns the previous Index.
NextItem
PreviousItem
1410
Name:
Type:
Description:
Obj
Object
he Index before the one desired.
Name:
Type:
Description:
Obj
Object
he Index ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
IndexOptions Properties Property:
Type:
Access:
Description:
BeforeCrossReferenceSeparator
String
read/write
he string following each index topic.
BetweenEntriesSeparator
String
read/write
he string between each index entry.
BetweenPageNumbersSeparator
String
read/write
he string between page numbers or page ranges.
CrossReferenceStyle
CharacterStyle
read/write
he style to apply to cross references.
CrossReferenceTopicStyle
CharacterStyle
read/write
he style to apply to cross reference topics.
EntryEndSeparator
String
read/write
he string to insert at the end of each index entry.
FollowingTopicSeparator
String
read/write
he string following each index topic.
IncludeBookDocuments
Boolean
read/write
If true, include all documents of a book publication.
IncludeEmptyIndexSections
Boolean
read/write
If true, and if include index section headings is true, include headings for empty index sections.
IncludeHiddenEntries
Boolean
read/write
If true, include text on hidden layers.
IncludeSectionHeadings
Boolean
read/write
If true, include index section headings (“A,” “B,” etc.).
read/write
he index format to use in the generated index.
IndexFormat
Name:
Decimal:
idIndexFormat.idRuninFormat
1382631782
idIndexFormat.idNestedFormat
1316243814
Level1Style
ParagraphStyle
read/write
he style to apply to level 1 topics of each page reference
Level2Style
ParagraphStyle
read/write
he style to apply to level 2 topics of each page reference
Level3Style
ParagraphStyle
read/write
he style to apply to level 3 topics of each page reference
Level4Style
ParagraphStyle
read/write
he style to apply to level 4 topics of each page reference
PageNumberStyle
CharacterStyle
read/write
he character style to apply to page numbers.
PageRangeSeparator
String
read/write
he string entered between page numbers to indicate a page range.
Parent
Variant
read only
he parent of the object.
ReplaceExistingIndex
Boolean
read/write
If true, replace the existing index instance.
SectionHeadingStyle
ParagraphStyle
read/write
he paragraph style to apply to index section headings.
Title
String
read/write
he title of the generated index.
TitleStyle
Variant
read/write
he paragraph style to apply to the index title.
InDesign CS Scripting Guide Visual Basic Reference 1411
Ink Properties Property:
Type:
Access:
Description:
AliasInkName
String
read/write
he name of the alias ink.
Angle
Double
read/write
he screen angle at which to print the ink.
ConvertToProcess
Boolean
read/write
If true, convert a spot ink to a process color simulation.
Frequency
Double
read/write
he haltone screen frequency at which to print the ink.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Ink within its parent Application or Document
read/write
he type of the ink.
InkType
Name:
Decimal:
idInkTypes.idNormal
1852797549
idInkTypes.idOpaque
1769230192
idInkTypes.idTransparent
1769231474
idInkTypes.idOpaqueIgnore
1769228647
IsProcessInk
Boolean
read only
If true, the ink is a process ink.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read only
he name of the ink.
NeutralDensity
Double
read/write
he neutral density of the ink. his value represents the relative darkness and/or opacity of the ink, and is used by the trapping system. Ink neutral densities range from XXX (lightest/least opaque) to XXX (darkest/most opaque).
Parent
Variant
read only
he parent of the object.
PrintInk
Boolean
read/write
If true, print the ink.
Solidity
Double
read only
he solidity value of the ink.
TrapOrder
Long
read/write
he trapping order of the ink.
Methods Method: ExtractLabel
InsertLabel
1412
Parameters: Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Inks Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Inks
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Ink.
FirstItem
None
Object
Returns the first Ink.
Description:
Object
Returns the Ink with the specified ID.
Image
Returns the inks within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he image at the start of the range, or the index of the image at the start of the range.
To
Variant
he image at the end of the range, or the index of the image at the end of the range.
LastItem
None
Object
Returns the last Ink.
MiddleItem
None
Object
Returns the middle Ink.
Object
Returns the next Ink.
Object
Returns the previous Ink.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Ink before the one desired.
Name:
Type:
Description:
Obj
Object
he Ink ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1413
InsertionPoint Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
Ascent
Variant
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
AssociatedXMLElements
Objects
read only
Returns the associated XML elements
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
Baseline
Variant
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
Buttons
Buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
Characters
Capitalization
Characters
1414
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Characters
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
Descent
Variant
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GradientFillStart
Variant
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
GradientStrokeAngle
Double
read/write
he angle of the gradient applied to the stroke of the text.
GradientStrokeLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
InDesign CS Scripting Guide Visual Basic Reference 1415
Property:
Type:
Access:
Description:
GradientStrokeStart
Variant
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
GraphicLines
GraphicLines
read only
All graphic lines
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
Groups
Groups
read only
Groups
HorizontalOffset
Variant
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Index
Long
read only
Index of the object within its parent object.
InsertionPoints
InsertionPoints
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
1416
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Length
Long
read only
he number of characters in the text object.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Lines
Lines
read only
Lines
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OpenTypeFeatures
Variant
read/write
open type features as Array of Longs
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
InDesign CS Scripting Guide Visual Basic Reference 1417
Property:
Type:
Access:
Description:
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
ParentStory
Story
read only
he story containing the text object.
ParentTextFrame
TextFrame
read only
he text frame containing the text object.
PointSize
Double
read/write
he size of the text in points.
Polygons
Polygons
read only
All polygons
Position
Name:
Decimal:
read/write
he position attribute applied to the text.
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Rectangles
Rectangles
read only
All rectangles
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
1418
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleBelowWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
InDesign CS Scripting Guide Visual Basic Reference 1419
Property: SingleWordJustification
Type: Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Justification for lines containing a single word.
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tables
Tables
read only
All tables
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this InsertionPoint as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
TextColumns
TextColumns
read only
Text columns
1420
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Words
Words
read only
Words
Methods Method: ApplyStyle
Changecase
Parameters: Name:
Type:
Description:
Using
Variant
he paragraph style or character style to apply.
[ClearingOverrides]
Boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
Using
Name:
Decimal:
idChangecaseMode. idUppercase
1667462499
idChangecaseMode. idLowercase
1667460195
idChangecaseMode. idTitlecase
1667462243
idChangecaseMode. idSentencecase
1667461987
Return:
Description:
Nothing
Apply a paragraph or character style to the text object.
Nothing
Change the case of text.
Case option to use.
InDesign CS Scripting Guide Visual Basic Reference 1421
Method: ConvertToTable
CreateOutlines
Delete Export
1422
Parameters: Name:
Type:
Description:
[Column Separator]
String
he character to interpret as the column separator.
[RowSeparator]
String
he character to interpret as the row separator.
[NumberOfColumns]
Long
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original text.
None Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Table
Convert the text to a table. he parameters for this command correspond to the options in the Convert Text to Table dialog box (select some text and choose Table > Convert Text to Table to display this dialog box).
Objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Nothing
Deletes the object.
Nothing
Exports the object to a file.
Method: Markup
Move
Parameters: Name:
Type:
Description:
Using
XMLElement
he XML element to associate with the text.
Name:
Type:
Description:
To
Place
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Return:
Description:
Nothing
Associate the text with an XML element while preserving the existing text content.
Nothing
Moves the text.
Object
Place a file.
Where to move the text, relative to the reference object (before/ater).
[Reference]
Variant
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
InDesign CS Scripting Guide Visual Basic Reference 1423
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
1424
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Visual Basic Reference
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects text.
InsertionPoints Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of InsertionPoints
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any InsertionPoint.
FirstItem
None
Object
Returns the first InsertionPoint.
InsertionPoint
Returns the insertion points within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he insertion point at the start of the range, or the index of the insertion point at the start of the range.
To
Variant
he insertion point at the end of the range, or the index of the insertion point at the end of the range.
LastItem
None
Object
Returns the last InsertionPoint.
MiddleItem
None
Object
Returns the middle InsertionPoint.
Object
Returns the next InsertionPoint.
Object
Returns the previous InsertionPoint.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he InsertionPoint before the one desired.
Name:
Type:
Description:
Obj
Object
he InsertionPoint ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1425
IntegerCombobox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
EditValue
Double
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the IntegerCombobox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
StringList
Variant
read/write
A list of the strings that appear on the menu of the control.
1426
Visual Basic Reference
InDesign CS Scripting Guide
IntegerComboboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of IntegerComboboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
IntegerCombobox
Create a new integer combobox.
AnyItem
None
Object
Returns any IntegerCombobox.
FirstItem
None
Object
Returns the first IntegerCombobox.
Description:
Object
Returns the IntegerCombobox with the specified ID.
IntegerCombobox
Returns the integer comboboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he integer combobox at the start of the range, or the index of the integer combobox at the start of the range.
To
Variant
he integer combobox at the end of the range, or the index of the integer combobox at the end of the range.
LastItem
None
Object
Returns the last IntegerCombobox.
MiddleItem
None
Object
Returns the middle IntegerCombobox.
Object
Returns the next IntegerCombobox.
Object
Returns the previous IntegerCombobox.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he IntegerCombobox before the one desired.
Name:
Type:
Description:
Obj
Object
he IntegerCombobox ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1427
IntegerEditbox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
EditValue
Double
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the IntegerEditbox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
1428
Visual Basic Reference
InDesign CS Scripting Guide
IntegerEditboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of IntegerEditboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
IntegerEditbox
Create a new integer editbox.
AnyItem
None
Object
Returns any IntegerEditbox.
FirstItem
None
Object
Returns the first IntegerEditbox.
Description:
Object
Returns the IntegerEditbox with the specified ID.
IntegerEditbox
Returns the integer editboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he integer editbox at the start of the range, or the index of the integer editbox at the start of the range.
To
Variant
he integer editbox at the end of the range, or the index of the integer editbox at the end of the range.
LastItem
None
Object
Returns the last IntegerEditbox.
MiddleItem
None
Object
Returns the middle IntegerEditbox.
Object
Returns the next IntegerEditbox.
Object
Returns the previous IntegerEditbox.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he IntegerEditbox before the one desired.
Name:
Type:
Description:
Obj
Object
he IntegerEditbox ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1429
JPEGExportPreference Properties Property:
Type:
Access:
Description:
ExportingSelection
Boolean
read/write
Whether selection is being exported in the JPEG
ExportingSpread
Boolean
read/write
Whether full spread is being exported in the JPEG
read/write
Specifies the compression quality of output JPEG file
read/write
Rendering style
JPEGQuality
JPEGRenderingStyle
Name:
Decimal:
idJPEGOptionsQuality.idLow
1701727351
idJPEGOptionsQuality.idMedium
1701727588
idJPEGOptionsQuality.idHigh
1701726313
idJPEGOptionsQuality.idMaximum
1701727608
Name:
Decimal:
idJPEGOptionsFormat.idBaselineEncoding
1785751394
idJPEGOptionsFormat.idProgressiveEncoding
1785751408
PageString
String
read/write
Page number if not exporting selection
Parent
Application
read only
he JPEGExportPreference’s parent
1430
Visual Basic Reference
InDesign CS Scripting Guide
Language Properties Property:
Type:
Access:
Description:
DoubleQuotes
String
read/write
Double quotes pair for the language.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Language within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read only
he name of the language.
Parent
Document
read only
he parent of the object.
SingleQuotes
String
read/write
Single quotes pair for the language.
Methods Method: ExtractLabel
InsertLabel
Parameters: Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Return:
Description:
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
InDesign CS Scripting Guide Visual Basic Reference 1431
Languages Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Languages
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Language.
FirstItem
None
Object
Returns the first Language.
Description:
Object
Returns the Language with the specified ID.
Language
Returns the languages within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he language at the start of the range, or the index of the language at the start of the range.
To
Variant
he language at the end of the range, or the index of the language at the end of the range.
LastItem
None
Object
Returns the last Language.
MiddleItem
None
Object
Returns the middle Language.
Object
Returns the next Language.
Object
Returns the previous Language.
NextItem
PreviousItem
1432
Name:
Type:
Description:
Obj
Object
he Language before the one desired.
Name:
Type:
Description:
Obj
Object
he Language ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
LanguagesWithVendors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of LanguagesWithVendors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any LanguageWithVendors.
FirstItem
None
Object
Returns the first LanguageWithVendors.
Description:
Object
Returns the LanguageWithVendors with the specified ID.
LanguageWithVendors
Returns the languages with vendors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he language with vendors at the start of the range, or the index of the language with vendors at the start of the range.
To
Variant
he language with vendors at the end of the range, or the index of the language with vendors at the end of the range.
LastItem
None
Object
Returns the last LanguageWithVendors.
MiddleItem
None
Object
Returns the middle LanguageWithVendors.
Object
Returns the next LanguageWithVendors.
Object
Returns the previous LanguageWithVendors.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he LanguageWithVendors before the one desired.
Name:
Type:
Description:
Obj
Object
he LanguageWithVendors ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1433
LanguageWithVendors Properties Property:
Type:
Access:
Description:
DoubleQuotes
String
read/write
Double quotes pair for the language with vendors.
HyphenationVendor
String
read/write
Hyphenation vendor of the language.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the LanguageWithVendors within its parent Application
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read only
he name of the language with vendors.
Parent
Application
read only
he parent of the object.
SingleQuotes
String
read/write
Single quotes pair for the language with vendors.
SpellingVendor
String
read/write
Spelling vendor of the language.
hesaurusVendor
String
read/write
hesaurus vendor of the language.
Methods Method: ExtractLabel
InsertLabel
1434
Parameters: Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Layer Properties Property:
Type:
Access:
Description:
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items in the layer, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
Buttons
Buttons
read only
Every button
FormFields
FormFields
read only
Every form field item
GraphicLines
GraphicLines
read only
All graphic lines
Groups
Groups
read only
Groups
Guides
Guides
read only
Every guide
Id
Long
read only
A unique number identifying the object.
IgnoreWrap
Boolean
read/write
If true, the text wrap on any items on this layer will be ignored when the layer is hidden.
Index
Long
read only
Index of the Layer within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
LayerColor
Variant
read/write
he layer highlight color.
Locked
Boolean
read/write
If true, the layer is locked.
LockGuides
Boolean
read/write
If true, lock the guides on the layer.
Name
String
read/write
he name of the layer.
Ovals
Ovals
read only
All ovals
PageItems
PageItems
read only
All page items
Parent
Document
read only
he parent of the layer.
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
ShowGuides
Boolean
read/write
If true, display the guides on this layer.
TextFrames
TextFrames
read only
Text Frames
Visible
Boolean
read/write
If true, the layer is visible.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Layer
Merge with another layer.
ExtractLabel
InsertLabel
Merge
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
hey layer(s) with which to merge.
InDesign CS Scripting Guide Visual Basic Reference 1435
Method: Move
Parameters: Name: To
[Reference]
1436
Visual Basic Reference
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
InDesign CS Scripting Guide
location.
Before/ater this layer.
Return:
Description:
Layer
Move the layer before/ater another layer, or to beginning/end.
Layers Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Layers
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
Layer
Create a new layer.
AnyItem
None
Object
Returns any Layer.
FirstItem
None
Object
Returns the first Layer.
Description:
Object
Returns the Layer with the specified ID.
Layer
Returns the layers within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he layer at the start of the range, or the index of the layer at the start of the range.
To
Variant
he layer at the end of the range, or the index of the layer at the end of the range.
LastItem
None
Object
Returns the last Layer.
MiddleItem
None
Object
Returns the middle Layer.
Object
Returns the next Layer.
Object
Returns the previous Layer.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Layer before the one desired.
Name:
Type:
Description:
Obj
Object
he Layer ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1437
LayoutAdjustmentPreference Properties Property:
Type:
Access:
Description:
AllowGraphicsToResize
Boolean
read/write
If true, allow graphics to resize in response to layout changes.
AllowRulerGuidesToMove
Boolean
read/write
If true, allow ruler guides to move to adjust to layout changes.
EnableLayoutAdjustment
Boolean
read/write
If true, enable layout adjustment. When layout adjustment is active, objects and guides can change position when page margins change, or when page size or page orientation changes.
IgnoreObjectOrLayerLocks
Boolean
read/write
If true, ignore object or layer locks when adjusting the layout.
IgnoreRulerGuideAlignments
Boolean
read/write
If true, ignore ruler guide alignments when adjusting layout.
Parent
Variant
read only
he parent of the object.
SnapZone
Double
read/write
he range (distance, in current measurement units) within which an object snaps to a guide or margin during layout adjustment.
1438
Visual Basic Reference
InDesign CS Scripting Guide
LayoutWindow Properties Property:
Type:
Access:
Description:
ActiveLayer
Layer
read/write
he active layer
ActivePage
Page
read/write
he active page
ActiveSpread
Spread
read/write
he active spread
Bounds
Variant
read/write
he bounds of the LayoutWindow, in the format (top, let, bottom, right) as Array of 4 Units (Doubles or Strings)
Index
Long
read only
Index of the LayoutWindow within its parent Document or Application
Name
String
read only
he name of the LayoutWindow
OverprintPreview
Boolean
read/write
Whether to display a simulation of overprinting
Parent
Variant
read only
he LayoutWindow’s parent as Document or Application
ProofingProfile
String
read/write
he profile used for proofing
read/write
he method of proofing
ProofingType
Name:
Decimal:
idProofingType.idProofOff
1347710822
idProofingType.idDocumentCMYK
1347708003
idProofingType.idWorkingCMYK
1347712867
idProofingType.idCustom
1131639917
Selection
Variant
read/write
he selection of the front-most window as Object, Array of Objects or idNothingEnum
SimulateInkBlack
Boolean
read/write
Determine whether to adjust for the black point
SimulatePaperWhite
Boolean
read/write
Determine whether to adjust for white point
TransformReferencePoint
Variant
read/write
he default anchor point to transform objects around as idAnchorPoint or Array of 2 Units (Doubles or Strings)
read/write
he local Display Performance settings for this view
read/write
he current zoom
ViewDisplaySetting
ZoomPercentage
Name:
Decimal:
idViewDisplaySettings.idHighQuality
1346922866
idViewDisplaySettings.idTypical
1349810544
idViewDisplaySettings.idOptimized
1349480564
Double
Methods Method:
Parameters:
Return:
Description:
BringToFront
None
Nothing
Brings the object to the front.
Close
None
Nothing
Close the LayoutWindow
Maximize
None
Nothing
Maximize the window
Minimize
None
Nothing
Minimize the window
Restore
None
Nothing
Restore the window
InDesign CS Scripting Guide Visual Basic Reference 1439
Method: Select
Parameters: Name:
Type:
Description:
SelectableItems
Object, Array of Objects, or idNothingEnum.idNothing (to deselect all)
he object(s) to select.
[ExistingSelection]
Zoom
Name: Given
1440
Visual Basic Reference
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Type: Decimal:
idZoomOptions. idZoomIn
2053990766
idZoomOptions. idZoomOut
2054124916
idZoomOptions.idFitSpread
2053534835
idZoomOptions. idFitPage
2053534832
idZoomOptions. idShowPasteboard
2054385762
idZoomOptions.idActualSize
2053206906
InDesign CS Scripting Guide
Description:
Nothing
Selects an object or objects. If the object is a text object (e.g., characters, words, lines, paragraphs), any other selected objects are deselected (the AppendSelection parameter has no effect).
Nothing
Zoom the window.
How to handle the existing selection.
Description:
Name:
Return:
Zoom size.
LayoutWindows Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of LayoutWindows
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any LayoutWindow.
FirstItem
None
Object
Returns the first LayoutWindow.
LayoutWindow
Returns the layout windows within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he layout window at the start of the range, or the index of the layout window at the start of the range.
To
Variant
he layout window at the end of the range, or the index of the layout window at the end of the range.
LastItem
None
Object
Returns the last LayoutWindow.
MiddleItem
None
Object
Returns the middle LayoutWindow.
Object
Returns the next LayoutWindow.
Object
Returns the previous LayoutWindow.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he LayoutWindow before the one desired.
Name:
Type:
Description:
Obj
Object
he LayoutWindow ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1441
Libraries Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Libraries
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
FullName
String
he path and file name.
Return:
Description:
Library
Create a new libary.
AnyItem
None
Object
Returns any Library.
FirstItem
None
Object
Returns the first Library.
Library
Returns the libraries within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he library at the start of the range, or the index of the library at the start of the range.
To
Variant
he library at the end of the range, or the index of the library at the end of the range.
LastItem
None
Object
Returns the last Library.
MiddleItem
None
Object
Returns the middle Library.
Object
Returns the next Library.
Object
Returns the previous Library.
NextItem
PreviousItem
1442
Name:
Type:
Description:
Obj
Object
he Library before the one desired.
Name:
Type:
Description:
Obj
Object
he Library ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Library Properties Property:
Type:
Access:
Description:
Assets
Assets
read only
Every library asset
FilePath
String
read only
he file path to the folder containing the library file (does not include the file name).
FullName
String
read only
he file path to the library file, including the file name.
Index
Long
read only
Index of the Library within its parent Application
Name
String
read only
he name of the library file.
Parent
Application
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Close
None
Nothing
Close the library
Asset
Store page item(s) in a library.
Store
Name:
Type:
Description:
Using
Variant
he page item(s) to store.
InDesign CS Scripting Guide Visual Basic Reference 1443
Line Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
Ascent
Variant
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
AssociatedXMLElements
Objects
read only
Returns the associated XML elements
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
Baseline
Variant
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
Buttons
Buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
Characters
Capitalization
Characters
1444
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Characters
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
Descent
Variant
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GradientFillStart
Variant
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
GradientStrokeAngle
Double
read/write
he angle of the gradient applied to the stroke of the text.
GradientStrokeLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
InDesign CS Scripting Guide Visual Basic Reference 1445
Property:
Type:
Access:
Description:
GradientStrokeStart
Variant
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
GraphicLines
GraphicLines
read only
All graphic lines
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
Groups
Groups
read only
Groups
HorizontalOffset
Variant
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Index
Long
read only
Index of the object within its parent object.
InsertionPoints
InsertionPoints
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
1446
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Length
Long
read only
he number of characters in the text object.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Lines
Lines
read only
Lines
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OpenTypeFeatures
Variant
read/write
open type features as Array of Longs
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
InDesign CS Scripting Guide Visual Basic Reference 1447
Property:
Type:
Access:
Description:
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
ParentStory
Story
read only
he story containing the text object.
ParentTextFrame
TextFrame
read only
he text frame containing the text object.
PointSize
Double
read/write
he size of the text in points.
Polygons
Polygons
read only
All polygons
Position
Name:
Decimal:
read/write
he position attribute applied to the text.
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Rectangles
Rectangles
read only
All rectangles
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
1448
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleBelowWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
InDesign CS Scripting Guide Visual Basic Reference 1449
Property: SingleWordJustification
Type: Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Justification for lines containing a single word.
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tables
Tables
read only
All tables
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this Line as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
TextColumns
TextColumns
read only
Text columns
1450
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Words
Words
read only
Words
Methods Method: ApplyStyle
Changecase
Parameters: Name:
Type:
Description:
Using
Variant
he paragraph style or character style to apply.
[ClearingOverrides]
Boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
Using
Name:
Decimal:
idChangecaseMode. idUppercase
1667462499
idChangecaseMode. idLowercase
1667460195
idChangecaseMode. idTitlecase
1667462243
idChangecaseMode. idSentencecase
1667461987
Return:
Description:
Nothing
Apply a paragraph or character style to the text object.
Nothing
Change the case of text.
Case option to use.
InDesign CS Scripting Guide Visual Basic Reference 1451
Method: ConvertToTable
CreateOutlines
Delete Export
1452
Parameters: Name:
Type:
Description:
[Column Separator]
String
he character to interpret as the column separator.
[RowSeparator]
String
he character to interpret as the row separator.
[NumberOfColumns]
Long
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original text.
None Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Table
Convert the text to a table. he parameters for this command correspond to the options in the Convert Text to Table dialog box (select some text and choose Table > Convert Text to Table to display this dialog box).
Objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Nothing
Deletes the object.
Nothing
Exports the object to a file.
Method: Markup
Move
Parameters: Name:
Type:
Description:
Using
XMLElement
he XML element to associate with the text.
Name:
Type:
Description:
To
Place
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Return:
Description:
Nothing
Associate the text with an XML element while preserving the existing text content.
Nothing
Moves the text.
Object
Place a file.
Where to move the text, relative to the reference object (before/ater).
[Reference]
Variant
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
InDesign CS Scripting Guide Visual Basic Reference 1453
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
1454
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Visual Basic Reference
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects text.
Lines Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Lines
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Line.
FirstItem
None
Object
Returns the first Line.
Libraries
Returns the lines within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he libraries at the start of the range, or the index of the libraries at the start of the range.
To
Variant
he libraries at the end of the range, or the index of the libraries at the end of the range.
LastItem
None
Object
Returns the last Line.
MiddleItem
None
Object
Returns the middle Line.
Object
Returns the next Line.
Object
Returns the previous Line.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Line before the one desired.
Name:
Type:
Description:
Obj
Object
he Line ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1455
Link Properties Property:
Type:
Access:
Description:
AssetEtag
String
read only
he asset etag of the link.
AssetID
Variant
read only
he asset ID of the link as Array of Strings or Longs
AssetURL
String
read only
he asset URL of the link
Date
Date
read only
he date and time the link was created.
Edited
Boolean
read only
If true, the link file has been modified since it was last updated.
FilePath
String
read only
he file path to the folder containing the link file (does not include the file name).
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Link within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
LinkType
String
read only
he type of the link.
Name
String
read only
he name of the link file.
Needed
Boolean
read only
If true, the link is needed for printing or export.
Parent
Document
read only
he parent of the object.
Size
Long
read only
he size of the link file on disk.
read only
he status of the link.
Status
Name:
Decimal:
idLinkStatus.idNormal
1852797549
idLinkStatus.idLinkOutOfDate
1819242340
idLinkStatus.idLinkMissing
1819109747
idLinkStatus.idLinkEmbedded
1282237028
Methods Method:
Parameters:
Return:
Description:
EditOriginal
None
Nothing
Edit original
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Set the link.
Nothing
Show link
Nothing
Unembed data and link to new file or link to original.
ExtractLabel
InsertLabel
Relink
Show
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
To
String
to.
None
Unembed
Name:
Type:
Description:
[To]
Variant
Folder where new files are created.
Unlink
None
Nothing
Unlink text or embed images
Update
None
Link
Update Link.
1456
Visual Basic Reference
InDesign CS Scripting Guide
Links Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Links
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Link.
FirstItem
None
Object
Returns the first Link.
Description:
Object
Returns the Link with the specified ID.
Libraries
Returns the links within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he libraries at the start of the range, or the index of the libraries at the start of the range.
To
Variant
he libraries at the end of the range, or the index of the libraries at the end of the range.
LastItem
None
Object
Returns the last Link.
MiddleItem
None
Object
Returns the middle Link.
Object
Returns the next Link.
Object
Returns the previous Link.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Link before the one desired.
Name:
Type:
Description:
Obj
Object
he Link ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1457
MarginPreference Properties Property:
Type:
Access:
Description:
Bottom
Variant
read/write
he height of the bottom margin.
ColumnCount
Long
read/write
he number of column guides on the page. Note that these column guides have no effect on the number of columns in a single text frame.
ColumnGutter
Variant
read/write
he distance between columns on the page.
Let
Variant
read/write
he width of the let margin.
Parent
Variant
read only
he parent of the object.
Right
Variant
read/write
he width of the right margin.
Top
Variant
read/write
he height of the top margin.
1458
Visual Basic Reference
InDesign CS Scripting Guide
MasterSpread Properties Property:
Type:
Access:
Description:
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items on the master spread, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AppliedMaster
Variant
read/write
he master spread applied to this master spread (if any).
BaseName
String
read/write
he base name of the master spread.
Buttons
Buttons
read only
Every button
FormFields
FormFields
read only
Every form field item
GraphicLines
GraphicLines
read only
All graphic lines
Groups
Groups
read only
Groups
Guides
Guides
read only
Every guide
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the MasterSpread within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read only
he name of the master spread.
NamePrefix
String
read/write
he name prefix of the master spread.
Ovals
Ovals
read only
All ovals
PageItems
PageItems
read only
All page items
Pages
Pages
read only
Every page
Parent
Document
read only
he parent of the object.
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
ShowMasterItems
Boolean
read/write
If true, show page items from the master spread applied to this master spread (if any).
TextFrames
TextFrames
read only
Text Frames
InDesign CS Scripting Guide Visual Basic Reference 1459
Methods Method: CreateGuides
Parameters: Name:
Type:
Description:
[NumberOfRows]
Long
Number of rows of guides on a page.
[NumberOfColumns]
Long
Number of columns of guides on a page.
[RowGutter]
Variant
he amount of gutter between rows.
[ColumnGutter]
Variant
he amount of gutter between columns.
[GuideColor]
Variant
he guideÕs color.
[FitMargins]
Boolean
Whether the guides should fit to margins or fit to page.
[RemoveExisting]
Boolean
If true, remove existing guides.
[Layer]
Variant
he layer on which to create the MasterSpread as Layer.
Return:
Description:
Nothing
Create multiple guides on all pages of a spread.
Deletes the object.
Delete
None
Nothing
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Object
Place a file.
ExtractLabel
InsertLabel
Place
1460
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Visual Basic Reference
InDesign CS Scripting Guide
MasterSpreads Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of MasterSpreads
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[PagesPerSpread]
Variant
Number of pages of the master spread as Long.
Return:
Description:
MasterSpread
Create a new master spread.
AnyItem
None
Object
Returns any MasterSpread.
FirstItem
None
Object
Returns the first MasterSpread.
Description:
Object
Returns the MasterSpread with the specified ID.
MasterSpread
Returns the master spreads within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he master spread at the start of the range, or the index of the master spread at the start of the range.
To
Variant
he master spread at the end of the range, or the index of the master spread at the end of the range.
LastItem
None
Object
Returns the last MasterSpread.
MiddleItem
None
Object
Returns the middle MasterSpread.
Object
Returns the next MasterSpread.
Object
Returns the previous MasterSpread.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he MasterSpread before the one desired.
Name:
Type:
Description:
Obj
Object
he MasterSpread ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1461
MeasurementCombobox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
read/write
he measurement unit to use for the editbox or combobox
EditUnits
Name:
Decimal:
idMeasurementUnits.idPoints
2054188905
idMeasurementUnits.idPicas
2054187363
idMeasurementUnits.idInches
2053729891
idMeasurementUnits.idInchesDecimal
2053729892
idMeasurementUnits.idMillimeters
2053991795
idMeasurementUnits.idCentimeters
2053336435
idMeasurementUnits.idCiceros
2053335395
EditValue
Double
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the MeasurementCombobox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
StringList
Variant
read/write
A list of the strings that appear on the menu of the control.
1462
Visual Basic Reference
InDesign CS Scripting Guide
MeasurementComboboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of MeasurementComboboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Add
None
AnyItem
None
Object
Returns any MeasurementCombobox.
FirstItem
None
Object
Returns the first MeasurementCombobox.
Object
Returns the MeasurementCombobox with the specified ID.
ItemByID
ItemByRange
Return:
Description: Create a new measurement combobox.
Name:
Type:
Description:
Id
Long
Name:
Type:
Description:
From
Variant
he measurement combobox at the start of the range, or the index of the measurement combobox at the start of the range.
To
Variant
he measurement combobox at the end of the range, or the index of the measurement combobox at the end of the range.
Returns the measurement comboboxes within the specified range.
LastItem
None
Object
Returns the last MeasurementCombobox.
MiddleItem
None
Object
Returns the middle MeasurementCombobox.
Object
Returns the next MeasurementCombobox.
Object
Returns the previous MeasurementCombobox.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he MeasurementCombobox before the one desired.
Name:
Type:
Description:
Obj
Object
he MeasurementCombobox ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1463
MeasurementEditbox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
read/write
he measurement unit to use for the editbox or combobox
EditUnits
Name:
Decimal:
idMeasurementUnits.idPoints
2054188905
idMeasurementUnits.idPicas
2054187363
idMeasurementUnits.idInches
2053729891
idMeasurementUnits.idInchesDecimal
2053729892
idMeasurementUnits.idMillimeters
2053991795
idMeasurementUnits.idCentimeters
2053336435
idMeasurementUnits.idCiceros
2053335395
EditValue
Double
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the MeasurementEditbox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
1464
Visual Basic Reference
InDesign CS Scripting Guide
MeasurementEditboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of MeasurementEditboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
MeasurementEditbox
Create a new measurement editbox.
AnyItem
None
Object
Returns any MeasurementEditbox.
FirstItem
None
Object
Returns the first MeasurementEditbox.
Object
Returns the MeasurementEditbox with the specified ID.
MeasurementEditbox
Returns the measurement editboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Variant
he measurement editbox at the start of the range, or the index of the measurement editbox at the start of the range.
To
Variant
he measurement editbox at the end of the range, or the index of the measurement editbox at the end of the range.
LastItem
None
Object
Returns the last MeasurementEditbox.
MiddleItem
None
Object
Returns the middle MeasurementEditbox.
Object
Returns the next MeasurementEditbox.
Object
Returns the previous MeasurementEditbox.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he MeasurementEditbox before the one desired.
Name:
Type:
Description:
Obj
Object
he MeasurementEditbox ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1465
MetadataPreference Properties Property:
Type:
Access:
Description:
Author
String
read/write
Document author
CopyrightInfoURL
String
read/write
Copyright statement URL
CopyrightNotice
String
read/write
Copyright text.
read/write
Copyright status of the document
Date
read only
Document creation date.
Creator
String
read only
he application that created the document
Description
String
read/write
A description of the document.
DocumentTitle
String
read/write
he document title
Format
String
read only
he document format
JobName
String
read/write
Customer-assigned job name.
Keywords
Variant
read/write
he keywords associated with the document.
ModificationDate
Date
read only
he most recent document modification date.
Parent
Document
read only
he parent of the object.
ServerURL
String
read only
Location of the document on asset management server
CopyrightStatus
CreationDate
Name:
Decimal:
idCopyrightStatus.idUnknown
1433299822
idCopyrightStatus.idYes
2036691744
idCopyrightStatus.idNo
1852776480
Methods Method: Append
CountContainer
CreateContainerItem
Parameters: Name:
Type:
Description:
From
String
File from which to append.
[AffectAll]
Boolean
If true, treat all properties as external (defaults to false).
Name:
Type:
Description:
Namespace
String
he namespace.
Path
String
he path.
Name:
Type:
Description:
Namespace
String
he namespace.
Path
String
he path.
[Index]
Long
he index of the item (starts from 1, default is 0 meaning append to the end).
[Container]
1466
Visual Basic Reference
Name:
Decimal:
idContainerType.idBag
1298424423
idContainerType.idSeq
1298428785
idContainerType.idAlt
1298424180
InDesign CS Scripting Guide
he container type (only required if the new item is the first one in the container).
Return:
Description:
Nothing
Append information from external file.
Long
Count the number of items in the container.
Nothing
Create an empty container item.
Method: GetProperty
Replace
Save
SetProperty
Parameters: Name:
Type:
Description:
Namespace
String
he namespace.
Path
String
he path.
Name:
Type:
Description:
From
String
File from which to replace.
[AffectAll]
Boolean
If true, treat all properties as external (defaults to false).
Name:
Type:
Description:
To
String
Where to save.
Name:
Type:
Description:
Namespace
String
he namespace.
Path
String
he path.
Value
String
he value of the property, pass an empty string to remove the property.
Return:
Description:
String
Get the XMP property value associated with the given path.
Nothing
Read information from external file and replace current metadata.
Nothing
Save information to file.
Nothing
Set the XMP property associated with the given path.
InDesign CS Scripting Guide Visual Basic Reference 1467
MixedInk Properties Property:
Type:
Access:
Description:
BaseColor
MixedInkGroup
read only
he mixed ink group that a mixed ink swatch is based on.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the MixedInk within its parent Application or Document
InkList
Objects
read only
he inks used in the mixed ink.
InkPercentages
Variant
read/write
he array of tint percentages for the mixed ink.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he color model of the mixed ink.
he name of the mixed ink.
Model
Name:
Decimal:
idColorModel.idSpot
1936748404
idColorModel.idProcess
1886548851
idColorModel.idRegistration
1919248243
idColorModel.idMixedinkmodel
1768844664
Name
String
read/write
Parent
Variant
read only
he parent of the object.
read/write
he color space of the mixed ink.
Space
Name:
Decimal:
idColorSpace.idRGB
1666336578
idColorSpace.idCMYK
1129142603
idColorSpace.idLAB
1665941826
idColorSpace.idMixedInk
1666009432
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Merge one or more other swatches into this one.
ExtractLabel
InsertLabel
Merge
1468
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Variant
he swatches to merge.
Visual Basic Reference
InDesign CS Scripting Guide
MixedInkGroup Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the MixedInkGroup within its parent Application or Document
InkList
Objects
read only
he inks used in the mixed ink group.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he color model of the mixed ink group.
Model
Name:
Decimal:
idColorModel.idSpot
1936748404
idColorModel.idProcess
1886548851
idColorModel.idRegistration
1919248243
idColorModel.idMixedinkmodel
1768844664
Name
String
read/write
he name of the mixed ink group.
Parent
Variant
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Merge one or more other swatches into this one.
ExtractLabel
InsertLabel
Merge
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Variant
he swatches to merge.
InDesign CS Scripting Guide Visual Basic Reference 1469
MixedInkGroups Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of MixedInkGroups
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
InkList
Objects
A list of ink items.
[InkPercentages]
Variant
A list of initial percentages for each ink in the ink list as Array of Doubles.
[RepeatValues]
Variant
A list specifying the repeat amount for each ink in the ink list as Array of Longs.
[IncrementValues]
Variant
A list specifying the increment percentages for each ink in the ink list as Array of Doubles.
Return:
Description:
MixedInkGroup
Create a new mixed ink group.
AnyItem
None
Object
Returns any MixedInkGroup.
FirstItem
None
Object
Returns the first MixedInkGroup.
Description:
Object
Returns the MixedInkGroup with the specified ID.
MixedInkGroup
Returns the mixed ink groups within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he mixed ink group at the start of the range, or the index of the mixed ink group at the start of the range.
To
Variant
he mixed ink group at the end of the range, or the index of the mixed ink group at the end of the range.
LastItem
None
Object
Returns the last MixedInkGroup.
MiddleItem
None
Object
Returns the middle MixedInkGroup.
Object
Returns the next MixedInkGroup.
NextItem
1470
Name:
Type:
Description:
Obj
Object
he MixedInkGroup before the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Method: PreviousItem
Parameters: Name:
Type:
Description:
Obj
Object
he MixedInkGroup ater the one desired.
Return:
Description:
Object
Returns the previous MixedInkGroup.
InDesign CS Scripting Guide Visual Basic Reference 1471
MixedInks Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of MixedInks
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
InkList
Variant
he list of ink items or the mixed ink base swatch as Array of Inks or MixedInkGroup.
InkPercentages
Variant
he list of ink contributions for the ink items specified as Array of Doubles.
Return:
Description:
MixedInk
Create a new mixed ink.
AnyItem
None
Object
Returns any MixedInk.
FirstItem
None
Object
Returns the first MixedInk.
Description:
Object
Returns the MixedInk with the specified ID.
MixedInk
Returns the mixed inks within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he mixed ink at the start of the range, or the index of the mixed ink at the start of the range.
To
Variant
he mixed ink at the end of the range, or the index of the mixed ink at the end of the range.
LastItem
None
Object
Returns the last MixedInk.
MiddleItem
None
Object
Returns the middle MixedInk.
Object
Returns the next MixedInk.
Object
Returns the previous MixedInk.
NextItem
PreviousItem
1472
Name:
Type:
Description:
Obj
Object
he MixedInk before the one desired.
Name:
Type:
Description:
Obj
Object
he MixedInk ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Movie Properties Property:
Type:
Access:
Description:
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
Description
String
read/write
Description
EmbedInPDF
Boolean
read/write
Embed content in PDF
FilePath
String
read/write
he file path
FloatingWindow
Boolean
read/write
Floating window
read/write
Floating window position
read/write
Floating window size
FloatingWindowPosition
FloatingWindowSize
Name:
Decimal:
idFloatingWindowPosition.idUpperLet
1668183118
idFloatingWindowPosition.idUpperMiddle
1299541348
idFloatingWindowPosition.idUpperRight
1299542644
idFloatingWindowPosition.idCenterLet
1298361446
idFloatingWindowPosition.idCenter
1298359662
idFloatingWindowPosition.idCenterRight
1298362996
idFloatingWindowPosition.idLowerLet
1298951270
idFloatingWindowPosition.idLowerMiddle
1298951524
idFloatingWindowPosition.idLowerRight
1298952820
Name:
Decimal:
idFloatingWindowSize.idOneFith
1298557286
idFloatingWindowSize.idOneFourth
1298558834
idFloatingWindowSize.idOneHalf
1298686316
idFloatingWindowSize.idFull
1298560364
idFloatingWindowSize.idDouble
1299476344
idFloatingWindowSize.idTriple
1299477112
idFloatingWindowSize.idQuadruple
1299281272
idFloatingWindowSize.idMax
1299014008
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Images
Images
read only
Images
Index
Long
read only
Index of the Movie within its parent PageItem, Oval, Rectangle or Polygon
ItemLayer
Layer
read/write
he layer containing the page item.
ItemLink
Link
read only
Link to a placed file
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Locked
Boolean
read/write
If true, the page item is locked.
InDesign CS Scripting Guide Visual Basic Reference 1473
Property: MoviePosterType
Type: Name:
Decimal:
idMoviePosterTypes.idNone
1852796517
idMoviePosterTypes.idStandard
2020623970
idMoviePosterTypes.idFromMovie
1298558310
idMoviePosterTypes.idProxyImage
1299216505
Access:
Description:
read/write
he current poster type (‘proxy image’ is read-only)
Name
String
read/write
he name of the movie
Parent
Variant
read only
he parent of the page item.
read/write
Play mode
PlayMode
Name:
Decimal:
idPlayMode.idOnce
1399811685
idPlayMode.idStayOpen
1299148910
idPlayMode.idRepeatPlay
1400006000
PlayOnPageTurn
Boolean
read/write
Play on page turn
PosterFile
String
read/write
Poster file
ShowControls
Boolean
read/write
Show controls
URL
String
read/write
he URL
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method:
Parameters:
Return:
Description:
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
Fit
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
1474
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
he fit option.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Markup
Move
ResetScaling
Parameters: Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
None
Return:
Description:
Nothing
Markup layout content with XML preserving the existing content.
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
InDesign CS Scripting Guide Visual Basic Reference 1475
Method: Resize
Select
Parameters: Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Nothing
Select this movie.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
1476
Visual Basic Reference
InDesign CS Scripting Guide
Method: Store
Unlink
Parameters: Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
From
VerifyURL
None
Name:
Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
Return:
Description:
Asset
Store a page item in a library.
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
Boolean
Verify movie URL.
What to unlink from.
InDesign CS Scripting Guide Visual Basic Reference 1477
MovieBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the MovieBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
MovieItem
Movie
read/write
he movie page item.
Name
String
read only
he name of the behavior.
read/write
he movie operation to perform.
read only
he parent of the object.
Operation
Parent
Name:
Decimal:
idPlayOperations.idPlay
1886151033
idPlayOperations.idStop
1937010544
idPlayOperations.idPause
1885435251
idPlayOperations.idResume
1919251317
Variant
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
1478
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
MovieBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of MovieBehaviors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
MovieBehavior
Create a new movie behavior.
AnyItem
None
Object
Returns any MovieBehavior.
FirstItem
None
Object
Returns the first MovieBehavior.
Object
Returns the MovieBehavior with the specified ID.
MovieBehavior
Returns the movie behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Variant
he movie behavior at the start of the range, or the index of the movie behavior at the start of the range.
To
Variant
he movie behavior at the end of the range, or the index of the movie behavior at the end of the range.
LastItem
None
Object
Returns the last MovieBehavior.
MiddleItem
None
Object
Returns the middle MovieBehavior.
Object
Returns the next MovieBehavior.
Object
Returns the previous MovieBehavior.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he MovieBehavior before the one desired.
Name:
Type:
Description:
Obj
Object
he MovieBehavior ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1479
Movies Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Movies
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Layer]
Variant
he layer on which to create the Movie as Layer.
[At]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Movie
Create a new movie.
Location.
Before/ater this Movie or at the beginning/end of this Document, Spread, Master Spread, Page or Layer as Document, Spread, MasterSpread, Page or Layer.
AnyItem
None
Object
Returns any Movie.
FirstItem
None
Object
Returns the first Movie.
Object
Returns the Movie with the specified ID.
Movie
Returns the movies within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he id of the object.
Name:
Type:
Description:
From
Variant
he movie at the start of the range, or the index of the movie at the start of the range.
To
Variant
he movie at the end of the range, or the index of the movie at the end of the range.
LastItem
None
Object
Returns the last Movie.
MiddleItem
None
Object
Returns the middle Movie.
1480
Visual Basic Reference
InDesign CS Scripting Guide
Method: NextItem
PreviousItem
Parameters: Name:
Type:
Description:
Obj
Object
he Movie before the one desired.
Name:
Type:
Description:
Obj
Object
he Movie ater the one desired.
Return:
Description:
Object
Returns the next Movie.
Object
Returns the previous Movie.
InDesign CS Scripting Guide Visual Basic Reference 1481
NestedStyle Properties Property:
Type:
Access:
Description:
AppliedCharacterStyle
Variant
read/write
he applied character style as CharacterStyle or String
Delimiter
Variant
read/write
he delimiting expression as String or idNestedStyleDelimiters
Inclusive
Boolean
read/write
Include the last delimiter
Index
Long
read only
Index of the NestedStyle within its parent TextDefault, Paragraph, ParagraphStyle, Text, Character, Word, Line, TextColumn, TextStyleRange, InsertionPoint or Story
Parent
Variant
read only
he NestedStyle’s parent as TextDefault, Paragraph, ParagraphStyle, Text, Character, Word, Line, TextColumn, TextStyleRange, InsertionPoint or Story
Repetition
Long
read/write
How many delimiters
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
1482
Visual Basic Reference
InDesign CS Scripting Guide
NestedStyles Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of NestedStyles
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
NestedStyle
Create a new nested style.
AnyItem
None
Object
Returns any NestedStyle.
FirstItem
None
Object
Returns the first NestedStyle.
NestedStyle
Returns the nested styles within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he nested style at the start of the range, or the index of the nested style at the start of the range.
To
Variant
he nested style at the end of the range, or the index of the nested style at the end of the range.
LastItem
None
Object
Returns the last NestedStyle.
MiddleItem
None
Object
Returns the middle NestedStyle.
Object
Returns the next NestedStyle.
Object
Returns the previous NestedStyle.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he NestedStyle before the one desired.
Name:
Type:
Description:
Obj
Object
he NestedStyle after the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1483
Objects Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Objects
Item
Object
read only
Returns the Object with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
Object
Object
he object to add.
[Index]
Variant
Before this index as Long.
Return:
Description:
Nothing
Add an object to the collection.
AnyItem
None
Object
Returns any Object.
FirstItem
None
Object
Returns the first Object.
Description:
Object
Returns the Object with the specified ID.
Objects
Returns the Objects within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he Object or the index or name of the Object at the beginning of the range as Object, Long or String.
To
Variant
he Object or the index or name of the Object at the end of the range as Object, Long or String.
LastItem
None
Object
Returns the last Object.
MiddleItem
None
Object
Returns the middle Object.
Object
Returns the next Object.
Object
Returns the previous Object.
Nothing
Remove an object from the collection.
NextItem
PreviousItem
Remove
1484
Name:
Type:
Description:
Obj
Object
he Object before the one desired.
Name:
Type:
Description:
Obj
Object
he Object ater the one desired.
Name:
Type:
Description:
Index
Long
he index of the object to remove.
Visual Basic Reference
InDesign CS Scripting Guide
OpenFileBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
FilePath
String
read/write
he file path to the file being opened.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the OpenFileBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the behavior.
Parent
Variant
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1485
OpenFileBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of OpenFileBehaviors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
OpenFileBehavior
Create a new open file behavior.
AnyItem
None
Object
Returns any OpenFileBehavior.
FirstItem
None
Object
Returns the first OpenFileBehavior.
Description:
Object
Returns the OpenFileBehavior with the specified ID.
OpenFileBehavior
Returns the open file behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he open file behavior at the start of the range, or the index of the open file behavior at the start of the range.
To
Variant
he open file behavior at the end of the range, or the index of the open file behavior at the end of the range.
LastItem
None
Object
Returns the last OpenFileBehavior.
MiddleItem
None
Object
Returns the middle OpenFileBehavior.
Object
Returns the next OpenFileBehavior.
Object
Returns the previous OpenFileBehavior.
NextItem
PreviousItem
1486
Name:
Type:
Description:
Obj
Object
he OpenFileBehavior before the one desired.
Name:
Type:
Description:
Obj
Object
he OpenFileBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Oval Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item.
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item.
AbsoluteVerticalScale
Double
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he type of content
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
BlendMode
ContentType
CornerEffect
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Name:
Decimal:
idContentType.idUnassigned
1970168179
idContentType.idGraphicType
1735553140
idContentType.idTextType
1952412773
Name:
Decimal:
idCornerEffects.idNone
1852796517
idCornerEffects.idRoundedCorner
1667592804
idCornerEffects.idInverseRoundedCorner
1667591798
idCornerEffects.idInsetCorner
1667591795
idCornerEffects.idBevelCorner
1667588726
idCornerEffects.idFancyCorner
1667589742
InDesign CS Scripting Guide Visual Basic Reference 1487
Property:
Type:
Access:
Description:
CornerRadius
Double
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
EndCap
EndJoin
EPSs
Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
EPSs
FeatherCornerType
FeatherMode
Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
FeatherWidth
Double
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
FillTint
Double
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
GapColor
Swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
GapTint
Double
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
GradientFillAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientFillLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
GradientFillStart
Variant
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
1488
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
GradientStrokeAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientStrokeLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
GradientStrokeStart
Variant
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GraphicLines
GraphicLines
read only
All graphic lines
Graphics
Graphics
read only
All graphics
Groups
Groups
read only
Groups
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Images
Images
read only
Images
Index
Long
read only
Index of the Oval within its parent Spread, MasterSpread, PageItem, Oval, Rectangle, Polygon, GraphicLine, Group, State, Document, Layer, Page, Button, TextFrame, Story, Text, Character, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table or InsertionPoint
IsolateBlending
Boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
ItemLayer
Layer
read/write
he layer containing the page item.
KnockoutGroup
Boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout Group option in the Transparency palette.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
LetLineEnd
Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
InDesign CS Scripting Guide Visual Basic Reference 1489
Property: LocalDisplaySetting
Type: Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Access:
Description:
read/write
he display setting for this page item.
Locked
Boolean
read/write
If true, the page item is locked.
MiterLimit
Double
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
Movies
Movies
read only
Every movie
Nonprinting
Boolean
read/write
If true, the page item is non-printing.
Opacity
Double
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the page item will overprint.
OverprintGap
Boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
OverprintStroke
Boolean
read/write
If true, overprint the stroke of the page item.
Overridden
Boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
OverriddenMasterPageItem
PageItem
read only
A reference to the master page item linked to the page item (if any).
PageItems
PageItems
read only
All page items
Parent
Variant
read only
he parent of the page item.
Paths
Paths
read only
All paths
PDFs
PDFs
read only
PDFs
PICTs
PICTs
read only
PICTs
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
RightLineEnd
1490
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RotationAngle
Double
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
ShadowBlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ShadowBlurRadius
Double
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
ShadowColor
Swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the Color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
ShadowMode
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
ShadowOpacity
Double
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
ShadowXOffset
Double
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
ShadowYOffset
Double
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
ShearAngle
Double
read/write
he shear angle applied to the page item.
Sounds
Sounds
read only
Every sound
InDesign CS Scripting Guide Visual Basic Reference 1491
Property: StrokeAlignment
StrokeColor StrokeCornerAdjustment
Type: Name:
Decimal:
idStrokeAlignment.idCenterAlignment
1936998723
idStrokeAlignment.idInsideAlignment
1936998729
idStrokeAlignment.idOutsideAlignment
1936998735
Variant Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
Access:
Description:
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
StrokeDashAndGap
Variant
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
StrokeTint
Double
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
StrokeType
StrokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
StrokeWeight
Double
read/write
he weight (in points) of the stroke applied to the page item.
TextFrames
TextFrames
read only
Text Frames
TextPaths
TextPaths
read only
All text paths
TextWrapPreferences
TextWrapPreference
read only
he text wrap applied to the page item.
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
WMFs
WMFs
read only
WMFs
Methods Method: AddPath
Parameters: Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
PageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
PageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
ExcludeOverlapPath
1492
Name:
Type:
Description:
With
Objects
he objects to exclude.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Export
ExtractLabel
Fit
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
IntersectPath
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
Name:
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
Return:
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
PageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
he fit option.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
he objects to intersect with.
InDesign CS Scripting Guide Visual Basic Reference 1493
Method:
Parameters:
MakeCompoundPath
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Markup
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
MinusBack
Move
Override
Place
PlaceXML
Return:
Description:
PageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound Paths>Make command.
Nothing
Markup layout content with XML preserving the existing content.
PageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
PageItem
Overrides an item from the master page and places it on the page.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
ReleaseCompoundPath
None
Objects
Releases a compound path and returns the released page items. Corresponds to the Object>Compound Path>Release menu option.
RemoveOverride
None
Nothing
Removes a locally overriden master page item
1494
Visual Basic Reference
InDesign CS Scripting Guide
Method:
Parameters:
Return:
Description:
ResetScaling
None
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Resize
Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
InDesign CS Scripting Guide Visual Basic Reference 1495
Method: Rotate
Select
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Rotate the page item.
Nothing
Select this oval.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
1496
Visual Basic Reference
InDesign CS Scripting Guide
Method: Shear
Store
SubtractPath
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
PageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
InDesign CS Scripting Guide Visual Basic Reference 1497
Method: Unlink
Parameters: Name: From
1498
Visual Basic Reference
Type: Name:
Description: Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
Ovals Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Ovals
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Layer]
Variant
he layer on which to create the Oval as Layer.
[At]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Oval
Create a new oval.
Location.
Before/ater this Oval or at the beginning/end of this Document, Spread, Master Spread, Page or Layer as Document, Spread, MasterSpread, Page or Layer.
AnyItem
None
Object
Returns any Oval.
FirstItem
None
Object
Returns the first Oval.
Description:
Object
Returns the Oval with the specified ID.
Oval
Returns the ovals within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he oval at the start of the range, or the index of the oval at the start of the range.
To
Variant
he oval at the end of the range, or the index of the oval at the end of the range.
LastItem
None
Object
Returns the last Oval.
MiddleItem
None
Object
Returns the middle Oval.
InDesign CS Scripting Guide Visual Basic Reference 1499
Method: NextItem
PreviousItem
1500
Parameters: Name:
Type:
Description:
Obj
Object
he Oval before the one desired.
Name:
Type:
Description:
Obj
Object
he Oval ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Object
Returns the next Oval.
Object
Returns the previous Oval.
PackageForGoLivePreference Properties Property:
Type:
Access:
Description:
CopyFormattedImages
Boolean
read/write
Whether to copy formatted images to images sub folder
CopyOptimizedImages
Boolean
read/write
Whether to copy optimized images to images sub folder
CopyOriginalImages
Boolean
read/write
Whether to copy original images to images sub folder
ExcludeDtd
Boolean
read/write
Whether to exclude the DTD from the exported XML
ExportFromSelected
Boolean
read/write
Whether to export from a selected element (otherwise export the entire document)
read/write
File encoding to be used when exporting
read/write
Generate interlaced GIFs
read/write
Color palette to use for GIF conversion
read/write
Type of image to generate for optimized and formatted images
read/write
Format of converted JPEG image
read/write
Quality of converted JPEG image
Variant
read only
he PackageForGoLivePreference’s parent as Application or Document
PreferredBrowser
String
read/write
he preferred browser for viewing XML
Ruby
Boolean
read/write
Whether to include Ruby in the exported XML
ViewAterExport
Boolean
read/write
Whether to view exported XML in a default viewer
FileEncoding
GIFOptionsInterlaced GIFOptionsPalette
ImageConversion
JPEGOptionsFormat
JPEGOptionsQuality
Parent
Name:
Decimal:
idXMLFileEncoding.idUTF8
1937134904
idXMLFileEncoding.idUTF16
1937125686
idXMLFileEncoding.idShitJIS
1249077875
Boolean Name:
Decimal:
idGIFOptionsPalette.idAdaptivePalette
1886151024
idGIFOptionsPalette.idMacintoshPalette
1886154096
idGIFOptionsPalette.idWebPalette
1886156656
idGIFOptionsPalette.idWindowsPalette
1886156644
Name:
Decimal:
idImageConversion.idAutomatic
1768059764
idImageConversion.idJPEG
1785751398
idImageConversion.idGIF
1734960742
Name:
Decimal:
idJPEGOptionsFormat.idBaselineEncoding
1785751394
idJPEGOptionsFormat.idProgressiveEncoding
1785751408
Name:
Decimal:
idJPEGOptionsQuality.idLow
1701727351
idJPEGOptionsQuality.idMedium
1701727588
idJPEGOptionsQuality.idHigh
1701726313
idJPEGOptionsQuality.idMaximum
1701727608
InDesign CS Scripting Guide Visual Basic Reference 1501
Page Properties Property:
Type:
Access:
Description:
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items on the page, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AppliedMaster
Variant
read/write
he master spread applied to the page.
AppliedSection
Section
read only
he section associated with this page.
AppliedTrapPreset
Variant
read/write
he trap preset associated with this page as TrapPreset or String
Bounds
Variant
read only
he bounds of the page.
Buttons
Buttons
read only
Every button
DocumentOffset
Long
read only
Offset of the page in the document.
FormFields
FormFields
read only
Every form field item
GraphicLines
GraphicLines
read only
All graphic lines
Groups
Groups
read only
Groups
Guides
Guides
read only
Every guide
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the object within its parent spread.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
MarginPreferences
MarginPreference
read only
he margin preferences for the page.
MasterPageItems
Objects
read only
All items on the applied master spread(s) that have not been overridden.
Name
String
read only
he name of the page.
Ovals
Ovals
read only
All ovals
PageItems
PageItems
read only
All page items
Parent
Variant
read only
he parent of the object.
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
TabOrder
Objects
read/write
he order of tabbing among the form fields on the page.
TextFrames
TextFrames
read only
Text Frames
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
1502
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Move
Parameters: Name: [To]
[Reference]
[Binding]
Place
RemoveOverride
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Description:
Page
Move Page.
Object
Place a file.
Nothing
Removes a locally overriden master page item
Location.
A page or spread. Before/ater the page or at the beginning/end of the spread.
Name:
Decimal:
idBindingOptions. idRightAlign
1919379572
idBindingOptions. idLetAlign
1818584692
idBindingOptions. idDefault
1147563124
Binding options.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
None
Return:
InDesign CS Scripting Guide Visual Basic Reference 1503
PageItem Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item.
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item.
AbsoluteVerticalScale
Double
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
BlendMode
CornerEffect
CornerRadius
1504
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Name:
Decimal:
idCornerEffects.idNone
1852796517
idCornerEffects.idRoundedCorner
1667592804
idCornerEffects.idInverseRoundedCorner
1667591798
idCornerEffects.idInsetCorner
1667591795
idCornerEffects.idBevelCorner
1667588726
idCornerEffects.idFancyCorner
1667589742
Double
Visual Basic Reference
InDesign CS Scripting Guide
Property: EndCap
EndJoin
EPSs FeatherCornerType
FeatherMode
Type: Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
EPSs Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
Access:
Description:
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
FeatherWidth
Double
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
FillTint
Double
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
GapColor
Swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
GapTint
Double
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
GradientFillAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientFillLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
GradientFillStart
Variant
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GradientStrokeAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
InDesign CS Scripting Guide Visual Basic Reference 1505
Property:
Type:
Access:
Description:
GradientStrokeLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
GradientStrokeStart
Variant
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GraphicLines
GraphicLines
read only
All graphic lines
Graphics
Graphics
read only
All graphics
Groups
Groups
read only
Groups
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Images
Images
read only
Images
Index
Long
read only
Index of the PageItem within its parent XMLElement, Spread, MasterSpread, PageItem, Oval, Rectangle, Polygon, GraphicLine, Group, State, TextFrame, Story, Text, Character, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table, Document, Layer, Page, Button or InsertionPoint
IsolateBlending
Boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
ItemLayer
Layer
read/write
he layer containing the page item.
KnockoutGroup
Boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout Group option in the Transparency palette.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
LetLineEnd
1506
Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Visual Basic Reference
InDesign CS Scripting Guide
Property: LocalDisplaySetting
Type: Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Access:
Description:
read/write
he display setting for this page item.
Locked
Boolean
read/write
If true, the page item is locked.
MiterLimit
Double
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
Movies
Movies
read only
Every movie
Nonprinting
Boolean
read/write
If true, the page item is non-printing.
Opacity
Double
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the page item will overprint.
OverprintGap
Boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
OverprintStroke
Boolean
read/write
If true, overprint the stroke of the page item.
Overridden
Boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
OverriddenMasterPageItem
PageItem
read only
A reference to the master page item linked to the page item (if any).
PageItems
PageItems
read only
All page items
Parent
Variant
read only
he parent of the page item.
Paths
Paths
read only
All paths
PDFs
PDFs
read only
PDFs
PICTs
PICTs
read only
PICTs
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
RightLineEnd
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
InDesign CS Scripting Guide Visual Basic Reference 1507
Property:
Type:
Access:
Description:
RotationAngle
Double
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
ShadowBlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ShadowBlurRadius
Double
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
ShadowColor
Swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the Color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
ShadowMode
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
ShadowOpacity
Double
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
ShadowXOffset
Double
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
ShadowYOffset
Double
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
ShearAngle
Double
read/write
he shear angle applied to the page item.
Sounds
Sounds
read only
Every sound
1508
Visual Basic Reference
InDesign CS Scripting Guide
Property: StrokeAlignment
StrokeColor StrokeCornerAdjustment
Type: Name:
Decimal:
idStrokeAlignment.idCenterAlignment
1936998723
idStrokeAlignment.idInsideAlignment
1936998729
idStrokeAlignment.idOutsideAlignment
1936998735
Variant Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
Access:
Description:
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
StrokeDashAndGap
Variant
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
StrokeTint
Double
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
StrokeType
StrokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
StrokeWeight
Double
read/write
he weight (in points) of the stroke applied to the page item.
TextFrames
TextFrames
read only
Text Frames
TextPaths
TextPaths
read only
All text paths
TextWrapPreferences
TextWrapPreference
read only
he text wrap applied to the page item.
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
WMFs
WMFs
read only
WMFs
Methods Method: AddPath
Parameters: Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
PageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
PageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
ExcludeOverlapPath
Name:
Type:
Description:
With
Objects
he objects to exclude.
InDesign CS Scripting Guide Visual Basic Reference 1509
Method: Export
ExtractLabel
Fit
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
IntersectPath
1510
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
Name:
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
he objects to intersect with.
InDesign CS Scripting Guide
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
PageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
he fit option.
Name:
Visual Basic Reference
Return:
Method:
Parameters:
MakeCompoundPath
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Markup
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element in which to insert the incoming XML elements.
MinusBack
Move
Override
Place
PlaceXML
ReleaseCompoundPath
None
Return:
Description:
PageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound Paths>Make command.
Nothing
Markup layout content with XML preserving the existing content.
PageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
PageItem
Overrides an item from the master page and places it on the page.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
Objects
Releases a compound path and returns the released page items. Corresponds to the Object>Compound Path>Release menu option.
InDesign CS Scripting Guide Visual Basic Reference 1511
Method:
Parameters:
Return:
Description:
RemoveOverride
None
Nothing
Removes a locally overriden master page item
ResetScaling
None
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Resize
1512
Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Rotate
Select
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Rotate the page item.
Nothing
Select this page item.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
InDesign CS Scripting Guide Visual Basic Reference 1513
Method: Shear
Store
SubtractPath
1514
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
PageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
Method: Unlink
Parameters: Name: From
Type: Name:
Description: Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
What to unlink from.
Return:
Description:
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide Visual Basic Reference 1515
PageItems Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of PageItems
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any PageItem.
FirstItem
None
Object
Returns the first PageItem.
Description:
Object
Returns the PageItem with the specified ID.
PageItem
Returns the page items within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he page item at the start of the range, or the index of the page item at the start of the range.
To
Variant
he page item at the end of the range, or the index of the page item at the end of the range.
LastItem
None
Object
Returns the last PageItem.
MiddleItem
None
Object
Returns the middle PageItem.
Object
Returns the next PageItem.
Object
Returns the previous PageItem.
NextItem
PreviousItem
1516
Name:
Type:
Description:
Obj
Object
he PageItem before the one desired.
Name:
Type:
Description:
Obj
Object
he PageItem ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
PageReference Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the PageReference within its parent Topic
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
PageNumberStyleOverride
CharacterStyle
read/write
he style override replacing the standard generation option.
PageReferenceLimit
Variant
read/write
he page reference limit.
read/write
he page reference type.
PageReferenceType
Name:
Decimal:
idPageReferenceType.idCurrentPage
1668444263
idPageReferenceType.idToNextStyleChange
1953395555
idPageReferenceType.idToNextUseOfStyle
1953396083
idPageReferenceType.idToEndOfStory
1701802868
idPageReferenceType.idToEndOfDocument
1701799011
idPageReferenceType.idToEndOfSection
1701802851
idPageReferenceType.idForNextNParagraphs
1718513778
idPageReferenceType.idForNextNPages
1718513767
idPageReferenceType.idSuppressPageNumbers
1852863079
Parent
Topic
read only
he parent of the object.
ParentStory
Story
read only
he story containing the page reference.
StoryOffset
Long
read only
he location of the page reference from the beginning of the story.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1517
PageReferences Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of PageReferences
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
ParentStory
Story
he parent story.
StoryOffset
Variant
Offset within the story as InsertionPoint or Long.
[PageReferenceType]
Description:
Name:
Decimal:
idPageReferenceType. idCurrentPage
1668444263
idPageReferenceType. idToNextStyleChange
1953395555
idPageReferenceType. idToNextUseOfStyle
1953396083
idPageReferenceType. idToEndOfStory
1701802868
idPageReferenceType. idToEndOfDocument
1701799011
idPageReferenceType. idToEndOfSection
1701802851
idPageReferenceType. idForNextNParagraphs
1718513778
idPageReferenceType. idForNextNPages
1718513767
idPageReferenceType. idSuppressPageNumbers
1852863079
Return:
Description:
PageReference
Create a new page reference.
he type of page reference.
[PageReferenceLimit]
Variant
he page range limit as ParagraphStyle or Long.
[PageNumberStyleOverride]
Variant
he style override for the page number as CharacterStyle.
AnyItem
None
Object
Returns any PageReference.
FirstItem
None
Object
Returns the first PageReference.
Object
Returns the PageReference with the specified ID.
ItemByID
1518
Name:
Type:
Id
Long
Visual Basic Reference
InDesign CS Scripting Guide
Description:
Method: ItemByRange
Parameters: Name:
Type:
Description:
From
Variant
he page reference at the start of the range, or the index of the page reference at the start of the range.
To
Variant
he page reference at the end of the range, or the index of the page reference at the end of the range.
Return:
Description:
PageReference
Returns the page references within the specified range.
LastItem
None
Object
Returns the last PageReference.
MiddleItem
None
Object
Returns the middle PageReference.
Object
Returns the next PageReference.
Object
Returns the previous PageReference.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he PageReference before the one desired.
Name:
Type:
Description:
Obj
Object
he PageReference ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1519
Pages Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Pages
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method: Add
Parameters: Name: [At]
[Reference]
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Page
Create a new page.
Location.
Before/ater an existing Page or at the beginning/ end of a parent as Page, Spread, MasterSpread or Document.
AnyItem
None
Object
Returns any Page.
FirstItem
None
Object
Returns the first Page.
Object
Returns the Page with the specified ID.
PackageForGoLivePreference
Returns the pages within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
Name:
Type:
Description:
From
Variant
he package for go live preference at the start of the range, or the index of the package for go live preference at the start of the range.
To
Variant
he package for go live preference at the end of the range, or the index of the package for go live preference at the end of the range.
LastItem
None
Object
Returns the last Page.
MiddleItem
None
Object
Returns the middle Page.
1520
Visual Basic Reference
InDesign CS Scripting Guide
Method: NextItem
PreviousItem
Parameters: Name:
Type:
Description:
Obj
Object
he Page before the one desired.
Name:
Type:
Description:
Obj
Object
he Page ater the one desired.
Return:
Description:
Object
Returns the next Page.
Object
Returns the previous Page.
InDesign CS Scripting Guide Visual Basic Reference 1521
Paragraph Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
Ascent
Variant
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
AssociatedXMLElements
Objects
read only
Returns the associated XML elements
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
Baseline
Variant
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
Buttons
Buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
Characters
Capitalization
Characters
1522
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Characters
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
Descent
Variant
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GradientFillStart
Variant
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
GradientStrokeAngle
Double
read/write
he angle of the gradient applied to the stroke of the text.
GradientStrokeLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
InDesign CS Scripting Guide Visual Basic Reference 1523
Property:
Type:
Access:
Description:
GradientStrokeStart
Variant
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
GraphicLines
GraphicLines
read only
All graphic lines
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
Groups
Groups
read only
Groups
HorizontalOffset
Variant
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Index
Long
read only
Index of the object within its parent object.
InsertionPoints
InsertionPoints
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
1524
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Length
Long
read only
he number of characters in the text object.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Lines
Lines
read only
Lines
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OpenTypeFeatures
Variant
read/write
open type features as Array of Longs
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
InDesign CS Scripting Guide Visual Basic Reference 1525
Property:
Type:
Access:
Description:
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
ParentStory
Story
read only
he story containing the text object.
ParentTextFrame
TextFrame
read only
he text frame containing the text object.
PointSize
Double
read/write
he size of the text in points.
Polygons
Polygons
read only
All polygons
Position
Name:
Decimal:
read/write
he position attribute applied to the text.
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Rectangles
Rectangles
read only
All rectangles
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
1526
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleBelowWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
InDesign CS Scripting Guide Visual Basic Reference 1527
Property: SingleWordJustification
Type: Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Justification for lines containing a single word.
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tables
Tables
read only
All tables
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this Paragraph as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
TextColumns
TextColumns
read only
Text columns
1528
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Words
Words
read only
Words
Methods Method: ApplyStyle
Changecase
Parameters: Name:
Type:
Description:
Using
Variant
he paragraph style or character style to apply.
[ClearingOverrides]
Boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
Using
Name:
Decimal:
idChangecaseMode. idUppercase
1667462499
idChangecaseMode. idLowercase
1667460195
idChangecaseMode. idTitlecase
1667462243
idChangecaseMode. idSentencecase
1667461987
Return:
Description:
Nothing
Apply a paragraph or character style to the text object.
Nothing
Change the case of text.
Case option to use.
InDesign CS Scripting Guide Visual Basic Reference 1529
Method: ConvertToTable
CreateOutlines
Delete Export
1530
Parameters: Name:
Type:
Description:
[Column Separator]
String
he character to interpret as the column separator.
[RowSeparator]
String
he character to interpret as the row separator.
[NumberOfColumns]
Long
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original text.
None Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Table
Convert the text to a table. he parameters for this command correspond to the options in the Convert Text to Table dialog box (select some text and choose Table > Convert Text to Table to display this dialog box).
Objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Nothing
Deletes the object.
Nothing
Exports the object to a file.
Method: Markup
Move
Parameters: Name:
Type:
Description:
Using
XMLElement
he XML element to associate with the text.
Name:
Type:
Description:
To
Place
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Return:
Description:
Nothing
Associate the text with an XML element while preserving the existing text content.
Nothing
Moves the text.
Object
Place a file.
Where to move the text, relative to the reference object (before/ater).
[Reference]
Variant
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
InDesign CS Scripting Guide Visual Basic Reference 1531
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
1532
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Visual Basic Reference
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects text.
Paragraphs Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Paragraphs
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Paragraph.
FirstItem
None
Object
Returns the first Paragraph.
Paragraph
Returns the paragraphs within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he paragraph at the start of the range, or the index of the paragraph at the start of the range.
To
Variant
he paragraph at the end of the range, or the index of the paragraph at the end of the range.
LastItem
None
Object
Returns the last Paragraph.
MiddleItem
None
Object
Returns the middle Paragraph.
Object
Returns the next Paragraph.
Object
Returns the previous Paragraph.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Paragraph before the one desired.
Name:
Type:
Description:
Obj
Object
he Paragraph ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1533
ParagraphStyle Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
BasedOn
Variant
read/write
he paragraph style this style is based on.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
Capitalization
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
1534
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Id
Long
read only
A unique number identifying the object.
Imported
Boolean
read only
Whether this style was imported from another document
Index
Long
read only
Index of the ParagraphStyle within its parent Document or Application
InDesign CS Scripting Guide Visual Basic Reference 1535
Property: Justification
Type: Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Alignment of the paragraph containing the text.
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
Label
String
read/write
A label that can be set to any string
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
1536
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
Name
String
read/write
he name of the paragraph style.
NestedStyles
NestedStyles
read only
Nested styles
NextStyle
ParagraphStyle
read/write
he style of the next paragraph. Note that this property only applies when you are entering text--if you are not entering text, setting this property to a given paragraph style will not affect the style applied to the next paragraph.
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
Parent
Variant
read only
he parent of the object.
PointSize
Double
read/write
he size of the text in points.
read/write
he position attribute applied to the text.
read/write
he right indent applied to the paragraph containing the text.
Position
RightIndent
Name:
Decimal:
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Variant
InDesign CS Scripting Guide Visual Basic Reference 1537
Property:
Type:
Access:
Description:
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
1538
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
RuleBelowWidth
SingleWordJustification
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
InDesign CS Scripting Guide Visual Basic Reference 1539
Property:
Type:
Access:
Description:
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this ParagraphStyle as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
1540
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
ParagraphStyles Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of ParagraphStyles
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
ParagraphStyle
Create a new paragraph style.
AnyItem
None
Object
Returns any ParagraphStyle.
FirstItem
None
Object
Returns the first ParagraphStyle.
Description:
Object
Returns the ParagraphStyle with the specified ID.
ParagraphStyle
Returns the paragraph styles within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he paragraph style at the start of the range, or the index of the paragraph style at the start of the range.
To
Variant
he paragraph style at the end of the range, or the index of the paragraph style at the end of the range.
LastItem
None
Object
Returns the last ParagraphStyle.
MiddleItem
None
Object
Returns the middle ParagraphStyle.
Object
Returns the next ParagraphStyle.
Object
Returns the previous ParagraphStyle.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he ParagraphStyle before the one desired.
Name:
Type:
Description:
Obj
Object
he ParagraphStyle ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1541
PasteboardPreference Properties Property:
Type:
Access:
Description:
BleedGuideColor
Variant
read/write
he color of bleed guides as Array of 3 Doubles or idUIColors
MinimumSpaceAboveAndBelow
Variant
read/write
he minimum space above and below a page.
Parent
Variant
read only
he parent of the object.
PasteboardColor
Variant
read/write
he color of the pasteboard.
PreviewBackgroundColor
Variant
read/write
he color of the preview background as Array of 3 Doubles or idUIColors
SlugGuideColor
Variant
read/write
he color of slug guides as Array of 3 Doubles or idUIColors
1542
Visual Basic Reference
InDesign CS Scripting Guide
Path Properties Property:
Type:
Access:
Description:
EntirePath
Variant
read/write
he positions of all of the anchor points on the path.
Index
Long
read only
Index of the Path within its parent PageItem, Oval, Rectangle, GraphicLine, TextFrame, Polygon, ClippingPathSettings or TextWrapPreference
Parent
Variant
read only
he parent of the object.
PathPoints
PathPoints
read only
All path points
read/write
he path type (open or closed).
PathType
Name:
Decimal:
idPathType.idOpenPath
1869639280
idPathType.idClosedPath
1668051812
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Reverse
None
Nothing
Reverse the path
InDesign CS Scripting Guide Visual Basic Reference 1543
PathPoint Properties Property:
Type:
Access:
Description:
Anchor
Variant
read/write
he location of the anchor point, in page coordinates.
Index
Long
read only
Index of the PathPoint within its parent Path
LetDirection
Variant
read/write
he location of the incoming (let) direction point (or “control handle”).
Parent
Path
read only
he parent of the object.
read/write
he type of the point (corner/smooth).
read/write
he location of the outgoing (right) direction point (or “control handle”).
PointType
RightDirection
Name:
Decimal:
idPointType.idLineType
1818848869
idPointType.idSmooth
1936553064
idPointType.idCorner
1668443762
Variant
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
1544
Visual Basic Reference
InDesign CS Scripting Guide
PathPoints Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of PathPoints
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
PathPoint
Create a new path point.
AnyItem
None
Object
Returns any PathPoint.
FirstItem
None
Object
Returns the first PathPoint.
PathPoint
Returns the path points within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he path point at the start of the range, or the index of the path point at the start of the range.
To
Variant
he path point at the end of the range, or the index of the path point at the end of the range.
LastItem
None
Object
Returns the last PathPoint.
MiddleItem
None
Object
Returns the middle PathPoint.
Object
Returns the next PathPoint.
Object
Returns the previous PathPoint.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he PathPoint before the one desired.
Name:
Type:
Description:
Obj
Object
he PathPoint ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1545
Paths Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Paths
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
Path
Create a new path.
AnyItem
None
Object
Returns any Path.
FirstItem
None
Object
Returns the first Path.
PackageForGoLivePreference
Returns the paths within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he package for go live preference at the start of the range, or the index of the package for go live preference at the start of the range.
To
Variant
he package for go live preference at the end of the range, or the index of the package for go live preference at the end of the range.
LastItem
None
Object
Returns the last Path.
MiddleItem
None
Object
Returns the middle Path.
Object
Returns the next Path.
Object
Returns the previous Path.
NextItem
PreviousItem
1546
Name:
Type:
Description:
Obj
Object
he Path before the one desired.
Name:
Type:
Description:
Obj
Object
he Path ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
PDF Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scale of the page item relative to its containing page item
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item
AbsoluteVerticalScale
Double
read/write
he vertical scale of the page item relative to its containing page item
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he blend mode used to combine the object’s color with the background
BlendMode
ClippingPath FeatherCornerType
FeatherMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ClippingPathSettings Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
read only
he clipping path settings
read/write
he type of feathering to apply
read/write
he feather mode
FeatherWidth
Double
read/write
he width of the feathering
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (Doubles or Strings)
HorizontalScale
Double
read/write
he scale percentage in the horizontal direction
Id
Long
read only
he PDF’s unique id
ImageTypeName
String
read only
he type of image
InDesign CS Scripting Guide Visual Basic Reference 1547
Property:
Type:
Access:
Description:
Index
Long
read only
Index of the PDF within its parent XMLElement, PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
IsolateBlending
Boolean
read/write
Indicates whether the object should blend in isolation
ItemLink
Link
read only
Link to a placed file
KnockoutGroup
Boolean
read/write
Indicates whether the object is a knockout group
Label
String
read/write
A label that can be set to any string
read/write
he display settings for this page item
LocalDisplaySetting
Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Nonprinting
Boolean
read/write
Whether the page item is non-printing
Opacity
Double
read/write
he opacity of the object
Parent
Variant
read only
he PDF’s parent as XMLElement, PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
RotationAngle
Double
read/write
Angle of rotation
read/write
he blend mode to use for drawing the shadow
ShadowBlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ShadowBlurRadius
Double
read/write
he radius of the blur to apply to the shadow
ShadowColor
Swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
Double
read/write
he opacity of the shadow
ShadowXOffset
Double
read/write
he horizontal offset of the shadow
ShadowYOffset
Double
read/write
he vertical offset of the shadow
ShearAngle
Double
read/write
he shear angle of the page item relative to the spread
ShadowMode
ShadowOpacity
1548
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
VerticalScale
Double
read/write
he scale percentage in the vertical direction
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Markup layout content with XML preserving the existing content.
Export
ExtractLabel
InsertLabel
Markup
Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
InDesign CS Scripting Guide Visual Basic Reference 1549
Method: Move
Place
PlaceXML
1550
Parameters: Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
Method: Resize
Parameters: Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Return:
Description:
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
InDesign CS Scripting Guide Visual Basic Reference 1551
Method: Rotate
1552
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Rotate the page item.
Method: Shear
Store
Unlink
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
From
Name:
Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
What to unlink from.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide Visual Basic Reference 1553
PDFExportPreference Properties Property: AcrobatCompatibility
Type: Name:
Decimal:
idAcrobatCompatibility.idAcrobat4
1097020464
idAcrobatCompatibility.idAcrobat5
1097020720
idAcrobatCompatibility.idAcrobat6
1097020976
Access:
Description:
read/write
What version of Acrobat the PDF is compatible with
AppliedFlattenerPreset
FlattenerPreset
read/write
he flattener preset
BleedBottom
Variant
read/write
Amount to image below the defined page size as Unit (Double or String)
BleedInside
Variant
read/write
Amount to image inside the defined page size as Unit (Double or String)
BleedMarks
Boolean
read/write
Adds fine rules that define the amount of extra area to image outside the define page size
BleedOutside
Variant
read/write
Amount to image outside the defined page size as Unit (Double or String)
BleedTop
Variant
read/write
Amount to image above the defined page size as Unit (Double or String)
ChangeSecurityPassword
String
read/write
When changing the security settings of the exported PDF, the user will be asked for this password. You can only set this value. Getting the value will always fail
ColorBars
Boolean
read/write
Adds small squares of color representing the CMYK inks and tints of gray in 10% increments
read/write
Color bitmap compression
read/write
Color bitmap quality
read/write
he kind of resampling to apply to color bitmap images
ColorBitmapCompression
ColorBitmapQuality
ColorBitmapSampling
Name:
Decimal:
idBitmapCompresssion.idNone
1852796517
idBitmapCompresssion.idAutoCompression
1631808880
idBitmapCompresssion.idJPEG
1785751398
idBitmapCompresssion.idZip
2053730371
idBitmapCompresssion.idJPEG2000
1785751346
Name:
Decimal:
idCompressionQuality.idMinimum
1701727598
idCompressionQuality.idLow
1701727351
idCompressionQuality.idMedium
1701727588
idCompressionQuality.idHigh
1701726313
idCompressionQuality.idMaximum
1701727608
idCompressionQuality.idFourBit
1701721186
idCompressionQuality.idEightBit
1701722210
Name:
Decimal:
idSampling.idNone
1852796517
idSampling.idDownsample
1684951917
idSampling.idSubsample
1935823725
idSampling.idBicubicDownsample
1650742125
ColorBitmapSamplingDPI
Long
read/write
he resolution for resampling
ColorTileSize
Long
read/write
Color tile size for JPEG 2000 compression.
1554
Visual Basic Reference
InDesign CS Scripting Guide
Property: CompressionType
CompressTextAndLineArt ContentToEmbed
Type: Name:
Decimal:
idPDFCompressionType.idCompressNone
1131368047
idPDFCompressionType.idCompressStructure
1131369332
idPDFCompressionType.idCompressObjects
1131368290
Boolean Name:
Decimal:
idPDFContentToEmbed.idUseObjectSettings
1164791635
idPDFContentToEmbed.idLinkAll
1164790849
idPDFContentToEmbed.idEmbedAll
1164788076
Access:
Description:
read/write
he type of compression to apply to the PDF file.
read/write
Whether to compress text and line art using ZIP compression
read/write
he interactive content to embed in the PDF file.
CropImagesToFrames
Boolean
read/write
Export only image data that falls within the visible portion of the frame
CropMarks
Boolean
read/write
Adds fine horizontal and vertical rules that define where the page should be trimmed
DisallowChanging
Boolean
read/write
Should the user be disallowed from changing the document
DisallowCopying
Boolean
read/write
Should the user be disallowed from copying items from the exported PDF
DisallowDocumentAssembly
Boolean
read/write
Disallow document assembly in the exported PDF
DisallowExtractionForAccessibility
Boolean
read/write
Disallow the user to extract content for accessibility in the exported PDF
DisallowFormFillIn
Boolean
read/write
Disallow the user to change form fields in the exported PDF
DisallowHiResPrinting
Boolean
read/write
Disallow high resolution printing in the exported PDF
DisallowNotes
Boolean
read/write
Should the user be disallowed from changing notes and form fields in the exported PDF
DisallowPlaintextMetadata
Boolean
read/write
Disallow plaintext metadata in the exported PDF
DisallowPrinting
Boolean
read/write
Should the user be disallowed from printing the exported PDF
ExportGuidesAndGrids
Boolean
read/write
Whether to include visible guides and baseline grids in the PDF
ExportLayers
Boolean
read/write
Whether to include layers in the PDF.
ExportNonprintingObjects
Boolean
read/write
Whether to include non-printing objects in the PDF
ExportReaderSpreads
Boolean
read/write
Whether to export pages together as if they were bound on the same sheet
Generatehumbnails
Boolean
read/write
Generate thumbnails for each page or spread
read/write
Grayscale bitmap compression
GrayscaleBitmapCompression
Name:
Decimal:
idBitmapCompresssion.idNone
1852796517
idBitmapCompresssion.idAutoCompression
1631808880
idBitmapCompresssion.idJPEG
1785751398
idBitmapCompresssion.idZip
2053730371
idBitmapCompresssion.idJPEG2000
1785751346
InDesign CS Scripting Guide Visual Basic Reference 1555
Property:
Access:
Description:
read/write
Grayscale bitmap quality
read/write
he kind of resampling to apply to grayscale bitmap images
Long
read/write
he resolution for resampling
GrayTileSize
Long
read/write
Gray tile size for JPEG 2000 compression.
IgnoreSpreadOverrides
Boolean
read/write
Whether to ignore flattener spread overrides
IncludeBookmarks
Boolean
read/write
Whether to include bookmarks in the PDF
IncludeHyperlinks
Boolean
read/write
Whether to include hyperlinks in the PDF
IncludeICCProfiles
Boolean
read/write
Whether to embed ICC profiles in the exported PDF
IncludeSlugWithPDF
Boolean
read/write
Whether to include the slug area in the PDF.
IncludeStructure
Boolean
read/write
Whether to include structure in the PDF
InteractiveElements
Boolean
read/write
Whether to include interactive elements in the PDF
read/write
Monochrome bitmap compression
read/write
he kind of resampling to apply to monochrome bitmap images
GrayscaleBitmapQuality
GrayscaleBitmapSampling
GrayscaleBitmapSamplingDPI
MonochromeBitmapCompression
MonochromeBitmapSampling
Type: Name:
Decimal:
idCompressionQuality.idMinimum
1701727598
idCompressionQuality.idLow
1701727351
idCompressionQuality.idMedium
1701727588
idCompressionQuality.idHigh
1701726313
idCompressionQuality.idMaximum
1701727608
idCompressionQuality.idFourBit
1701721186
idCompressionQuality.idEightBit
1701722210
Name:
Decimal:
idSampling.idNone
1852796517
idSampling.idDownsample
1684951917
idSampling.idSubsample
1935823725
idSampling.idBicubicDownsample
1650742125
Name:
Decimal:
idMonoBitmapCompression.idNone
1852796517
idMonoBitmapCompression.idCCIT3
1128879155
idMonoBitmapCompression.idCCIT4
1128879156
idMonoBitmapCompression.idZip
2053730371
idMonoBitmapCompression.idRunLength
1919839299
Name:
Decimal:
idSampling.idNone
1852796517
idSampling.idDownsample
1684951917
idSampling.idSubsample
1935823725
idSampling.idBicubicDownsample
1650742125
MonochromeBitmapSamplingDPI
Long
read/write
he resolution for resampling
OmitBitmaps
Boolean
read/write
Replace bitmap images with OPI links
OmitEPS
Boolean
read/write
Replace EPS images with OPI links
OmitPDF
Boolean
read/write
Replace PDF images with OPI links
OpenDocumentPassword
String
read/write
When opening the exported PDF, the user will be asked for this password. You can only set this value. Getting the value will always fail
OptimizePDF
Boolean
read/write
Whether to optimize the exported PDF
1556
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
OutputCondition
Variant
read/write
PDF/X output condition as idOutputCondition or String
PageInformationMarks
Boolean
read/write
Prints the filename, page number, current date and time and color separation name
PageMarksOffset
Variant
read/write
How far from the edge of the page InDesign will draw page marks as Unit (Double or String)
PageRange
Variant
read/write
he range of pages as idPageRange or String
Parent
Application
read only
he PDFExportPreference’s parent
read/write
Specifies how to represent the color information in the exported PDF
read/write
Destination color profile
read/write
he type of PDF printer’s mark to use
read/write
PDF X color profile as idPDFProfileSelector or String
read/write
he weight of the printer mark
PDFColorSpace
PDFDestinationProfile PDFMarkType
PDFXProfile PrinterMarkWeight
Name:
Decimal:
idPDFColorSpace.idRGB
1666336578
idPDFColorSpace.idCMYK
1129142603
idPDFColorSpace.idUnchangedColorSpace
1970161251
String Name:
Decimal:
idMarkTypes.idDefault
1147563124
Variant Name:
Decimal:
idPDFMarkWeight.idP125pt
825374064
idPDFMarkWeight.idP25pt
842346608
idPDFMarkWeight.idP50pt
892350576
idPDFMarkWeight.idP10mm
825257325
idPDFMarkWeight.idP15mm
825585005
idPDFMarkWeight.idP20mm
842034541
idPDFMarkWeight.idP30mm
858811757
RegistrationMarks
Boolean
read/write
Adds small ‘targets’ outside the page area for aligning the different separations
SimulateOverprint
Boolean
read/write
Whether to simulate overprint
Name:
Decimal:
read/write
PDF/X Standards compliance
idPDFXStandards.idNone
1852796517
idPDFXStandards.idPDFX1a2001Standard
1396912481
idPDFXStandards.idPDFX32002Standard
1396922419
StandardsCompliance
SubsetFontsBelow
Long
read/write
he threshold point at which InDesign embeds all characters of a font
hresholdToCompressColor
Long
read/write
Dots per inch threshold which causes color image compression.
hresholdToCompressGray
Long
read/write
Dots per inch threshold which causes gray image compression.
hresholdToCompressMonochrome
Long
read/write
Dots per inch threshold which causes monochrome image compression.
UseDocumentBleedWithPDF
Boolean
read/write
Whether to use the document bleed area in the PDF.
UseSecurity
Boolean
read/write
Whether to use the security settings when exporting a PDF
ViewPDF
Boolean
read/write
Whether to open the PDF file ater exporting
InDesign CS Scripting Guide Visual Basic Reference 1557
PDFExportPreset Properties Property: AcrobatCompatibility
Type: Name:
Decimal:
idAcrobatCompatibility.idAcrobat4
1097020464
idAcrobatCompatibility.idAcrobat5
1097020720
idAcrobatCompatibility.idAcrobat6
1097020976
Access:
Description:
read/write
What version of Acrobat the PDF is compatible with
AppliedFlattenerPreset
FlattenerPreset
read/write
he flattener preset
BleedBottom
Variant
read/write
Amount to image below the defined page size as Unit (Double or String)
BleedInside
Variant
read/write
Amount to image inside the defined page size as Unit (Double or String)
BleedMarks
Boolean
read/write
Adds fine rules that define the amount of extra area to image outside the define page size
BleedOutside
Variant
read/write
Amount to image outside the defined page size as Unit (Double or String)
BleedTop
Variant
read/write
Amount to image above the defined page size as Unit (Double or String)
ColorBars
Boolean
read/write
Adds small squares of color representing the CMYK inks and tints of gray in 10% increments
read/write
Color bitmap compression
read/write
Color bitmap quality
read/write
he kind of resampling to apply to color bitmap images
ColorBitmapCompression
ColorBitmapQuality
ColorBitmapSampling
Name:
Decimal:
idBitmapCompresssion.idNone
1852796517
idBitmapCompresssion.idAutoCompression
1631808880
idBitmapCompresssion.idJPEG
1785751398
idBitmapCompresssion.idZip
2053730371
idBitmapCompresssion.idJPEG2000
1785751346
Name:
Decimal:
idCompressionQuality.idMinimum
1701727598
idCompressionQuality.idLow
1701727351
idCompressionQuality.idMedium
1701727588
idCompressionQuality.idHigh
1701726313
idCompressionQuality.idMaximum
1701727608
idCompressionQuality.idFourBit
1701721186
idCompressionQuality.idEightBit
1701722210
Name:
Decimal:
idSampling.idNone
1852796517
idSampling.idDownsample
1684951917
idSampling.idSubsample
1935823725
idSampling.idBicubicDownsample
1650742125
ColorBitmapSamplingDPI
Long
read/write
he resolution for resampling
ColorTileSize
Long
read/write
Color tile size for JPEG 2000 compression.
1558
Visual Basic Reference
InDesign CS Scripting Guide
Property: CompressionType
CompressTextAndLineArt ContentToEmbed
Type: Name:
Decimal:
idPDFCompressionType.idCompressNone
1131368047
idPDFCompressionType.idCompressStructure
1131369332
idPDFCompressionType.idCompressObjects
1131368290
Boolean Name:
Decimal:
idPDFContentToEmbed.idUseObjectSettings
1164791635
idPDFContentToEmbed.idLinkAll
1164790849
idPDFContentToEmbed.idEmbedAll
1164788076
Access:
Description:
read/write
he type of compression to apply to the PDF file.
read/write
Whether to compress text and line art using ZIP compression
read/write
he interactive content to embed in the PDF file.
CropImagesToFrames
Boolean
read/write
Export only image data that falls within the visible portion of the frame
CropMarks
Boolean
read/write
Adds fine horizontal and vertical rules that define where the page should be trimmed
ExportGuidesAndGrids
Boolean
read/write
Whether to include visible guides and baseline grids in the PDF
ExportLayers
Boolean
read/write
Whether to include layers in the PDF.
ExportNonprintingObjects
Boolean
read/write
Whether to include non-printing objects in the PDF
ExportReaderSpreads
Boolean
read/write
Whether to export pages together as if they were bound on the same sheet
Generatehumbnails
Boolean
read/write
Generate thumbnails for each page or spread
read/write
Grayscale bitmap compression
read/write
Grayscale bitmap quality
read/write
he kind of resampling to apply to grayscale bitmap images
Long
read/write
he resolution for resampling
GrayTileSize
Long
read/write
Gray tile size for JPEG 2000 compression.
IgnoreSpreadOverrides
Boolean
read/write
Whether to ignore flattener spread overrides
IncludeBookmarks
Boolean
read/write
Whether to include bookmarks in the PDF
GrayscaleBitmapCompression
GrayscaleBitmapQuality
GrayscaleBitmapSampling
GrayscaleBitmapSamplingDPI
Name:
Decimal:
idBitmapCompresssion.idNone
1852796517
idBitmapCompresssion.idAutoCompression
1631808880
idBitmapCompresssion.idJPEG
1785751398
idBitmapCompresssion.idZip
2053730371
idBitmapCompresssion.idJPEG2000
1785751346
Name:
Decimal:
idCompressionQuality.idMinimum
1701727598
idCompressionQuality.idLow
1701727351
idCompressionQuality.idMedium
1701727588
idCompressionQuality.idHigh
1701726313
idCompressionQuality.idMaximum
1701727608
idCompressionQuality.idFourBit
1701721186
idCompressionQuality.idEightBit
1701722210
Name:
Decimal:
idSampling.idNone
1852796517
idSampling.idDownsample
1684951917
idSampling.idSubsample
1935823725
idSampling.idBicubicDownsample
1650742125
InDesign CS Scripting Guide Visual Basic Reference 1559
Property:
Type:
Access:
Description:
IncludeHyperlinks
Boolean
read/write
Whether to include hyperlinks in the PDF
IncludeICCProfiles
Boolean
read/write
Whether to embed ICC profiles in the exported PDF
IncludeSlugWithPDF
Boolean
read/write
Whether to include the slug area in the PDF.
IncludeStructure
Boolean
read/write
Whether to include structure in the PDF
Index
Long
read only
Index of the PDFExportPreset within its parent Application
InteractiveElements
Boolean
read/write
Whether to include interactive elements in the PDF
read/write
Monochrome bitmap compression
read/write
he kind of resampling to apply to monochrome bitmap images
MonochromeBitmapCompression
MonochromeBitmapSampling
Name:
Decimal:
idMonoBitmapCompression.idNone
1852796517
idMonoBitmapCompression.idCCIT3
1128879155
idMonoBitmapCompression.idCCIT4
1128879156
idMonoBitmapCompression.idZip
2053730371
idMonoBitmapCompression.idRunLength
1919839299
Name:
Decimal:
idSampling.idNone
1852796517
idSampling.idDownsample
1684951917
idSampling.idSubsample
1935823725
idSampling.idBicubicDownsample
1650742125
MonochromeBitmapSamplingDPI
Long
read/write
he resolution for resampling
Name
String
read/write
he name of the PDFExportPreset
OmitBitmaps
Boolean
read/write
Replace bitmap images with OPI links
OmitEPS
Boolean
read/write
Replace EPS images with OPI links
OmitPDF
Boolean
read/write
Replace PDF images with OPI links
OptimizePDF
Boolean
read/write
Whether to optimize the exported PDF
OutputCondition
Variant
read/write
PDF/X output condition as idOutputCondition or String
PageInformationMarks
Boolean
read/write
Prints the filename, page number, current date and time and color separation name
PageMarksOffset
Variant
read/write
How far from the edge of the page InDesign will draw page marks as Unit (Double or String)
Parent
Application
read only
he PDFExportPreset’s parent
read/write
Specifies how to represent the color information in the exported PDF
read/write
Destination color profile
read/write
he type of PDF printer’s mark to use
read/write
PDF X color profile as idPDFProfileSelector or String
PDFColorSpace
PDFDestinationProfile PDFMarkType
PDFXProfile
1560
Name:
Decimal:
idPDFColorSpace.idRGB
1666336578
idPDFColorSpace.idCMYK
1129142603
idPDFColorSpace.idUnchangedColorSpace
1970161251
String Name:
Decimal:
idMarkTypes.idDefault
1147563124
Variant
Visual Basic Reference
InDesign CS Scripting Guide
Property: PrinterMarkWeight
Type: Name:
Decimal:
idPDFMarkWeight.idP125pt
825374064
idPDFMarkWeight.idP25pt
842346608
idPDFMarkWeight.idP50pt
892350576
idPDFMarkWeight.idP10mm
825257325
idPDFMarkWeight.idP15mm
825585005
idPDFMarkWeight.idP20mm
842034541
idPDFMarkWeight.idP30mm
858811757
Access:
Description:
read/write
he weight of the printer mark
RegistrationMarks
Boolean
read/write
Adds small ‘targets’ outside the page area for aligning the different separations
SimulateOverprint
Boolean
read/write
Whether to simulate overprint
StandardsCompliance
Name:
Decimal:
read/write
PDF/X Standards compliance
idPDFXStandards.idNone
1852796517
idPDFXStandards.idPDFX1a2001Standard
1396912481
idPDFXStandards.idPDFX32002Standard
1396922419
SubsetFontsBelow
Long
read/write
he threshold point at which InDesign embeds all characters of a font
hresholdToCompressColor
Long
read/write
Dots per inch threshold which causes color image compression.
hresholdToCompressGray
Long
read/write
Dots per inch threshold which causes gray image compression.
hresholdToCompressMonochrome
Long
read/write
Dots per inch threshold which causes monochrome image compression.
UseDocumentBleedWithPDF
Boolean
read/write
Whether to use the document bleed area in the PDF.
ViewPDF
Boolean
read/write
Whether to open the PDF file ater exporting
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
InDesign CS Scripting Guide Visual Basic Reference 1561
PDFExportPresets Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of PDFExportPresets
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
PDFExportPreset
Create a new pdf export preset.
AnyItem
None
Object
Returns any PDFExportPreset.
FirstItem
None
Object
Returns the first PDFExportPreset.
PDFExportPreset
Returns the pdf export presets within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he pdf export preset at the start of the range, or the index of the pdf export preset at the start of the range.
To
Variant
he pdf export preset at the end of the range, or the index of the pdf export preset at the end of the range.
LastItem
None
Object
Returns the last PDFExportPreset.
MiddleItem
None
Object
Returns the middle PDFExportPreset.
Object
Returns the next PDFExportPreset.
Object
Returns the previous PDFExportPreset.
NextItem
PreviousItem
1562
Name:
Type:
Description:
Obj
Object
he PDFExportPreset before the one desired.
Name:
Type:
Description:
Obj
Object
he PDFExportPreset ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
PDFPlacePreference Properties Property:
Type:
Access:
Description:
OpenDocumentPassword
String
read/write
When opening the exported PDF, the user will be asked for this password. You can only set this value. Getting the value will always fail
PageNumber
Long
read/write
Which page of the PDF should be placed
Parent
Application
read only
he PDFPlacePreference’s parent
read/write
Specifies how much of the PDF page to place
read/write
Whether the background of the PDF is transparent
PDFCrop
TransparentBackground
Name:
Decimal:
idPDFCrop.idCropContent
1131573315
idPDFCrop.idCropArt
1131573313
idPDFCrop.idCropPDF
1131573328
idPDFCrop.idCropTrim
1131573332
idPDFCrop.idCropBleed
1131573314
idPDFCrop.idCropMedia
1131573325
Boolean
InDesign CS Scripting Guide Visual Basic Reference 1563
PDFs Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of PDFs
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any PDF.
FirstItem
None
Object
Returns the first PDF.
Object
Returns the PDF with the specified ID.
PackageForGoLivePreference
Returns the pd fs within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
Name:
Type:
Description:
From
Variant
he package for go live preference at the start of the range, or the index of the package for go live preference at the start of the range.
To
Variant
he package for go live preference at the end of the range, or the index of the package for go live preference at the end of the range.
LastItem
None
Object
Returns the last PDF.
MiddleItem
None
Object
Returns the middle PDF.
Object
Returns the next PDF.
Object
Returns the previous PDF.
NextItem
PreviousItem
1564
Name:
Type:
Description:
Obj
Object
he PDF before the one desired.
Name:
Type:
Description:
Obj
Object
he PDF ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
PercentCombobox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
EditValue
Double
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the PercentCombobox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
StringList
Variant
read/write
A list of the strings that appear on the menu of the control.
InDesign CS Scripting Guide Visual Basic Reference 1565
PercentComboboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of PercentComboboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
PercentCombobox
Create a new percent combobox.
AnyItem
None
Object
Returns any PercentCombobox.
FirstItem
None
Object
Returns the first PercentCombobox.
Description:
Object
Returns the PercentCombobox with the specified ID.
PercentCombobox
Returns the percent comboboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he percent combobox at the start of the range, or the index of the percent combobox at the start of the range.
To
Variant
he percent combobox at the end of the range, or the index of the percent combobox at the end of the range.
LastItem
None
Object
Returns the last PercentCombobox.
MiddleItem
None
Object
Returns the middle PercentCombobox.
Object
Returns the next PercentCombobox.
Object
Returns the previous PercentCombobox.
NextItem
PreviousItem
1566
Name:
Type:
Description:
Obj
Object
he PercentCombobox before the one desired.
Name:
Type:
Description:
Obj
Object
he PercentCombobox ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
PercentEditbox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
EditValue
Double
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the PercentEditbox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
InDesign CS Scripting Guide Visual Basic Reference 1567
PercentEditboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of PercentEditboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
PercentEditbox
Create a new percent editbox.
AnyItem
None
Object
Returns any PercentEditbox.
FirstItem
None
Object
Returns the first PercentEditbox.
Description:
Object
Returns the PercentEditbox with the specified ID.
PercentEditbox
Returns the percent editboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he percent editbox at the start of the range, or the index of the percent editbox at the start of the range.
To
Variant
he percent editbox at the end of the range, or the index of the percent editbox at the end of the range.
LastItem
None
Object
Returns the last PercentEditbox.
MiddleItem
None
Object
Returns the middle PercentEditbox.
Object
Returns the next PercentEditbox.
Object
Returns the previous PercentEditbox.
NextItem
PreviousItem
1568
Name:
Type:
Description:
Obj
Object
he PercentEditbox before the one desired.
Name:
Type:
Description:
Obj
Object
he PercentEditbox ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
PICT Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scale of the page item relative to its containing page item
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item
AbsoluteVerticalScale
Double
read/write
he vertical scale of the page item relative to its containing page item
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he blend mode used to combine the object’s color with the background
BlendMode
ClippingPath FeatherCornerType
FeatherMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ClippingPathSettings Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
read only
he clipping path settings
read/write
he type of feathering to apply
read/write
he feather mode
FeatherWidth
Double
read/write
he width of the feathering
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (Doubles or Strings)
HorizontalScale
Double
read/write
he scale percentage in the horizontal direction
Id
Long
read only
he PICT’s unique id
ImageTypeName
String
read only
he type of image
InDesign CS Scripting Guide Visual Basic Reference 1569
Property:
Type:
Access:
Description:
Index
Long
read only
Index of the PICT within its parent XMLElement, PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
IsolateBlending
Boolean
read/write
Indicates whether the object should blend in isolation
ItemLink
Link
read only
Link to a placed file
KnockoutGroup
Boolean
read/write
Indicates whether the object is a knockout group
Label
String
read/write
A label that can be set to any string
read/write
he display settings for this page item
LocalDisplaySetting
Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Nonprinting
Boolean
read/write
Whether the page item is non-printing
Opacity
Double
read/write
he opacity of the object
Parent
Variant
read only
he PICT’s parent as XMLElement, PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
RotationAngle
Double
read/write
Angle of rotation
read/write
he blend mode to use for drawing the shadow
ShadowBlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ShadowBlurRadius
Double
read/write
he radius of the blur to apply to the shadow
ShadowColor
Swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
Double
read/write
he opacity of the shadow
ShadowXOffset
Double
read/write
he horizontal offset of the shadow
ShadowYOffset
Double
read/write
he vertical offset of the shadow
ShearAngle
Double
read/write
he shear angle of the page item relative to the spread
ShadowMode
ShadowOpacity
1570
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TextWrapPreferences
TextWrapPreference
read only
he text wrap preferences
VerticalScale
Double
read/write
he scale percentage in the vertical direction
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
Export
ExtractLabel
InsertLabel
Move
Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
InDesign CS Scripting Guide Visual Basic Reference 1571
Method: Place
1572
Parameters: Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Object
Place a file.
Method: Resize
Parameters: Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Return:
Description:
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
InDesign CS Scripting Guide Visual Basic Reference 1573
Method: Rotate
1574
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Rotate the page item.
Method: Shear
Store
Unlink
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
From
Name:
Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
What to unlink from.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide Visual Basic Reference 1575
PICTs Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of PICTs
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any PICT.
FirstItem
None
Object
Returns the first PICT.
Description:
Object
Returns the PICT with the specified ID.
PICT
Returns the pic ts within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he pictt at the start of the range, or the index of the pictt at the start of the range.
To
Variant
he pictt at the end of the range, or the index of the pictt at the end of the range.
LastItem
None
Object
Returns the last PICT.
MiddleItem
None
Object
Returns the middle PICT.
Object
Returns the next PICT.
Object
Returns the previous PICT.
NextItem
PreviousItem
1576
Name:
Type:
Description:
Obj
Object
he PICT before the one desired.
Name:
Type:
Description:
Obj
Object
he PICT ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Polygon Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item.
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item.
AbsoluteVerticalScale
Double
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he type of content
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
BlendMode
ContentType
CornerEffect
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Name:
Decimal:
idContentType.idUnassigned
1970168179
idContentType.idGraphicType
1735553140
idContentType.idTextType
1952412773
Name:
Decimal:
idCornerEffects.idNone
1852796517
idCornerEffects.idRoundedCorner
1667592804
idCornerEffects.idInverseRoundedCorner
1667591798
idCornerEffects.idInsetCorner
1667591795
idCornerEffects.idBevelCorner
1667588726
idCornerEffects.idFancyCorner
1667589742
InDesign CS Scripting Guide Visual Basic Reference 1577
Property:
Type:
Access:
Description:
CornerRadius
Double
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
EndCap
EndJoin
EPSs
Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
EPSs
FeatherCornerType
FeatherMode
Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
FeatherWidth
Double
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
FillTint
Double
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
GapColor
Swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
GapTint
Double
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
GradientFillAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientFillLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
GradientFillStart
Variant
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
1578
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
GradientStrokeAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientStrokeLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
GradientStrokeStart
Variant
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GraphicLines
GraphicLines
read only
All graphic lines
Graphics
Graphics
read only
All graphics
Groups
Groups
read only
Groups
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Images
Images
read only
Images
Index
Long
read only
Index of the Polygon within its parent Spread, MasterSpread, PageItem, Oval, Rectangle, Polygon, GraphicLine, Group, State, Document, Layer, Page, Button, TextFrame, Story, Text, Character, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table or InsertionPoint
IsolateBlending
Boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
ItemLayer
Layer
read/write
he layer containing the page item.
KnockoutGroup
Boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout Group option in the Transparency palette.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
LetLineEnd
Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
InDesign CS Scripting Guide Visual Basic Reference 1579
Property: LocalDisplaySetting
Type: Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Access:
Description:
read/write
he display setting for this page item.
Locked
Boolean
read/write
If true, the page item is locked.
MiterLimit
Double
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
Movies
Movies
read only
Every movie
Nonprinting
Boolean
read/write
If true, the page item is non-printing.
Opacity
Double
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the page item will overprint.
OverprintGap
Boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
OverprintStroke
Boolean
read/write
If true, overprint the stroke of the page item.
Overridden
Boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
OverriddenMasterPageItem
PageItem
read only
A reference to the master page item linked to the page item (if any).
PageItems
PageItems
read only
All page items
Parent
Variant
read only
he parent of the page item.
Paths
Paths
read only
All paths
PDFs
PDFs
read only
PDFs
PICTs
PICTs
read only
PICTs
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
RightLineEnd
1580
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RotationAngle
Double
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
ShadowBlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ShadowBlurRadius
Double
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
ShadowColor
Swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the Color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
ShadowMode
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
ShadowOpacity
Double
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
ShadowXOffset
Double
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
ShadowYOffset
Double
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
ShearAngle
Double
read/write
he shear angle applied to the page item.
Sounds
Sounds
read only
Every sound
InDesign CS Scripting Guide Visual Basic Reference 1581
Property: StrokeAlignment
StrokeColor StrokeCornerAdjustment
Type: Name:
Decimal:
idStrokeAlignment.idCenterAlignment
1936998723
idStrokeAlignment.idInsideAlignment
1936998729
idStrokeAlignment.idOutsideAlignment
1936998735
Variant Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
Access:
Description:
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
StrokeDashAndGap
Variant
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
StrokeTint
Double
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
StrokeType
StrokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
StrokeWeight
Double
read/write
he weight (in points) of the stroke applied to the page item.
TextFrames
TextFrames
read only
Text Frames
TextPaths
TextPaths
read only
All text paths
TextWrapPreferences
TextWrapPreference
read only
he text wrap applied to the page item.
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
WMFs
WMFs
read only
WMFs
Methods Method: AddPath
Parameters: Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
PageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
PageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
ExcludeOverlapPath
1582
Name:
Type:
Description:
With
Objects
he objects to exclude.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Export
ExtractLabel
Fit
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
IntersectPath
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
Name:
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
Return:
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
PageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
he fit option.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
he objects to intersect with.
InDesign CS Scripting Guide Visual Basic Reference 1583
Method:
Parameters:
MakeCompoundPath
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Markup
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
MinusBack
Move
Override
Place
PlaceXML
Return:
Description:
PageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound Paths>Make command.
Nothing
Markup layout content with XML preserving the existing content.
PageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
PageItem
Overrides an item from the master page and places it on the page.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
ReleaseCompoundPath
None
Objects
Releases a compound path and returns the released page items. Corresponds to the Object>Compound Path>Release menu option.
RemoveOverride
None
Nothing
Removes a locally overriden master page item
1584
Visual Basic Reference
InDesign CS Scripting Guide
Method:
Parameters:
Return:
Description:
ResetScaling
None
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Resize
Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
InDesign CS Scripting Guide Visual Basic Reference 1585
Method: Rotate
Select
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Rotate the page item.
Nothing
Select this polygon.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
1586
Visual Basic Reference
InDesign CS Scripting Guide
Method: Shear
Store
SubtractPath
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
PageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
InDesign CS Scripting Guide Visual Basic Reference 1587
Method: Unlink
Parameters: Name: From
1588
Visual Basic Reference
Type: Name:
Description: Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
PolygonPreference Properties Property:
Type:
Access:
Description:
InsetPercentage
Long
read/write
he default star inset percentage for new polygons.
NumberOfSides
Long
read/write
he default number of sides for new polygons.
Parent
Variant
read only
he parent of the object.
InDesign CS Scripting Guide Visual Basic Reference 1589
Polygons Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Polygons
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Layer]
Variant
he layer on which to create the Polygon as Layer.
[NumberOfSides]
Variant
he number of sides for the polygon as Long.
[InsetPercentage]
Variant
he star inset percentage for the polygon as Long.
[At]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Polygon
Create a new polygon.
Location.
Before/ater this Polygon or at the beginning/end of this Document, Spread, Master Spread, Page or Layer as Document, Spread, MasterSpread, Page or Layer.
AnyItem
None
Object
Returns any Polygon.
FirstItem
None
Object
Returns the first Polygon.
Object
Returns the Polygon with the specified ID.
ItemByID
1590
Name:
Type:
Id
Long
Visual Basic Reference
InDesign CS Scripting Guide
Description:
Method: ItemByRange
Parameters: Name:
Type:
Description:
From
Variant
he polygon at the start of the range, or the index of the polygon at the start of the range.
To
Variant
he polygon at the end of the range, or the index of the polygon at the end of the range.
Return:
Description:
Polygon
Returns the polygons within the specified range.
LastItem
None
Object
Returns the last Polygon.
MiddleItem
None
Object
Returns the middle Polygon.
Object
Returns the next Polygon.
Object
Returns the previous Polygon.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Polygon before the one desired.
Name:
Type:
Description:
Obj
Object
he Polygon ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1591
PrinterPreset Properties Property:
Type:
Access:
Description:
AllPrinterMarks
Boolean
read/write
Whether to print all types of printer’s marks
BlackAngle
Double
read/write
he angle of the black ink
BlackFrequency
Double
read/write
he frequency of the black ink
BleedBottom
Variant
read/write
Amount to image below the defined page size as Unit (Double or String)
BleedInside
Variant
read/write
Amount to image inside the defined page size as Unit (Double or String)
BleedMarks
Boolean
read/write
Adds fine rules that define the amount of extra area to image outside the define page size
BleedOutside
Variant
read/write
Amount to image outside the defined page size as Unit (Double or String)
BleedTop
Variant
read/write
Amount to image above the defined page size as Unit (Double or String)
Collating
Boolean
read/write
Should printed copies be collated?
ColorBars
Boolean
read/write
Adds small squares of color representing the CMYK inks and tints of gray in 10% increments
read/write
he color output mode used to print
ColorOutput
Name:
Decimal:
idColorOutputModes.idCompositeLeaveUnchanged
1668107349
idColorOutputModes.idCompositeGray
1668116583
idColorOutputModes.idCompositeRGB
1668108866
idColorOutputModes.idCompositeCMYK
1668105035
idColorOutputModes.idSeparations
1936027745
idColorOutputModes.idInRIPSeparations
1919512691
CompositeAngle
Double
read/write
he angle of the composite gray ink
CompositeFrequency
Double
read/write
he frequency of the composite gray ink
Copies
Long
read/write
he number of copies of a document to be printed
CRD
Variant
read/write
he color-rendering dictionary to use. Either one the CRD enumerations or a CRD name as idColorRenderingDictionary or String
CropMarks
Boolean
read/write
Adds fine horizontal and vertical rules that define where the page should be trimmed
CyanAngle
Double
read/write
he angle of the cyan ink
CyanFrequency
Double
read/write
he frequency of the cyan ink
read/write
he format of data sent to the printer
DataFormat
Name:
Decimal:
idDataFormat.idASCII
1095975753
idDataFormat.idBinary
1114534521
DownloadPPDFonts
Boolean
read/write
Whether to download PPD fonts
FlattenerPresetName
String
read/write
he transparency flattener preset name
1592
Visual Basic Reference
InDesign CS Scripting Guide
Property: Flip
FontDownloading
Type: Name:
Decimal:
idFlip.idNone
1852796517
idFlip.idHorizontal
1752134266
idFlip.idVertical
1986359924
idFlip.idHorizontalAndVertical
1215977068
Name:
Decimal:
idFontDownloading.idNone
1852796517
idFontDownloading.idComplete
2003332197
idFontDownloading.idSubset
1768842098
idFontDownloading.idSubsetLarge
1818325607
Access:
Description:
read/write
he type of flip
read/write
Control how fonts are downloaded to the printer
IgnoreSpreadOverrides
Boolean
read/write
Whether to ignore flattener spread overrides
IncludeSlugToPrint
Boolean
read/write
Whether to include the slug area to print.
Index
Long
read only
Index of the PrinterPreset within its parent Application
read/write
he rendering intent
Intent
Name:
Decimal:
idRenderingIntent.idUseColorSettings
1380541299
idRenderingIntent.idPerceptual
1380544611
idRenderingIntent.idSaturation
1380545377
idRenderingIntent.idRelativeColorimetric
1380545123
idRenderingIntent.idAbsoluteColorimetric
1380540771
MagentaAngle
Double
read/write
he angle of the magenta ink
MagentaFrequency
Double
read/write
he frequency of the magenta ink
read/write
Line weight of the printer’s mark
read/write
Amount to offset the page marks from the edge of the defined page size
read/write
he type of printer’s mark to use
MarkLineWeight
MarkOffset MarkType
Name:
Decimal:
idMarkLineWeight.idP125pt
825374064
idMarkLineWeight.idP25pt
842346608
idMarkLineWeight.idP50pt
892350576
idMarkLineWeight.idP05mm
808807789
idMarkLineWeight.idP07mm
808938861
idMarkLineWeight.idP10mm
825257325
idMarkLineWeight.idP15mm
825585005
idMarkLineWeight.idP20mm
842034541
idMarkLineWeight.idP30mm
858811757
Double Name:
Decimal:
idMarkTypes.idDefault
1147563124
Name
String
read/write
he name of the PrinterPreset
Negative
Boolean
read/write
Whether to print as negative
OmitBitmaps
Boolean
read/write
Replace bitmap images with OPI links
OmitEPS
Boolean
read/write
Replace EPS images with OPI links
OmitPDF
Boolean
read/write
Replace PDF images with OPI links
OPIImageReplacement
Boolean
read/write
Whether to print graphics that are either linked using OPI comments or OPI comments stored in imported EPS files
PageInformationMarks
Boolean
read/write
Prints the filename, page number, current date and time and color separation name
InDesign CS Scripting Guide Visual Basic Reference 1593
Property: PagePosition
Type: Name:
Decimal:
idPagePositions.idUpperLet
1668183118
idPagePositions.idCenterHorizontally
1668183112
idPagePositions.idCenterVertically
1668183126
idPagePositions.idCentered
1668183106
Access:
Description:
read/write
Where to position the page
PaperGap
Double
read/write
he amount of custom paper gap
PaperHeight
Variant
read/write
he custom paper height. Either one of the paper size enumerations or a value as idPaperSize or String
PaperOffset
Double
read/write
he amount of custom paper offset
PaperSize
Variant
read/write
he paper size. Either one of the paper size enumerations or a paper size name as idPaperSizes or String
PaperSizeList
Variant
read only
All available paper sizes as Array of Strings
PaperTransverse
Boolean
read/write
Whether to transverse the paper
PaperWidth
Variant
read/write
he custom paper width. Either one of the paper size enumerations or a value as idPaperSize or Double
Parent
Application
read only
he PrinterPreset’s parent
read/write
he level of PostScript to send to the printer
Variant
read/write
Current PPD. Either one the PPD enumerations or a PPD model name as idPPDValues or String
PPDList
Variant
read only
All available PPDs as Array of Strings
PrintBlack
Boolean
read/write
Whether to print the black ink
PrintBlankPages
Boolean
read/write
Whether to print blank pages
PrintCyan
Boolean
read/write
Whether to print the cyan ink
Printer
Variant
read/write
Current printer. Either to file or a printer name as idPrinter or String
PrinterList
Variant
read only
All available printers as Array of Strings
PrintFile
String
read/write
he path to the file used when printing to disk
PrintGuidesGrids
Boolean
read/write
Whether to print visible guides and baseline grids
PrintMagenta
Boolean
read/write
Whether to print the magenta ink
PrintMasterPages
Boolean
read/write
Whether to print master pages
PrintNonprinting
Boolean
read/write
Whether to print nonprinting objects
Name:
Decimal:
read/write
he orientation of the printed page
idPrintPageOrientation.idPortrait
1751738216
idPrintPageOrientation.idLandscape
2003395685
PostScriptLevel
PPD
PrintPageOrientation
Name:
Decimal:
idPostScriptLevels.idLevel2
1347636274
idPostScriptLevels.idLevel3
1347636275
idPrintPageOrientation.idReversePortrait
1869771376
idPrintPageOrientation.idReverseLandscape
1869771372
PrintSpreads
Boolean
read/write
Whether to print spreads
PrintYellow
Boolean
read/write
Whether to print the yellow ink
Profile
Variant
read/write
he color profile to use. Either one the idProfile enumerations or a profile name as idProfile or String
1594
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RegistrationMarks
Boolean
read/write
Adds small ‘targets’ outside the page area for aligning the different separations
ReverseOrder
Boolean
read/write
Whether to print in reverse order
ScaleHeight
Double
read/write
he percentage of scale to apply to the height of a page when printing
read/write
How to scale the page
ScaleMode
Name:
Decimal:
idScaleModes.idScaleWidthHeight
1935898745
idScaleModes.idScaleToFit
1935897702
ScaleProportional
Boolean
read/write
Whether to scale the width and height proportionally
ScaleWidth
Double
read/write
he percentage of scale to apply to the width of a page when printing
Screening
Variant
read/write
he ink screening to use as idScreeening or String
ScreeningList
Variant
read only
All available ink screenings in the PPD as Array of Strings
read/write
Controls how much image data to send to the printer
read/write
Whether to print odd pages, even pages or both
read/write
Whether to simulate overprint
read/write
he CMS source
SendImageData
Sequence
SimulateOverprint SourceSpace
Name:
Decimal:
idImageDataTypes.idAllImageData
1853058416
idImageDataTypes.idOptimizedSubsampling
1869640563
idImageDataTypes.idProxyImageData
1819243130
idImageDataTypes.idNone
1852796517
Name:
Decimal:
idSequences.idAll
1634495520
idSequences.idOdd
1868850208
idSequences.idEven
1702258030
Boolean Name:
Decimal:
idSourceSpaces.idUseDocument
1967419235
idSourceSpaces.idProofSpace
1886548848
TextAsBlack
Boolean
read/write
Whether to print text as black
humbnails
Boolean
read/write
Whether to print thumbnails
Name:
read/write
humbnails per page.
humbnailsPerPage
Decimal:
idhumbsPerPage.idK1x2
1949399090
idhumbsPerPage.idK2x2
1949464626
idhumbsPerPage.idK3x3
1949530163
idhumbsPerPage.idK4x4
1949595700
idhumbsPerPage.idK5x5
1949661237
idhumbsPerPage.idK6x6
1949726774
idhumbsPerPage.idK7x7
1949792311
Tile
Boolean
read/write
Whether to tile pages
TilingOverlap
Double
read/write
he amount of tiling overlap for Auto or Auto Justified tiling
read/write
he type of tiling
TilingType
Name:
Decimal:
idTilingTypes.idAuto
1635019116
idTilingTypes.idAutoJustified
1634366324
idTilingTypes.idManual
1835955308
InDesign CS Scripting Guide Visual Basic Reference 1595
Property: Trapping
Type: Name:
Decimal:
idTrapping.idOff
1330005536
idTrapping.idApplicationBuiltin
1114199152
idTrapping.idAdobeInRIP
1919512660
Access:
Description:
read/write
he type of trapping
UseDocumentBleedToPrint
Boolean
read/write
Whether to use the document bleed area to print.
YellowAngle
Double
read/write
he angle of the yellow ink
YellowFrequency
Double
read/write
he frequency of the yellow ink
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
1596
Visual Basic Reference
InDesign CS Scripting Guide
PrinterPresets Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of PrinterPresets
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
PrinterPreset
Create a new printer preset.
AnyItem
None
Object
Returns any PrinterPreset.
FirstItem
None
Object
Returns the first PrinterPreset.
PrinterPreset
Returns the printer presets within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he printer preset at the start of the range, or the index of the printer preset at the start of the range.
To
Variant
he printer preset at the end of the range, or the index of the printer preset at the end of the range.
LastItem
None
Object
Returns the last PrinterPreset.
MiddleItem
None
Object
Returns the middle PrinterPreset.
Object
Returns the next PrinterPreset.
Object
Returns the previous PrinterPreset.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he PrinterPreset before the one desired.
Name:
Type:
Description:
Obj
Object
he PrinterPreset ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1597
PrintPreference Properties Property:
Type:
Access:
Description:
ActivePrinterPreset
Variant
read/write
Current preset as idPrinterPresets or PrinterPreset
AllPrinterMarks
Boolean
read/write
If true, print all types of printer’s marks.
BlackAngle
Double
read/write
he haltone screen angle used to prin black ink.
BlackFrequency
Double
read/write
he haltone screen frequency of the black ink.
BleedBottom
Variant
read/write
Bleed amount to add at the bottom of the page.
BleedInside
Variant
read/write
Bleed amount to add at the inside of the page.
BleedMarks
Boolean
read/write
If true, add fine rules that define the bleed area outside the page size.
BleedOutside
Variant
read/write
Bleed amount to add at the outside of the page.
BleedTop
Variant
read/write
Bleed amount to add at the top of the page.
Collating
Boolean
read/write
If true, printed copies will be collated.
ColorBars
Boolean
read/write
If true, print small squares of filled with CMYK inks and tints of gray outside the page area (in the bleed area).
read/write
he color output mode used to print.
ColorOutput
Name:
Decimal:
idColorOutputModes.idCompositeLeaveUnchanged
1668107349
idColorOutputModes.idCompositeGray
1668116583
idColorOutputModes.idCompositeRGB
1668108866
idColorOutputModes.idCompositeCMYK
1668105035
idColorOutputModes.idSeparations
1936027745
idColorOutputModes.idInRIPSeparations
1919512691
CompositeAngle
Double
read/write
he haltone screen angle used to print composite gray ink.
CompositeFrequency
Double
read/write
he haltone screen frequency used to print composite gray ink.
Copies
Long
read/write
he number of copies to print.
CRD
Variant
read/write
he color-rendering dictionary to use. Either one the CRD enumerations or a CRD name as idColorRenderingDictionary or String
CropMarks
Boolean
read/write
If true, InDesign prints fine horizontal and vertical rules that indicate where the page should be trimmed.
CyanAngle
Double
read/write
he haltone screen angle used to print cyan ink.
CyanFrequency
Double
read/write
he haltone screen frequency of the cyan ink.
read/write
he format of data sent to the printer (binary or ASCII).
read/write
Whether to download PPD fonts
DataFormat
DownloadPPDFonts
1598
Name:
Decimal:
idDataFormat.idASCII
1095975753
idDataFormat.idBinary
1114534521
Boolean
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
FlattenerPresetName
String
read/write
he transparency flattener preset name
read/write
he type of flip.
read/write
he method used to download fonts to the printer.
Flip
FontDownloading
Name:
Decimal:
idFlip.idNone
1852796517
idFlip.idHorizontal
1752134266
idFlip.idVertical
1986359924
idFlip.idHorizontalAndVertical
1215977068
Name:
Decimal:
idFontDownloading.idNone
1852796517
idFontDownloading.idComplete
2003332197
idFontDownloading.idSubset
1768842098
idFontDownloading.idSubsetLarge
1818325607
IgnoreSpreadOverrides
Boolean
read/write
If true, ignore flattener spread overrides.
IncludeSlugToPrint
Boolean
read/write
If true, print the slug area.
read/write
he rendering intent.
Intent
Name:
Decimal:
idRenderingIntent.idUseColorSettings
1380541299
idRenderingIntent.idPerceptual
1380544611
idRenderingIntent.idSaturation
1380545377
idRenderingIntent.idRelativeColorimetric
1380545123
idRenderingIntent.idAbsoluteColorimetric
1380540771
MagentaAngle
Double
read/write
he haltone screen angle used to print magenta ink.
MagentaFrequency
Double
read/write
he haltone screen frequency of the magenta ink.
read/write
Line weight of the printer’s marks.
read/write
Amount to offset the page marks from the edge of the defined page size.
read/write
he type of printer’s mark to use.
MarkLineWeight
MarkOffset MarkType
Name:
Decimal:
idMarkLineWeight.idP125pt
825374064
idMarkLineWeight.idP25pt
842346608
idMarkLineWeight.idP50pt
892350576
idMarkLineWeight.idP05mm
808807789
idMarkLineWeight.idP07mm
808938861
idMarkLineWeight.idP10mm
825257325
idMarkLineWeight.idP15mm
825585005
idMarkLineWeight.idP20mm
842034541
idMarkLineWeight.idP30mm
858811757
Double Name:
Decimal:
idMarkTypes.idDefault
1147563124
Negative
Boolean
read/write
If true, print as negative.
OmitBitmaps
Boolean
read/write
If true, omit bitmap images in the PDF (but include OPI link information for the omitted images).
OmitEPS
Boolean
read/write
Replace EPS images with OPI links
OmitPDF
Boolean
read/write
Replace PDF images with OPI links
OPIImageReplacement
Boolean
read/write
Whether to print graphics that are either linked using OPI comments or OPI comments stored in imported EPS files
InDesign CS Scripting Guide Visual Basic Reference 1599
Property:
Type:
Access:
Description:
PageInformationMarks
Boolean
read/write
If true, print the filename, page number, current date and time and color separation name in the bleed area.
read/write
Where to position the page relative to the paper dimensions.
Variant
read/write
he range of pages to print.
PaperGap
Double
read/write
he amount of custom paper gap.
PaperHeight
Variant
read/write
he custom paper height. Either one of the paper size constants or a value.
PaperOffset
Double
read/write
he amount of custom paper offset.
PaperSize
Variant
read/write
he paper size. Either one of the paper size constants or a paper size name.
PaperSizeList
Variant
read only
A list of the names of the available paper sizes.
PaperTransverse
Boolean
read/write
If true, rotate the image of the page 90 degrees when printing.
PaperWidth
Variant
read/write
he custom paper width. Either one of the paper size constants or a value (in points).
Parent
Variant
read only
he parent of the object.
read/write
he level of PostScript to send to the printer
Variant
read/write
Current PPD. Either one the PPD enumerations or a PPD model name as idPPDValues or String
PPDList
Variant
read only
All available PPDs as Array of Strings
PrintBlack
Boolean
read/write
If true, print the black ink.
PrintBlankPages
Boolean
read/write
If true, print blank pages.
PrintCyan
Boolean
read/write
If true, print the cyan ink.
Printer
Variant
read/write
he current printer. Either to file or a printer name.
PrinterList
Variant
read only
A list of the names of available printers.
PrintFile
String
read/write
he path to the file used when printing to disk.
PrintGuidesGrids
Boolean
read/write
If true, print visible guides and baseline grids.
PrintMagenta
Boolean
read/write
If true, print the magenta ink.
PrintMasterPages
Boolean
read/write
If true, print master pages.
PrintNonprinting
Boolean
read/write
If true, print non-printing objects.
Name:
Decimal:
read/write
he orientation of the printed page.
idPrintPageOrientation.idPortrait
1751738216
idPrintPageOrientation.idLandscape
2003395685
PagePosition
PageRange
PostScriptLevel
PPD
PrintPageOrientation
Name:
Decimal:
idPagePositions.idUpperLet
1668183118
idPagePositions.idCenterHorizontally
1668183112
idPagePositions.idCenterVertically
1668183126
idPagePositions.idCentered
1668183106
Name:
Decimal:
idPostScriptLevels.idLevel2
1347636274
idPostScriptLevels.idLevel3
1347636275
idPrintPageOrientation.idReversePortrait
1869771376
idPrintPageOrientation.idReverseLandscape
1869771372
PrintSpreads
Boolean
read/write
If true, print spreads.
PrintYellow
Boolean
read/write
If true, print the yellow ink.
Profile
Variant
read/write
he color profile to use. Either one the idProfile constants or a profile name.
1600
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RegistrationMarks
Boolean
read/write
If true, add small ‘targets’ outside the page area for aligning separations.
ReverseOrder
Boolean
read/write
If true, print in reverse order.
ScaleHeight
Double
read/write
he vertical scaling percentage to apply when printing.
read/write
he method used to scale the page.
ScaleMode
Name:
Decimal:
idScaleModes.idScaleWidthHeight
1935898745
idScaleModes.idScaleToFit
1935897702
ScaleProportional
Boolean
read/write
If true, scale the width and height proportionally when printing.
ScaleWidth
Double
read/write
he horizontal scaling percentage to apply when printing.
Screening
Variant
read/write
he ink screening to use.
ScreeningList
Variant
read only
A list of the names of the available ink screenings in the PPD.
read/write
Sets the method used to transmit image data to the printer.
read/write
Whether to print odd pages, even pages or both.
read/write
If true, simulate overprinting in the printed document.
read/write
he CMS source.
SendImageData
Sequence
SimulateOverprint SourceSpace
Name:
Decimal:
idImageDataTypes.idAllImageData
1853058416
idImageDataTypes.idOptimizedSubsampling
1869640563
idImageDataTypes.idProxyImageData
1819243130
idImageDataTypes.idNone
1852796517
Name:
Decimal:
idSequences.idAll
1634495520
idSequences.idOdd
1868850208
idSequences.idEven
1702258030
Boolean Name:
Decimal:
idSourceSpaces.idUseDocument
1967419235
idSourceSpaces.idProofSpace
1886548848
TextAsBlack
Boolean
read/write
If true, print all text in black.
humbnails
Boolean
read/write
If true, print thumbnails.
Name:
read/write
humbnails per page.
humbnailsPerPage
Decimal:
idhumbsPerPage.idK1x2
1949399090
idhumbsPerPage.idK2x2
1949464626
idhumbsPerPage.idK3x3
1949530163
idhumbsPerPage.idK4x4
1949595700
idhumbsPerPage.idK5x5
1949661237
idhumbsPerPage.idK6x6
1949726774
idhumbsPerPage.idK7x7
1949792311
Tile
Boolean
read/write
If true, tile pages when printing.
TilingOverlap
Double
read/write
he amount of tiling overlap for Auto or Auto Justified tiling.
read/write
he type of tiling to use when printing.
TilingType
Name:
Decimal:
idTilingTypes.idAuto
1635019116
idTilingTypes.idAutoJustified
1634366324
idTilingTypes.idManual
1835955308
InDesign CS Scripting Guide Visual Basic Reference 1601
Property: Trapping
Type: Name:
Decimal:
idTrapping.idOff
1330005536
idTrapping.idApplicationBuiltin
1114199152
idTrapping.idAdobeInRIP
1919512660
Access:
Description:
read/write
he type of trapping to use.
UseDocumentBleedToPrint
Boolean
read/write
If true, print the document bleed area.
YellowAngle
Double
read/write
he haltone screen angle used to print yellow ink.
YellowFrequency
Double
read/write
he frequency of the yellow ink
1602
Visual Basic Reference
InDesign CS Scripting Guide
QuitBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the QuitBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the quit behavior.
Parent
Variant
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1603
QuitBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of QuitBehaviors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
QuitBehavior
Create a new quit behavior.
AnyItem
None
Object
Returns any QuitBehavior.
FirstItem
None
Object
Returns the first QuitBehavior.
Description:
Object
Returns the QuitBehavior with the specified ID.
QuitBehavior
Returns the quit behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he quit behavior at the start of the range, or the index of the quit behavior at the start of the range.
To
Variant
he quit behavior at the end of the range, or the index of the quit behavior at the end of the range.
LastItem
None
Object
Returns the last QuitBehavior.
MiddleItem
None
Object
Returns the middle QuitBehavior.
Object
Returns the next QuitBehavior.
Object
Returns the previous QuitBehavior.
NextItem
PreviousItem
1604
Name:
Type:
Description:
Obj
Object
he QuitBehavior before the one desired.
Name:
Type:
Description:
Obj
Object
he QuitBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
RadiobuttonControl Properties Property:
Type:
Access:
Description:
CheckedState
Boolean
read/write
If true, the radiobutton control is checked.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the RadiobuttonControl within its parent RadiobuttonGroup
MinWidth
Double
read/write
he minimum width of the control.
Parent
RadiobuttonGroup
read only
he parent of the object.
StaticLabel
String
read/write
he static text label of the radiobutton control.
InDesign CS Scripting Guide Visual Basic Reference 1605
RadiobuttonControls Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of RadiobuttonControls
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
RadiobuttonControl
Create a new radiobutton control.
AnyItem
None
Object
Returns any RadiobuttonControl.
FirstItem
None
Object
Returns the first RadiobuttonControl.
Description:
Object
Returns the RadiobuttonControl with the specified ID.
RadiobuttonControl
Returns the radiobutton controls within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he radiobutton control at the start of the range, or the index of the radiobutton control at the start of the range.
To
Variant
he radiobutton control at the end of the range, or the index of the radiobutton control at the end of the range.
LastItem
None
Object
Returns the last RadiobuttonControl.
MiddleItem
None
Object
Returns the middle RadiobuttonControl.
Object
Returns the next RadiobuttonControl.
Object
Returns the previous RadiobuttonControl.
NextItem
PreviousItem
1606
Name:
Type:
Description:
Obj
Object
he RadiobuttonControl before the one desired.
Name:
Type:
Description:
Obj
Object
he RadiobuttonControl ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
RadiobuttonGroup Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the RadiobuttonGroup within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
RadiobuttonControls
RadiobuttonControls
read only
All radio button controls
SelectedButton
Long
read/write
he index of the selected radiobutton control in the group.
InDesign CS Scripting Guide Visual Basic Reference 1607
RadiobuttonGroups Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of RadiobuttonGroups
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
RadiobuttonGroup
Create a new radiobutton group.
AnyItem
None
Object
Returns any RadiobuttonGroup.
FirstItem
None
Object
Returns the first RadiobuttonGroup.
Description:
Object
Returns the RadiobuttonGroup with the specified ID.
RadiobuttonGroup
Returns the radiobutton groups within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he radiobutton group at the start of the range, or the index of the radiobutton group at the start of the range.
To
Variant
he radiobutton group at the end of the range, or the index of the radiobutton group at the end of the range.
LastItem
None
Object
Returns the last RadiobuttonGroup.
MiddleItem
None
Object
Returns the middle RadiobuttonGroup.
Object
Returns the next RadiobuttonGroup.
Object
Returns the previous RadiobuttonGroup.
NextItem
PreviousItem
1608
Name:
Type:
Description:
Obj
Object
he RadiobuttonGroup before the one desired.
Name:
Type:
Description:
Obj
Object
he RadiobuttonGroup ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
RealCombobox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
EditValue
Double
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the RealCombobox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
StringList
Variant
read/write
A list of the strings that appear on the menu of the control.
InDesign CS Scripting Guide Visual Basic Reference 1609
RealComboboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of RealComboboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
RealCombobox
Create a new real combobox.
AnyItem
None
Object
Returns any RealCombobox.
FirstItem
None
Object
Returns the first RealCombobox.
Description:
Object
Returns the RealCombobox with the specified ID.
RealCombobox
Returns the real comboboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he real combobox at the start of the range, or the index of the real combobox at the start of the range.
To
Variant
he real combobox at the end of the range, or the index of the real combobox at the end of the range.
LastItem
None
Object
Returns the last RealCombobox.
MiddleItem
None
Object
Returns the middle RealCombobox.
Object
Returns the next RealCombobox.
Object
Returns the previous RealCombobox.
NextItem
PreviousItem
1610
Name:
Type:
Description:
Obj
Object
he RealCombobox before the one desired.
Name:
Type:
Description:
Obj
Object
he RealCombobox ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
RealEditbox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
EditValue
Double
read/write
Real number value of the editbox or combobox. For measurement controls, this value is in points. For percentage controls, a value of 100 equals 100%
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the RealEditbox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
LargeNudge
Double
read/write
he amount that the value of the control changes when you hold down Shit and press the uo or down arrow keys (while editing the value in the control). If you do not set a value for this property, the value of the control will not change when you hold down Shit and press the up or down arrow keys.
MaximumValue
Double
read/write
he maximum value for this control.
MinimumValue
Double
read/write
he minimum value for this control.
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
SmallNudge
Double
read/write
he amount that the value of the control changes when you press the up and down arrow keys while editing the value in the control. If you do not set a value for this property, the value of the control will not change when you press the up or down arrow keys.
InDesign CS Scripting Guide Visual Basic Reference 1611
RealEditboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of RealEditboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
RealEditbox
Create a new real editbox.
AnyItem
None
Object
Returns any RealEditbox.
FirstItem
None
Object
Returns the first RealEditbox.
Description:
Object
Returns the RealEditbox with the specified ID.
RealEditbox
Returns the real editboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he real editbox at the start of the range, or the index of the real editbox at the start of the range.
To
Variant
he real editbox at the end of the range, or the index of the real editbox at the end of the range.
LastItem
None
Object
Returns the last RealEditbox.
MiddleItem
None
Object
Returns the middle RealEditbox.
Object
Returns the next RealEditbox.
Object
Returns the previous RealEditbox.
NextItem
PreviousItem
1612
Name:
Type:
Description:
Obj
Object
he RealEditbox before the one desired.
Name:
Type:
Description:
Obj
Object
he RealEditbox after the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Rectangle Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item.
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item.
AbsoluteVerticalScale
Double
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
read/write
he type of content
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
BlendMode
ContentType
CornerEffect
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Name:
Decimal:
idContentType.idUnassigned
1970168179
idContentType.idGraphicType
1735553140
idContentType.idTextType
1952412773
Name:
Decimal:
idCornerEffects.idNone
1852796517
idCornerEffects.idRoundedCorner
1667592804
idCornerEffects.idInverseRoundedCorner
1667591798
idCornerEffects.idInsetCorner
1667591795
idCornerEffects.idBevelCorner
1667588726
idCornerEffects.idFancyCorner
1667589742
InDesign CS Scripting Guide Visual Basic Reference 1613
Property:
Type:
Access:
Description:
CornerRadius
Double
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
EPSs
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
EndCap
EndJoin
EPSs
Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
EPSs
FeatherCornerType
FeatherMode
Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
FeatherWidth
Double
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
FillTint
Double
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
GapColor
Swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
GapTint
Double
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
GradientFillAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientFillLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
GradientFillStart
Variant
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
1614
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
GradientStrokeAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientStrokeLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
GradientStrokeStart
Variant
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GraphicLines
GraphicLines
read only
All graphic lines
Graphics
Graphics
read only
All graphics
Groups
Groups
read only
Groups
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Images
Images
read only
Images
Index
Long
read only
Index of the Rectangle within its parent Spread, MasterSpread, PageItem, Oval, Rectangle, Polygon, GraphicLine, Group, State, Document, Layer, Page, Button, TextFrame, Story, Text, Character, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table or InsertionPoint
IsolateBlending
Boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
ItemLayer
Layer
read/write
he layer containing the page item.
KnockoutGroup
Boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout Group option in the Transparency palette.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
LetLineEnd
Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
InDesign CS Scripting Guide Visual Basic Reference 1615
Property: LocalDisplaySetting
Type: Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Access:
Description:
read/write
he display setting for this page item.
Locked
Boolean
read/write
If true, the page item is locked.
MiterLimit
Double
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
Movies
Movies
read only
Every movie
Nonprinting
Boolean
read/write
If true, the page item is non-printing.
Opacity
Double
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the page item will overprint.
OverprintGap
Boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
OverprintStroke
Boolean
read/write
If true, overprint the stroke of the page item.
Overridden
Boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
OverriddenMasterPageItem
PageItem
read only
A reference to the master page item linked to the page item (if any).
PageItems
PageItems
read only
All page items
Parent
Variant
read only
he parent of the page item.
Paths
Paths
read only
All paths
PDFs
PDFs
read only
PDFs
PICTs
PICTs
read only
PICTs
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
Name:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
RightLineEnd
1616
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RotationAngle
Double
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
ShadowBlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ShadowBlurRadius
Double
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
ShadowColor
Swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the Color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
ShadowMode
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
ShadowOpacity
Double
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
ShadowXOffset
Double
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
ShadowYOffset
Double
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
ShearAngle
Double
read/write
he shear angle applied to the page item.
Sounds
Sounds
read only
Every sound
InDesign CS Scripting Guide Visual Basic Reference 1617
Property: StrokeAlignment
StrokeColor StrokeCornerAdjustment
Type: Name:
Decimal:
idStrokeAlignment.idCenterAlignment
1936998723
idStrokeAlignment.idInsideAlignment
1936998729
idStrokeAlignment.idOutsideAlignment
1936998735
Variant Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
Access:
Description:
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
StrokeDashAndGap
Variant
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
StrokeTint
Double
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
StrokeType
StrokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
StrokeWeight
Double
read/write
he weight (in points) of the stroke applied to the page item.
TextFrames
TextFrames
read only
Text Frames
TextPaths
TextPaths
read only
All text paths
TextWrapPreferences
TextWrapPreference
read only
he text wrap applied to the page item.
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
WMFs
WMFs
read only
WMFs
Methods Method: AddPath
Parameters: Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
PageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add).
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
PageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
ExcludeOverlapPath
1618
Name:
Type:
Description:
With
Objects
he objects to exclude.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Export
ExtractLabel
Fit
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
IntersectPath
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
Name:
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
Return:
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
PageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
he fit option.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
he objects to intersect with.
InDesign CS Scripting Guide Visual Basic Reference 1619
Method:
Parameters:
MakeCompoundPath
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Markup
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
MinusBack
Move
Override
Place
PlaceXML
Return:
Description:
PageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound Paths>Make command.
Nothing
Markup layout content with XML preserving the existing content.
PageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
PageItem
Overrides an item from the master page and places it on the page.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
ReleaseCompoundPath
None
Objects
Releases a compound path and returns the released page items. Corresponds to the Object>Compound Path>Release menu option.
RemoveOverride
None
Nothing
Removes a locally overriden master page item
1620
Visual Basic Reference
InDesign CS Scripting Guide
Method:
Parameters:
Return:
Description:
ResetScaling
None
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Resize
Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
InDesign CS Scripting Guide Visual Basic Reference 1621
Method: Rotate
Select
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Rotate the page item.
Nothing
Select this rectangle.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
1622
Visual Basic Reference
InDesign CS Scripting Guide
Method: Shear
Store
SubtractPath
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
PageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
InDesign CS Scripting Guide Visual Basic Reference 1623
Method: Unlink
Parameters: Name: From
1624
Visual Basic Reference
Type: Name:
Description: Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
Rectangles Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Rectangles
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Layer]
Variant
he layer on which to create the Rectangle as Layer.
[At]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Rectangle
Create a new rectangle.
Location.
Before/ater this Rectangle or at the beginning/end of this Document, Spread, Master Spread, Page or Layer as Document, Spread, MasterSpread, Page or Layer.
AnyItem
None
Object
Returns any Rectangle.
FirstItem
None
Object
Returns the first Rectangle.
Description:
Object
Returns the Rectangle with the specified ID.
Rectangle
Returns the rectangles within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he rectangle at the start of the range, or the index of the rectangle at the start of the range.
To
Variant
he rectangle at the end of the range, or the index of the rectangle at the end of the range.
LastItem
None
Object
Returns the last Rectangle.
MiddleItem
None
Object
Returns the middle Rectangle.
InDesign CS Scripting Guide Visual Basic Reference 1625
Method: NextItem
PreviousItem
1626
Parameters: Name:
Type:
Description:
Obj
Object
he Rectangle before the one desired.
Name:
Type:
Description:
Obj
Object
he Rectangle ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Object
Returns the next Rectangle.
Object
Returns the previous Rectangle.
Row Properties Property:
Type:
Access:
Description:
AutoGrow
Boolean
read/write
If true, the cell will expand to display its content.
BottomEdgeStrokeColor
Swatch
read/write
he stroke color of the bottom edge of the cell.
BottomEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the bottom edge of the cell.
BottomEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the bottom edge of the cell.
BottomEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the bottom edge of the cell (-1 indicates 100%, or no tint override).
BottomEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the bottom edge of the cell.
BottomEdgeStrokePriority
Long
read/write
he stroke priority of the bottom edge
BottomEdgeStrokeTint
Double
read/write
he tint applied to the stroke of the bottom edge of the cell (-1 indicates 100%, or no tint override).
BottomEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the bottom edge of the cell.
BottomEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the bottom edge of the cell.
BottomInset
Variant
read/write
he bottom inset the cell.
Cells
Cells
read only
Cells
ClipContentToCell
Boolean
read/write
If true, clip the content of the cell to the boundaries of the cell.
Columns
Columns
read only
All columns
ColumnSpan
Long
read only
he number of columns that this cell spans
Contents
Variant
read/write
he text contents of the cell.
DiagonalLineInFront
Boolean
read/write
If true, the diagonal line will draw in front of the contents of the cell.
DiagonalLineStrokeColor
Swatch
read/write
he stroke color of the diagonal line(s) applied to the cell.
DiagonalLineStrokeGapColor
Swatch
read/write
he gap color of the diagonal line(s).
DiagonalLineStrokeGapOverprint
Boolean
read/write
If true, overprint the color of the gap of the diagonal line(s).
DiagonalLineStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
DiagonalLineStrokeOverprint
Boolean
read/write
If true, overprint the diagonal line(s) applied to the cell.
DiagonalLineStrokeTint
Double
read/write
he tint applied to the stroke of the diagonal line(s) of the cell (-1 indicates 100%, or no tint override).
DiagonalLineStrokeType
StrokeStyle
read/write
he type of stroke applied to the diagonal line(s) of the cell.
DiagonalLineStrokeWeight
Variant
read/write
he stroke weight of the diagonal line(s) of the cell.
InDesign CS Scripting Guide Visual Basic Reference 1627
Property:
Type:
Access:
Description:
FillColor
Variant
read/write
he swatch, color, gradient, tint, or mixed ink applied to the fill of the cell.
FillTint
Double
read/write
he tint percentage applied to the fill of the cell (-1 indicates 100%, or no tint override).
read/write
he method used to calculate the distance from the first baseline of text in the cell and the top inset of the cell.
FirstBaselineOffset
Name:
Decimal:
idFirstBaseline.idAscentOffset
1296135023
idFirstBaseline.idCapHeight
1296255087
idFirstBaseline.idLeadingOffset
1296852079
idFirstBaseline.idEmboxHeight
1296386159
idFirstBaseline.idXHeight
1299728495
idFirstBaseline.idFixedHeight
1296451695
GradientFillAngle
Double
read/write
Angle of a linear gradient on the fill
GradientFillLength
Double
read/write
Length of ramp for a linear gradient or radius of a radial gradient on the fill
GradientFillStart
Variant
read/write
Center point for a radial gradient or starting point for a linear gradient on the fill
Height
Variant
read/write
he height of the cell.
Index
Long
read only
Index of the cell within its parent table.
InnerColumnStrokeColor
Swatch
read/write
he stroke color of the inner column of the cell.
InnerColumnStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the inner column of the cell.
InnerColumnStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the inner column of the cell.
InnerColumnStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the inner column of the cell (-1 indicates 100%, or no tint override).
InnerColumnStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the inner column of the cell.
InnerColumnStrokeTint
Double
read/write
he tint applied to the stroke of the inner column of the cell (-1 indicates 100%, or no tint override).
InnerColumnStrokeType
StrokeStyle
read/write
he type of stroke applied to the inner column of the cell.
InnerColumnStrokeWeight
Variant
read/write
he width of the stroke applied to the the inner column of the cell.
InnerRowStrokeColor
Swatch
read/write
he stroke color of the inner row of the cell.
InnerRowStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the inner row of the cell.
InnerRowStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the inner row
InnerRowStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the inner row of the cell (-1 indicates 100%, or no tint override).
InnerRowStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the inner row of the cell.
InnerRowStrokeTint
Double
read/write
he tint applied to the stroke of the inner row of the cell (-1 indicates 100%, or no tint override).
InnerRowStrokeType
StrokeStyle
read/write
he type of stroke applied to the inner row of the cell.
1628
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
InnerRowStrokeWeight
Variant
read/write
he width of the stroke applied to the the inner row of the cell.
KeepWithNextRow Boolean
read/write
If true, keep this row with the next row when the rows break between pages, text frames, or text columns.
LetEdgeStrokeColor
Swatch
read/write
he stroke color of the let edge of the cell.
LetEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the let edge of the cell.
LetEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the let edge of the cell.
LetEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the let edge of the cell (-1 indicates 100%, or no tint override).
LetEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the let edge of the cell.
LetEdgeStrokePriority
Long
read/write
he stroke priority of the let edge
LetEdgeStrokeTint
Double
read/write
he tint of the color of the let edge
LetEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the let edge of the cell.
LetEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the let edge of the cell.
LetInset
Variant
read/write
he let inset of the cell.
MaximumHeight
Variant
read/write
Specifies the maximum height of the row containing the cell.
MinimumFirstBaselineOffset
Variant
read/write
he minimum distance (in points) between the first baseline of the text in the cell and the top inset of the frame or cell.
MinimumHeight
Variant
read/write
Constrains the row height to an amount no smaller than this value. he row may be larger than this amount, however, as the row height will continue to grow automatically as text is added.
Name
String
read only
he name of the cell, in the form row number; column number. he third cell of the fourth row, for example, would have the name “R4:C3”.
Overflows
Boolean
read only
If true, the cell contains overset (i.e., uncomposed) text.
OverprintFill
Boolean
read/write
If true, overprint the fill of the cell.
ParagraphSpacingLimit
Variant
read/write
When the vertical justification of the cell is set to justified, this is the maximum amount of space that will be added between paragraphs. Increase this value to encourage spacing between paragraphs of vertically justified text; decrease it to increase the leading between lines of text in vertically justified text.
Parent
Variant
read only
he parent of the object.
ParentColumn
Column
read only
he parent column of the cell.
ParentRow
Row
read only
he parent row of the cell.
RightEdgeStrokeColor
Swatch
read/write
he stroke color of the right edge of the cell.
RightEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the right edge of the cell.
InDesign CS Scripting Guide Visual Basic Reference 1629
Property:
Type:
Access:
Description:
RightEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the right edge of the cell.
RightEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the right edge of the cell (-1 indicates 100%, or no tint override).
RightEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the right edge of the cell.
RightEdgeStrokePriority
Long
read/write
he stroke priority of the right edge
RightEdgeStrokeTint
Double
read/write
he tint applied to the stroke of the right edge of the cell (-1 indicates 100%, or no tint override).
RightEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the right edge of the cell.
RightEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the right edge of the cell.
RightInset
Variant
read/write
he right inset the cell.
RotationAngle
Double
read/write
he rotation angle of the cell.
Rows
Rows
read only
All rows
RowSpan
Long
read only
he number of rows that this cell spans
read/write
he type of the row containing the cell.
read/write
Where to start the row
RowType
StartRow
Name:
Decimal:
idRowTypes.idBodyRow
1161982583
idRowTypes.idHeaderRow
1162375799
idRowTypes.idFooterRow
1162244727
idRowTypes.idMixedState
1162703479
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
TextCellRotationFollowsStoryDirection
Boolean
read/write
Whether text cell direction matches the story direction
TopEdgeStrokeColor
Swatch
read/write
he stroke color of the top edge of the cell.
TopEdgeStrokeGapColor
Swatch
read/write
he gap color of the stroke applied to the top edge of the cell.
TopEdgeStrokeGapOverprint
Boolean
read/write
If true, overprint the color assigned to the gap of the stroke of the top edge of the cell.
TopEdgeStrokeGapTint
Double
read/write
he tint applied to the gap color of the stroke applied to the top edge of the cell (-1 indicates 100%, or no tint override).
TopEdgeStrokeOverprint
Boolean
read/write
If true, overprint the stroke applied to the top edge of the cell.
TopEdgeStrokePriority
Long
read/write
he stroke priority of the top edge
TopEdgeStrokeTint
Double
read/write
he tint applied to the stroke of the top edge of the cell (-1 indicates 100%, or no tint override).
TopEdgeStrokeType
StrokeStyle
read/write
he type of stroke applied to the right edge of the cell.
1630
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TopEdgeStrokeWeight
Variant
read/write
he width of the stroke applied to the the top edge of the cell.
TopInset
Variant
read/write
he top inset the cell.
TopLetDiagonalLine
Boolean
read/write
If true, draw a diagonal line from the top let corner to the bottom right corner of the cell .
TopRightDiagonalLine
Boolean
read/write
If true, draw a diagonal line from the top right corner to the bottom let corner of the cell .
read/write
he vertical justification applied to the text in the cell.
read/write
he width of the cell.
VerticalJustification
Width
Name:
Decimal:
idVerticalJustification.idTopAlign
1953460256
idVerticalJustification.idCenterAlign
1667591796
idVerticalJustification.idBottomAlign
1651471469
idVerticalJustification.idJustifyAlign
1785951334
Variant
Methods Method: CreateOutlines
Delete Merge
Redistribute
Parameters: Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original object.
None Name:
Type:
Description:
With
Cell
he cell to merge with.
Name:
Type:
Description:
Using
[hru]
Name:
Decimal:
idHorizontalOrVertical. idHorizontal
1752134266
idHorizontalOrVertical. idVertical
1986359924
Variant
Return:
Description:
Objects
Create outlines from the text.
Nothing
Deletes the object.
Cell
Merge cells together.
Nothing
Redistribute columns or rows.
which direction to redistribute.
redistribute till this object.
InDesign CS Scripting Guide Visual Basic Reference 1631
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
Split
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Name: Using
Unmerge
1632
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Type:
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
Name:
Decimal:
idHorizontalOrVertical. idHorizontal
1752134266
idHorizontalOrVertical. idVertical
1986359924
InDesign CS Scripting Guide
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Select this row.
Nothing
Split the cell either horizontally or vertically.
Objects
Unmerge the cells.
How to handle the existing selection.
Description:
None
Visual Basic Reference
Description:
Objects
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
Which direction to split.
Rows Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Rows
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method: Add
Parameters: Name: [At]
[Reference]
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Row
Create a new row.
Location.
Before/ater an existing Row or at the beginning/end of a parent as Row or Table.
AnyItem
None
Object
Returns any Row.
FirstItem
None
Object
Returns the first Row.
RadiobuttonControl
Returns the rows within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he radiobutton control at the start of the range, or the index of the radiobutton control at the start of the range.
To
Variant
he radiobutton control at the end of the range, or the index of the radiobutton control at the end of the range.
LastItem
None
Object
Returns the last Row.
MiddleItem
None
Object
Returns the middle Row.
Object
Returns the next Row.
Object
Returns the previous Row.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Row before the one desired.
Name:
Type:
Description:
Obj
Object
he Row ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1633
Section Properties Property:
Type:
Access:
Description:
ContinueNumbering
Boolean
read/write
If true, continue page numbering from the previous section.
Id
Long
read only
A unique number identifying the object.
IncludeSectionPrefix
Boolean
read/write
If true, include the section prefix as part of the page number.
Index
Long
read only
Index of the Section within its parent Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Length
Long
read only
he number of pages in this section
Marker
String
read/write
he section marker.
Name
String
read/write
he name of the section.
PageNumberStart
Long
read/write
he number at which to start numbering pages (active when continue numbering property is set to false).
read/write
he type of numbering to use for page numbers in the section.
PageNumberStyle
Name:
Decimal:
idPageNumberStyle.idUpperRoman
1297247605
idPageNumberStyle.idLowerRoman
1297247596
idPageNumberStyle.idUpperLetters
1296855669
idPageNumberStyle.idLowerLetters
1296855660
idPageNumberStyle.idArabic
1298231906
PageStart
Page
read/write
he first page in the section.
Parent
Document
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
1634
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
Sections Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Sections
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name: [At]
[Reference]
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Section
Create a new section.
Location.
Before/ater an existing Section or at the beginning/end of a parent as Section or Document.
AnyItem
None
Object
Returns any Section.
FirstItem
None
Object
Returns the first Section.
Description:
Object
Returns the Section with the specified ID.
Section
Returns the sections within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he section at the start of the range, or the index of the section at the start of the range.
To
Variant
he section at the end of the range, or the index of the section at the end of the range.
LastItem
None
Object
Returns the last Section.
MiddleItem
None
Object
Returns the middle Section.
Object
Returns the next Section.
NextItem
Name:
Type:
Description:
Obj
Object
he Section before the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1635
Method: PreviousItem
1636
Parameters: Name:
Type:
Description:
Obj
Object
he Section ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Object
Returns the previous Section.
ShowHideFieldsBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
FieldsToHide
Objects
read/write
he fields to hide.
FieldsToShow
Objects
read/write
he fields to show.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the ShowHideFieldsBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the show hide fields behavior.
Parent
Variant
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1637
ShowHideFieldsBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of ShowHideFieldsBehaviors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
ShowHideFieldsBehavior
Create a new show hide fields behavior.
AnyItem
None
Object
Returns any ShowHideFieldsBehavior.
FirstItem
None
Object
Returns the first ShowHideFieldsBehavior.
Object
Returns the ShowHideFieldsBehavior with the specified ID.
ShowHideFieldsBehavior
Returns the show hide fields behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
Name:
Type:
Description:
From
Variant
he show hide fields behavior at the start of the range, or the index of the show hide fields behavior at the start of the range.
To
Variant
he show hide fields behavior at the end of the range, or the index of the show hide fields behavior at the end of the range.
LastItem
None
Object
Returns the last ShowHideFieldsBehavior.
MiddleItem
None
Object
Returns the middle ShowHideFieldsBehavior.
Object
Returns the next ShowHideFieldsBehavior.
Object
Returns the previous ShowHideFieldsBehavior.
NextItem
PreviousItem
1638
Name:
Type:
Description:
Obj
Object
he ShowHideFieldsBehavior before the one desired.
Name:
Type:
Description:
Obj
Object
he ShowHideFieldsBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Sound Properties Property:
Type:
Access:
Description:
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
Description
String
read/write
Description
DoNotPrintPoster
Boolean
read/write
Does not print the sound poster
EmbedInPDF
Boolean
read/write
Embed content in PDF
FilePath
String
read/write
he file path
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Images
Images
read only
Images
Index
Long
read only
Index of the Sound within its parent PageItem, Oval, Rectangle or Polygon
ItemLayer
Layer
read/write
he layer containing the page item.
ItemLink
Link
read only
Link to a placed file
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Locked
Boolean
read/write
If true, the page item is locked.
Name
String
read/write
he name of the sound.
Parent
Variant
read only
he parent of the page item.
PlayOnPageTurn
Boolean
read/write
Play on page turn
PosterFile
String
read/write
Poster file
read/write
Current poster type (‘proxy image’ is read-only)
SoundPosterType
Name:
Decimal:
idSoundPosterTypes.idNone
1852796517
idSoundPosterTypes.idStandard
2020623970
idSoundPosterTypes.idProxyImage
1299216505
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Methods Method:
Parameters:
Return:
Description:
BringForward
None
Nothing
Brings the object forward.
BringToFront
None
Nothing
Brings the object to the front.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
ExtractLabel
Name:
Type:
Description:
Key
String
he key.
InDesign CS Scripting Guide Visual Basic Reference 1639
Method: Fit
Parameters: Name: Given
InsertLabel
Markup
Move
ResetScaling
1640
Type:
Description:
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Visual Basic Reference
InDesign CS Scripting Guide
Description:
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
Nothing
Markup layout content with XML preserving the existing content.
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
he fit option.
Name:
None
Return:
Method: Resize
Select
Parameters: Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Nothing
Select this sound.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
InDesign CS Scripting Guide Visual Basic Reference 1641
Method: Store
Unlink
Parameters: Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
From
1642
Visual Basic Reference
Name:
Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
Asset
Store a page item in a library.
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
SoundBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the SoundBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the sound behavior.
read/write
he operation to perform when the sound behavior is activated.
Operation
Name:
Decimal:
idPlayOperations.idPlay
1886151033
idPlayOperations.idStop
1937010544
idPlayOperations.idPause
1885435251
idPlayOperations.idResume
1919251317
Parent
Variant
read only
he parent of the object.
SoundItem
Sound
read/write
he sound page item.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1643
SoundBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of SoundBehaviors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
SoundBehavior
Create a new sound behavior.
AnyItem
None
Object
Returns any SoundBehavior.
FirstItem
None
Object
Returns the first SoundBehavior.
Description:
Object
Returns the SoundBehavior with the specified ID.
SoundBehavior
Returns the sound behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he sound behavior at the start of the range, or the index of the sound behavior at the start of the range.
To
Variant
he sound behavior at the end of the range, or the index of the sound behavior at the end of the range.
LastItem
None
Object
Returns the last SoundBehavior.
MiddleItem
None
Object
Returns the middle SoundBehavior.
Object
Returns the next SoundBehavior.
Object
Returns the previous SoundBehavior.
NextItem
PreviousItem
1644
Name:
Type:
Description:
Obj
Object
he SoundBehavior before the one desired.
Name:
Type:
Description:
Obj
Object
he SoundBehavior ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Sounds Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Sounds
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Layer]
Variant
he layer on which to create the Sound as Layer.
[At]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Sound
Create a new sound.
Location.
Before/ater this Sound or at the beginning/end of this Document, Spread, Master Spread, Page or Layer as Document, Spread, MasterSpread, Page or Layer.
AnyItem
None
Object
Returns any Sound.
FirstItem
None
Object
Returns the first Sound.
Description:
Object
Returns the Sound with the specified ID.
Sound
Returns the sounds within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he sound at the start of the range, or the index of the sound at the start of the range.
To
Variant
he sound at the end of the range, or the index of the sound at the end of the range.
LastItem
None
Object
Returns the last Sound.
MiddleItem
None
Object
Returns the middle Sound.
InDesign CS Scripting Guide Visual Basic Reference 1645
Method: NextItem
PreviousItem
1646
Parameters: Name:
Type:
Description:
Obj
Object
he Sound before the one desired.
Name:
Type:
Description:
Obj
Object
he Sound ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Object
Returns the next Sound.
Object
Returns the previous Sound.
SpellPreference Properties Property:
Type:
Access:
Description:
CheckCapitalizedSentences
Boolean
read/write
If true, check the spelling of capitalized sentences.
CheckCapitalizedWords
Boolean
read/write
If true, check the spelling of capitalized words.
CheckMisspelledWords
Boolean
read/write
If true, check misspelled words.
CheckRepeatedWords
Boolean
read/write
If true, check for repeated words.
Parent
Application
read only
he parent of the object.
InDesign CS Scripting Guide Visual Basic Reference 1647
Spread Properties Property:
Type:
Access:
Description:
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items on the spread, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AppliedMaster
Variant
read/write
he master spread applied to the spread.
Buttons
Buttons
read only
Every button
read/write
he transparency flattener override applied to the spread (if any).
FlattenerOverride
Name:
Decimal:
idSpreadFlattenerLevel.idDefault
1147563124
idSpreadFlattenerLevel.idNone
1852796517
idSpreadFlattenerLevel.idCustom
1131639917
FlattenerPreferences
FlattenerPreference
read only
he transparency flattener preferences for the spread.
FormFields
FormFields
read only
Every form field item
GraphicLines
GraphicLines
read only
All graphic lines
Groups
Groups
read only
Groups
Guides
Guides
read only
Every guide
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the spread within the document.
KeepTogether
Boolean
read/write
If true, the pages of the spread should stay together when pages are added or removed before the spread.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Ovals
Ovals
read only
All ovals
PageItems
PageItems
read only
All page items
Pages
Pages
read only
Every page
Parent
Document
read only
he parent of the object.
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
ShowMasterItems
Boolean
read/write
If true, display items on the master spread.
TextFrames
TextFrames
read only
Text Frames
1648
Visual Basic Reference
InDesign CS Scripting Guide
Methods Method: CreateGuides
Parameters: Name:
Type:
Description:
[NumberOfRows]
Long
Number of rows of guides on a page.
[NumberOfColumns]
Long
Number of columns of guides on a page.
[RowGutter]
Variant
he amount of gutter between rows.
[ColumnGutter]
Variant
he amount of gutter between columns.
[GuideColor]
Variant
he guideÕs color.
[FitMargins]
Boolean
Whether the guides should fit to margins or fit to page.
[RemoveExisting]
Boolean
If true, remove existing guides.
[Layer]
Variant
he layer on which to create the Spread as Layer.
Return:
Description:
Nothing
Create multiple guides on all pages of a spread.
Deletes the object.
Delete
None
Nothing
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Spread
Move the spread before/ater another spread or page, or to the beginning/end of a document.
ExtractLabel
InsertLabel
Move
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
[To]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Location.
A spread, page or document. Before/ater the spread/page or at the beginning/end of the document.
InDesign CS Scripting Guide Visual Basic Reference 1649
Method: Place
RemoveOverride
1650
Parameters: Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
None
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Object
Place a file.
Nothing
Removes a locally overriden master page item
Spreads Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Spreads
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name: [At]
[Reference]
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Spread
Create a new spread.
Location.
Before/ater an existing Spread or at the beginning/end of a parent as Spread or Document.
AnyItem
None
Object
Returns any Spread.
FirstItem
None
Object
Returns the first Spread.
Description:
Object
Returns the Spread with the specified ID.
Spread
Returns the spreads within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he spread at the start of the range, or the index of the spread at the start of the range.
To
Variant
he spread at the end of the range, or the index of the spread at the end of the range.
LastItem
None
Object
Returns the last Spread.
MiddleItem
None
Object
Returns the middle Spread.
Object
Returns the next Spread.
Object
Returns the previous Spread.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Spread before the one desired.
Name:
Type:
Description:
Obj
Object
he Spread ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1651
State Properties Property:
Type:
Access:
Description:
Active
Boolean
read/write
If true, the state is the active state.
Enabled
Boolean
read/write
If true, the state is enabled for PDF generation.
EPSs
EPSs
read only
EPSs
GraphicLines
GraphicLines
read only
All graphic lines
Graphics
Graphics
read only
All graphics
Groups
Groups
read only
Groups
Id
Long
read only
he State’s unique id
Images
Images
read only
Images
Index
Long
read only
Index of the State within its parent Button
Name
String
read only
he name of the state.
Ovals
Ovals
read only
All ovals
PageItems
PageItems
read only
All page items
Parent
Button
read only
he parent of the object.
PDFs
PDFs
read only
PDFs
PICTs
PICTs
read only
PICTs
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
Name:
Decimal:
read/write
he state type of the state.
idState.idUp
1181971566
idState.idRollover
1181971574
idState.idDown
1181971556
Statetype
TextFrames
TextFrames
read only
Text Frames
WMFs
WMFs
read only
WMFs
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
1652
Visual Basic Reference
InDesign CS Scripting Guide
States Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of States
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
State
Create a new state.
AnyItem
None
Object
Returns any State.
FirstItem
None
Object
Returns the first State.
Description:
Object
Returns the State with the specified ID.
State
Returns the states within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he state at the start of the range, or the index of the state at the start of the range.
To
Variant
he state at the end of the range, or the index of the state at the end of the range.
LastItem
None
Object
Returns the last State.
MiddleItem
None
Object
Returns the middle State.
Object
Returns the next State.
Object
Returns the previous State.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he State before the one desired.
Name:
Type:
Description:
Obj
Object
he State ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1653
StaticText Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the StaticText within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
StaticLabel
String
read/write
he text in the static label control.
1654
Visual Basic Reference
InDesign CS Scripting Guide
StaticTexts Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of StaticTexts
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
StaticText
Create a new static text.
AnyItem
None
Object
Returns any StaticText.
FirstItem
None
Object
Returns the first StaticText.
Description:
Object
Returns the StaticText with the specified ID.
StaticText
Returns the static texts within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he static text at the start of the range, or the index of the static text at the start of the range.
To
Variant
he static text at the end of the range, or the index of the static text at the end of the range.
LastItem
None
Object
Returns the last StaticText.
MiddleItem
None
Object
Returns the middle StaticText.
Object
Returns the next StaticText.
Object
Returns the previous StaticText.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he StaticText before the one desired.
Name:
Type:
Description:
Obj
Object
he StaticText ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1655
Stories Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Stories
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Story.
FirstItem
None
Object
Returns the first Story.
Description:
Object
Returns the Story with the specified ID.
Story
Returns the stories within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he story at the start of the range, or the index of the story at the start of the range.
To
Variant
he story at the end of the range, or the index of the story at the end of the range.
LastItem
None
Object
Returns the last Story.
MiddleItem
None
Object
Returns the middle Story.
Object
Returns the next Story.
Object
Returns the previous Story.
NextItem
PreviousItem
1656
Name:
Type:
Description:
Obj
Object
he Story before the one desired.
Name:
Type:
Description:
Obj
Object
he Story ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Story Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
AssociatedXMLElements
Objects
read only
Returns the associated XML elements
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
Buttons
Buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
Capitalization
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Characters
Characters
read only
Characters
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
InDesign CS Scripting Guide Visual Basic Reference 1657
Property:
Type:
Access:
Description:
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GradientFillStart
Variant
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
GradientStrokeAngle
Double
read/write
he angle of the gradient applied to the stroke of the text.
GradientStrokeLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
GradientStrokeStart
Variant
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
GraphicLines
GraphicLines
read only
All graphic lines
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
Groups
Groups
read only
Groups
1658
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Story within its parent XMLElement or Document
InsertionPoints
InsertionPoints
read only
Insertion Points
ItemLink
Link
read only
Link to a placed file
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
Label
String
read/write
A label that can be set to any string
InDesign CS Scripting Guide Visual Basic Reference 1659
Property:
Type:
Access:
Description:
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Length
Long
read only
he number of characters in the text object.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Lines
Lines
read only
Lines
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OpenTypeFeatures
Variant
read/write
open type features as Array of Longs
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
read/write
Whether to use fractions in OpenType fonts
OTFFigureStyle
OTFFraction
1660
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
Boolean
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
PointSize
Double
read/write
he size of the text in points.
Polygons
Polygons
read only
All polygons
Name:
read/write
he position attribute applied to the text.
Position
Decimal:
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Rectangles
Rectangles
read only
All rectangles
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
InDesign CS Scripting Guide Visual Basic Reference 1661
Property:
Type:
Access:
Description:
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
RuleAboveWidth
RuleBelow
RuleBelowWidth
SingleWordJustification
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
1662
Visual Basic Reference
InDesign CS Scripting Guide
Property: StartParagraph
Type: Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
Access:
Description:
read/write
his property controls the location at which InDesign will start the paragraph.
StoryPreferences
StoryPreference
read only
he story preferences for the story. he properties of this object correspond to the options in the Story palette.
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tables
Tables
read only
All tables
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this Story as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
TextColumns
TextColumns
read only
Text columns
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
InDesign CS Scripting Guide Visual Basic Reference 1663
Property:
Type:
Access:
Description:
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Words
Words
read only
Words
Methods Method: Changecase
Parameters: Name: Using
CreateOutlines
Delete
1664
Type:
Description:
Name:
Decimal:
idChangecaseMode. idUppercase
1667462499
idChangecaseMode. idLowercase
1667460195
idChangecaseMode. idTitlecase
1667462243
idChangecaseMode. idSentencecase
1667461987
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original text.
Visual Basic Reference
InDesign CS Scripting Guide
Description:
Nothing
Change the case of text.
Objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Nothing
Deletes the object.
Case option to use.
Name:
None
Return:
Method: Export
ExtractLabel
InsertLabel
Markup
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
Using
XMLElement
he XML element to associate with the text.
Return:
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Associate the text with an XML element while preserving the existing text content.
InDesign CS Scripting Guide Visual Basic Reference 1665
Method: Move
Parameters: Name: To
PlaceXML
Search
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822 A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
Boolean
String
None
Visual Basic Reference
Description:
Nothing
Moves the text.
Nothing
Places XML content from the specified element replacing the existing content.
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
Where to move the text, relative to the reference object (before/ater).
Variant
[ReplacingWith]
1666
Description:
[Reference]
[CaseSensitive]
StoryEdit
Type:
Return:
You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box. Nothing
InDesign CS Scripting Guide
Edit the story in a story editor window
StoryPreference Properties Property:
Type:
Access:
Description:
OpticalMarginAlignment
Boolean
read/write
If true, adjust the position of characters at the edges of text columns. In general, the edges of punctuation characters will “hang” beyond the edges of the text column, but other characters are also adjusted.
OpticalMarginSize
Double
read/write
A point size used as a base for calculating how far characters should hang outside the margins when optical margin alginment is on.
Parent
Variant
read only
he parent of the object.
InDesign CS Scripting Guide Visual Basic Reference 1667
StoryWindow Properties Property:
Type:
Access:
Description:
Bounds
Variant
read/write
he bounds of the StoryWindow, in the format (top, let, bottom, right) as Array of 4 Units (Doubles or Strings)
Index
Long
read only
Index of the StoryWindow within its parent Document or Application
Name
String
read only
he name of the StoryWindow
Parent
Variant
read only
he StoryWindow’s parent as Document or Application
Selection
Variant
read/write
he selection of the front-most window as Object, Array of Objects or idNothingEnum
Methods Method:
Parameters:
Return:
Description:
BringToFront
None
Nothing
Brings the object to the front.
Close
None
Nothing
Close the StoryWindow
Maximize
None
Nothing
Maximize the window
Minimize
None
Nothing
Minimize the window
Restore
None
Nothing
Restore the window
Nothing
Selects an object or objects. If the object is a text object (e.g., characters, words, lines, paragraphs), any other selected objects are deselected (the AppendSelection parameter has no effect).
Select
Name:
Type:
Description:
SelectableItems
Object, Array of Objects, or idNothingEnum.idNothing (to deselect all)
he object(s) to select.
[ExistingSelection]
1668
Visual Basic Reference
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
StoryWindows Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of StoryWindows
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any StoryWindow.
FirstItem
None
Object
Returns the first StoryWindow.
StoryWindow
Returns the story windows within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he story window at the start of the range, or the index of the story window at the start of the range.
To
Variant
he story window at the end of the range, or the index of the story window at the end of the range.
LastItem
None
Object
Returns the last StoryWindow.
MiddleItem
None
Object
Returns the middle StoryWindow.
Object
Returns the next StoryWindow.
Object
Returns the previous StoryWindow.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he StoryWindow before the one desired.
Name:
Type:
Description:
Obj
Object
he StoryWindow ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1669
StripedStrokeStyle Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the StripedStrokeStyle within its parent Document or Application
Name
String
read/write
he name of the striped stroke style.
Parent
Variant
read only
he parent of the object.
StripeArray
Variant
read/write
An array defining the stripe and gap of the striped stroke style.
StrokeStyleType
String
read only
he stroke style type.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
1670
Visual Basic Reference
InDesign CS Scripting Guide
StripedStrokeStyles Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of StripedStrokeStyles
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
StripedStrokeStyle
Create a new striped stroke style.
AnyItem
None
Object
Returns any StripedStrokeStyle.
FirstItem
None
Object
Returns the first StripedStrokeStyle.
Description:
Object
Returns the StripedStrokeStyle with the specified ID.
StripedStrokeStyle
Returns the striped stroke styles within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he striped stroke style at the start of the range, or the index of the striped stroke style at the start of the range.
To
Variant
he striped stroke style at the end of the range, or the index of the striped stroke style at the end of the range.
LastItem
None
Object
Returns the last StripedStrokeStyle.
MiddleItem
None
Object
Returns the middle StripedStrokeStyle.
Object
Returns the next StripedStrokeStyle.
Object
Returns the previous StripedStrokeStyle.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he StripedStrokeStyle before the one desired.
Name:
Type:
Description:
Obj
Object
he StripedStrokeStyle ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1671
StrokeStyle Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the StrokeStyle within its parent Document or Application
Name
String
read/write
he name of the stroke style.
Parent
Variant
read only
he parent of the object.
StrokeStyleType
String
read only
he type of the stroke style.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
1672
Visual Basic Reference
InDesign CS Scripting Guide
StrokeStyles Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of StrokeStyles
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any StrokeStyle.
FirstItem
None
Object
Returns the first StrokeStyle.
Description:
Object
Returns the StrokeStyle with the specified ID.
StrokeStyle
Returns the stroke styles within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he stroke style at the start of the range, or the index of the stroke style at the start of the range.
To
Variant
he stroke style at the end of the range, or the index of the stroke style at the end of the range.
LastItem
None
Object
Returns the last StrokeStyle.
MiddleItem
None
Object
Returns the middle StrokeStyle.
Object
Returns the next StrokeStyle.
Object
Returns the previous StrokeStyle.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he StrokeStyle before the one desired.
Name:
Type:
Description:
Obj
Object
he StrokeStyle ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1673
Subtopic Properties Property:
Type:
Access:
Description:
Index
Long
read only
Index of the Subtopic within its parent Topic
Name
String
read/write
he name of the subtopic.
Parent
Topic
read only
he parent of the object.
SortOrder
String
read/write
he sort order text of the subtopic.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Subtopic
Move the subtopic to another index location in the subtopics collection.
Move
1674
Name:
Type:
Description:
To
Long
he location at which to to insert the Subtopic.
Visual Basic Reference
InDesign CS Scripting Guide
Subtopics Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Subtopics
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Name
String
Description: Subtopic name.
[SortOrder]
Variant
Sort order as String.
Return:
Description:
Subtopic
Create a new subtopic.
AnyItem
None
Object
Returns any Subtopic.
FirstItem
None
Object
Returns the first Subtopic.
Subtopic
Returns the subtopics within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he subtopic at the start of the range, or the index of the subtopic at the start of the range.
To
Variant
he subtopic at the end of the range, or the index of the subtopic at the end of the range.
LastItem
None
Object
Returns the last Subtopic.
MiddleItem
None
Object
Returns the middle Subtopic.
Object
Returns the next Subtopic.
Object
Returns the previous Subtopic.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Subtopic before the one desired.
Name:
Type:
Description:
Obj
Object
he Subtopic ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1675
SVGExportPreference Properties Property:
Type:
Access:
Description:
AppliedFlattenerPreset
FlattenerPreset
read/write
he flattener preset
EmbedImages
Boolean
read/write
Whether to embed images in the exported SVG
read/write
file encoding to be used when exporting
read/write
Specifies how fonts are to be subset
FileEncoding
FontSubsetting
Name:
Decimal:
idFileEncoding.idASCII
1095975753
idFileEncoding.idUTF8
1937134904
idFileEncoding.idUTF16
1937125686
Name:
Decimal:
idFontSubsetting.idNone
1852796517
idFontSubsetting.idSubsetGlyphs
1937134439
idFontSubsetting.idSubsetEnglish
1937134437
idFontSubsetting.idSubsetGlyphsAndEnglish
1937134405
idFontSubsetting.idSubsetRoman
1937134450
idFontSubsetting.idSubsetGlyphsAndRoman
1937134418
idFontSubsetting.idSubsetEntire
1937134433
IgnoreSpreadOverrides
Boolean
read/write
Whether to ignore flattener spread overrides
PageRange
Variant
read/write
he range of pages as idPageRange or String
Parent
Application
read only
he SVGExportPreference’s parent
ReadersSpreads
Boolean
read/write
Whether to export reader’s spreads
RealPrecision
Long
read/write
Number of digits of precision for real numbers
read/write
Rendering style
read/write
Format to be used when specifying SVG object styles
RenderingStyle
StyleFormat
1676
Name:
Decimal:
idRenderingStyle.idProgressive
1937134192
idRenderingStyle.idBatch
1937134178
Name:
Decimal:
idStyleFormat.idInline
1937131113
idStyleFormat.idEntity
1937131109
idStyleFormat.idCss
1937131107
idStyleFormat.idPresentationAttributes
1937131120
Visual Basic Reference
InDesign CS Scripting Guide
Swatch Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Swatch within its parent Application or Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Name
String
read/write
he name of the swatch.
Parent
Variant
read only
he parent of the object.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Merge one or more other swatches into this one.
ExtractLabel
InsertLabel
Merge
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Variant
he swatches to merge.
InDesign CS Scripting Guide Visual Basic Reference 1677
Swatches Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Swatches
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Swatch.
FirstItem
None
Object
Returns the first Swatch.
Description:
Object
Returns the Swatch with the specified ID.
Swatch
Returns the swatches within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he swatch at the start of the range, or the index of the swatch at the start of the range.
To
Variant
he swatch at the end of the range, or the index of the swatch at the end of the range.
LastItem
None
Object
Returns the last Swatch.
MiddleItem
None
Object
Returns the middle Swatch.
Object
Returns the next Swatch.
Object
Returns the previous Swatch.
NextItem
PreviousItem
1678
Name:
Type:
Description:
Obj
Object
he Swatch before the one desired.
Name:
Type:
Description:
Obj
Object
he Swatch ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
SynchronizeOption Properties Property:
Type:
Access:
Description:
GroupName
String
read only
he name of the group this book synchronize option style appears in.
Index
Long
read only
Index of the SynchronizeOption within its parent Book
Name
String
read only
he name of the XML tag
Parent
Book
read only
he parent of the object.
UseStyle
Boolean
read/write
If true, use the book synchronize option style during a synchronize.
InDesign CS Scripting Guide Visual Basic Reference 1679
SynchronizeOptions Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of SynchronizeOptions
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any SynchronizeOption.
FirstItem
None
Object
Returns the first SynchronizeOption.
SynchronizeOption
Returns the synchronize options within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he synchronize option at the start of the range, or the index of the synchronize option at the start of the range.
To
Variant
he synchronize option at the end of the range, or the index of the synchronize option at the end of the range.
LastItem
None
Object
Returns the last SynchronizeOption.
MiddleItem
None
Object
Returns the middle SynchronizeOption.
Object
Returns the next SynchronizeOption.
Object
Returns the previous SynchronizeOption.
NextItem
PreviousItem
1680
Name:
Type:
Description:
Obj
Object
he SynchronizeOption before the one desired.
Name:
Type:
Description:
Obj
Object
he SynchronizeOption ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Table Properties Property:
Type:
Access:
Description:
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items contained by this object, regardless of their location in the object hierarchy (i.e., including objects nested within other objects, such as groups).
read/write
What alternating fills pattern we use
AlternatingFills
Name:
Decimal:
idAlternatingFillsTypes.idNoAlternatingPattern
1097617007
idAlternatingFillsTypes.idAlternatingRows
1097618039
idAlternatingFillsTypes.idAlternatingColumns
1097614188
BodyRowCount
Long
read/write
Number of table body rows
BottomBorderStrokeColor
Swatch
read/write
he color of the table’s bottom border
Swatch
read/write
he gap color of the table’s bottom border
Boolean
read/write
Whether to overprint the gap of the table’s bottom border
Double
read/write
he gap tint of the gap color of the table’s bottom border
Boolean
read/write
Whether to overprint the table’s bottom border
BottomBorderStrokeTint
Double
read/write
he tint of the color of the table’s bottom border
BottomBorderStrokeType
StrokeStyle
read/write
he stroke type of the table’s bottom border
BottomBorderStrokeWeight
Variant
read/write
he stroke weight of the table’s bottom border
read/write
Where to put the footers
read/write
Where to put the headers
Buttons
read only
Every button
Cells
Cells
read only
Cells
ColumnCount
Long
read/write
he number of columns
ColumnFillsPriority
Boolean
read/write
Whether to disaply column alternating fills or row alternating fills
Columns
Columns
read only
All columns
Contents
Variant
read/write
he text contents of the cell.
EndColumnFillColor
Swatch
read/write
he fill color of columns in the second alternating fill group
EndColumnFillCount
Long
read/write
he number of columns in the second alternating fills group
EndColumnFillOverprint
Boolean
read/write
Whether to overprint the columns in the second alternating fills group
BreakFooters
BreakHeaders
Buttons
Name:
Decimal:
idHeaderFooterBreakTypes.idInAllTextColumns
1231115363
idHeaderFooterBreakTypes.idOncePerTextFrame
1332761702
idHeaderFooterBreakTypes.idOncePerPage
1332760673
Name:
Decimal:
idHeaderFooterBreakTypes.idInAllTextColumns
1231115363
idHeaderFooterBreakTypes.idOncePerTextFrame
1332761702
idHeaderFooterBreakTypes.idOncePerPage
1332760673
InDesign CS Scripting Guide Visual Basic Reference 1681
Property:
Type:
Access:
Description:
EndColumnFillTint
Double
read/write
he tint of the color of columns in the second alternating fills group
EndColumnLineStyle
StrokeStyle
read/write
he stroke type of columns in the second alternating strokes group
EndColumnStrokeColor
Swatch
read/write
he stroke color of columns in the second alternating strokes group
EndColumnStrokeCount
Long
read/write
he number of columns in the second alternating strokes group
EndColumnStrokeGapColor
Swatch
read/write
he stroke gap color of columns in the second alternating strokes group
EndColumnStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the columns in the second alternating strokes group
EndColumnStrokeGapTint
Double
read/write
he gap tint of the gap color of columns in the second alternating strokes group
EndColumnStrokeOverprint
Boolean
read/write
Whether to overprint the columns in the second alternating strokes group
EndColumnStrokeTint
Double
read/write
he tint of the color of columns in the second alternating strokes group
EndColumnStrokeWeight
Variant
read/write
he stroke weight of columns in the second alternating strokes group
EndRowFillColor
Swatch
read/write
he fill color of rows in the second alternating fills group
EndRowFillCount
Long
read/write
he number of rows in the second alternating fills group
EndRowFillOverprint
Boolean
read/write
Whether to overprint the rows in the second alternating fills group
EndRowFillTint
Double
read/write
he tint of the color of rows in the second alternating fills group
EndRowStrokeColor
Swatch
read/write
he stroke color of rows in the second alternating strokes group
EndRowStrokeCount
Long
read/write
he number of rows in the second alternating strokes group
EndRowStrokeGapColor
Swatch
read/write
he stroke gap color of rows in the second alternating strokes group
EndRowStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the rows in the second alternating strokes group
EndRowStrokeGapTint
Variant
read/write
he gap tint of the gap color of rows in the second alternating strokes group
EndRowStrokeOverprint
Boolean
read/write
Whether to overprint the rows in the second alternating strokes group
EndRowStrokeTint
Variant
read/write
he tint of the color of rows in the second alternating strokes group
EndRowStrokeType
StrokeStyle
read/write
he stroke type of rows in the second alternating strokes group
EndRowStrokeWeight
Variant
read/write
he stroke weight of rows in the second alternating strokes group
FooterRowCount
Long
read/write
Number of table footer rows
FormFields
FormFields
read only
Every form field item
GraphicLines
GraphicLines
read only
All graphic lines
Groups
Groups
read only
Groups
HeaderRowCount
Long
read/write
Number of table header rows
Height
Variant
read/write
he height of the cell.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the cell within its parent table.
1682
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Label
String
read/write
A label that can be set to any string
LetBorderStrokeColor
Swatch
read/write
he color of the table’s let border
LetBorderStrokeGapColor
Swatch
read/write
he gap color of the table’s let border
LetBorderStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the table’s let border
LetBorderStrokeGapTint
Double
read/write
he gap tint of the gap color of the table’s let border
LetBorderStrokeOverprint
Boolean
read/write
Whether to overprint the table’s let border
LetBorderStrokeTint
Double
read/write
he tint of the color of the table’s let border
LetBorderStrokeType
StrokeStyle
read/write
he stroke type of the table’s let border
LetBorderStrokeWeight
Variant
read/write
he stroke weight of the table’s let border
Ovals
Ovals
read only
All ovals
PageItems
PageItems
read only
All page items
Parent
Variant
read only
he parent of the object.
Polygons
Polygons
read only
All polygons
Rectangles
Rectangles
read only
All rectangles
RightBorderStrokeColor
Swatch
read/write
he color of the table’s right border
RightBorderStrokeGapColor
Swatch
read/write
he gap color of the table’s right border
RightBorderStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the table’s right border
RightBorderStrokeGapTint
Double
read/write
he gap tint of the color of the table’s right border
RightBorderStrokeOverprint
Boolean
read/write
Whether to overprint the table’s right border
RightBorderStrokeTint
Double
read/write
he tint of the color of the table’s right border
RightBorderStrokeType
StrokeStyle
read/write
he stroke type of the table’s right border
RightBorderStrokeWeight
Variant
read/write
he stroke weight of the table’s right border
Rows
Rows
read only
All rows
SkipFirstAlternatingFillColumns
Long
read/write
he number of first columns to skip when alternating fills
SkipFirstAlternatingFillRows
Long
read/write
he number of first rows to skip when alternating fills
SkipFirstAlternatingStrokeColumns
Long
read/write
he number of first columns to skip when alternating strokes
SkipFirstAlternatingStrokeRows
Long
read/write
he number of first rows to skip when alternating strokes
SkipFirstHeader
Boolean
read/write
Whether to skip the first occurrence of the headers
SkipLastAlternatingFillColumns
Long
read/write
he number of last columns to skip when alternating fills
SkipLastAlternatingFillRows
Long
read/write
he number of last rows to skip when alternating fills
SkipLastAlternatingStrokeColumns
Long
read/write
he number of last columns to skip when alternating strokes
InDesign CS Scripting Guide Visual Basic Reference 1683
Property:
Type:
Access:
Description:
SkipLastAlternatingStrokeRows
Long
read/write
he number of last rows to skip when alternating strokes
SkipLastFooter
Boolean
read/write
Whether to skip the last occurrence of the footers
SpaceAter
Variant
read/write
Space ater
SpaceBefore
Variant
read/write
Space before
StartColumnFillColor
Swatch
read/write
he fill color of columns in the first alternating fills group
StartColumnFillCount
Long
read/write
he number of columns in the first alternating fills group
StartColumnFillOverprint
Boolean
read/write
Whether to overprint the columns in the first alternating fills group
StartColumnFillTint
Double
read/write
he tint of the color of columns in the first alternating fills group
StartColumnStrokeColor
Swatch
read/write
he stroke color of columns in the first alternating strokes group
StartColumnStrokeCount
Long
read/write
he number of columns in the first alternating strokes group
StartColumnStrokeGapColor
Swatch
read/write
he stroke gap color of columns in the first alternating strokes group
StartColumnStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the columns in the first alternating strokes group
StartColumnStrokeGapTint
Double
read/write
he gap tint of the gap color of columns in the first alternating strokes group
StartColumnStrokeOverprint
Boolean
read/write
Whether to overprint the columns in the first alternating strokes group
StartColumnStrokeTint
Double
read/write
he tint of the color of columns in the first alternating strokes group
StartColumnStrokeType
StrokeStyle
read/write
he stroke type of columns in the first alternating strokes group
StartColumnStrokeWeight
Variant
read/write
he stroke weight of columns in the first alternating strokes group
StartRowFillColor
Swatch
read/write
he fill color of rows in the first alternating fills group
StartRowFillCount
Long
read/write
he number of rows in the first alternating fills group
StartRowFillOverprint
Boolean
read/write
Whether to overprint the rows in the first alternating fills group
StartRowFillTint
Double
read/write
he tint of the color of rows in the first alternating fills group
StartRowStrokeColor
Swatch
read/write
he stroke color of rows in the first alternating strokes group
StartRowStrokeCount
Long
read/write
he number of rows in the first alternating strokes group
StartRowStrokeGapColor
Swatch
read/write
he stroke gap color of rows in the first alternating strokes group
StartRowStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the rows in the first alternating strokes group
StartRowStrokeGapTint
Double
read/write
he gap tint of the gap color of rows in the first alternating strokes group
StartRowStrokeOverprint
Boolean
read/write
Whether to overprint the rows in the first alternating strokes group
StartRowStrokeTint
Double
read/write
he tint of the color of rows in the first alternating strokes group
StartRowStrokeType
StrokeStyle
read/write
he stroke type of rows in the first alternating strokes group
1684
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
StartRowStrokeWeight
Variant
read/write
he stroke weight of rows in the first alternating strokes group
StoryOffset
Long
read only
he location of the object from the beginning of the story
read/write
Whether to draw columns on top if true or rows on top if false
StrokeOrder
Name:
Decimal:
idStrokeOrderTypes.idRowOnTop
1936879476
idStrokeOrderTypes.idColumnOnTop
1935896436
idStrokeOrderTypes.idBestJoins
1935828330
idStrokeOrderTypes.idIndesign2Compatibility
1936286819
TextFrames
TextFrames
read only
Text Frames
TopBorderStrokeColor
Swatch
read/write
he color of the table’s top border
TopBorderStrokeGapColor
Swatch
read/write
he gap color of the table’s top border
TopBorderStrokeGapOverprint
Boolean
read/write
Whether to overprint the gap of the table’s top border
TopBorderStrokeGapTint
Double
read/write
he gap tint of the gap color of the table’s top border
TopBorderStrokeOverprint
Boolean
read/write
Whether to overprint the table’s top border
TopBorderStrokeTint
Double
read/write
he tint of the color of the table’s top border
TopBorderStrokeType
StrokeStyle
read/write
he stroke type of the table’s top border
TopBorderStrokeWeight
Variant
read/write
he stroke weight of the top border of the table
Width
Variant
read/write
he width of the cell.
Methods Method: ConvertToText
CreateOutlines
Delete
Parameters: Name:
Type:
Description:
[ColumnSeparator]
Variant
he character to interpret as the column separator.
[RowSeparator]
Variant
he character to interpret as the row separator.
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original object.
None
Return:
Description:
Text
Convert to text.
Objects
Create outlines from the text.
Nothing
Deletes the object.
InDesign CS Scripting Guide Visual Basic Reference 1685
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
Unmerge
1686
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
None
Visual Basic Reference
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
InDesign CS Scripting Guide
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Select this table.
Objects
Unmerge the cells.
How to handle the existing selection.
Tables Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Tables
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name: [To]
[Reference]
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
Table
Create a new table.
Location.
Before/ater an existing Table or at the beginning/end of a parent as Table, TextFrame, Text, Character, Word, Line, Paragraph, TextColumn, InsertionPoint, Story, Cell or TextStyleRange.
AnyItem
None
Object
Returns any Table.
FirstItem
None
Object
Returns the first Table.
Description:
Object
Returns the Table with the specified ID.
Table
Returns the tables within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he table at the start of the range, or the index of the table at the start of the range.
To
Variant
he table at the end of the range, or the index of the table at the end of the range.
LastItem
None
Object
Returns the last Table.
MiddleItem
None
Object
Returns the middle Table.
Object
Returns the next Table.
NextItem
Name:
Type:
Description:
Obj
Object
he Table before the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1687
Method: PreviousItem
1688
Parameters: Name:
Type:
Description:
Obj
Object
he Table ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Object
Returns the previous Table.
TabStop Properties Property: Alignment
Type: Name:
Decimal:
idTabStopAlignment.idLetAlign
1818584692
idTabStopAlignment.idCenterAlign
1667591796
idTabStopAlignment.idRightAlign
1919379572
idTabStopAlignment.idCharacterAlign
1952604515
Access:
Description:
read/write
he alignment of the tab stop.
AlignmentCharacter
String
read/write
he tab stop alignment character.
Index
Long
read only
Index of the TabStop within its parent TextDefault, Paragraph, ParagraphStyle, Text, Character, Word, Line, TextColumn, TextStyleRange, InsertionPoint or Story
Leader
String
read/write
he tab stop leader
Parent
Variant
read only
he parent of the object.
Position
Variant
read/write
he position of the tab stop on the text ruler.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
InDesign CS Scripting Guide Visual Basic Reference 1689
TabStops Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of TabStops
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
TabStop
Create a new tab stop.
AnyItem
None
Object
Returns any TabStop.
FirstItem
None
Object
Returns the first TabStop.
TabStop
Returns the tab stops within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he tab stop at the start of the range, or the index of the tab stop at the start of the range.
To
Variant
he tab stop at the end of the range, or the index of the tab stop at the end of the range.
LastItem
None
Object
Returns the last TabStop.
MiddleItem
None
Object
Returns the middle TabStop.
Object
Returns the next TabStop.
Object
Returns the previous TabStop.
NextItem
PreviousItem
1690
Name:
Type:
Description:
Obj
Object
he TabStop before the one desired.
Name:
Type:
Description:
Obj
Object
he TabStop ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
TaggedTextExportPreference Properties Property: CharacterSet
Parent TagForm
Type: Name:
Decimal:
idTagTextExportCharacterSet.idASCII
1095975753
idTagTextExportCharacterSet.idAnsi
1095652169
idTagTextExportCharacterSet.idUnicode
1249209961
idTagTextExportCharacterSet.idShitJIS
1249077875
Application Name:
Decimal:
idTagTextForm.idVerbose
1414821474
idTagTextForm.idAbbreviated
1414816098
Access:
Description:
read/write
he character set to use when exporting tagged text.
read only
he parent of the object.
read/write
he tag form to use when exporting tagged text.
InDesign CS Scripting Guide Visual Basic Reference 1691
TaggedTextImportPreference Properties Property:
Type:
Access:
Parent
Application
read only
he parent of the object.
RemoveTextFormatting
Boolean
read/write
Whether to remove text formatting or not
read/write
What to do when style definitions in the incoming tagged text file conflict with definitions of styles having the same names in the current publication.
read/write
Whether to use Typographer’s quotes or not
StyleConflict
UseTypographersQuotes
1692
Name:
Decimal:
idStyleConflict.idPublicationDefinition
1414819940
idStyleConflict.idTagFileDefinition
1413903460
Boolean
Visual Basic Reference
InDesign CS Scripting Guide
Description:
Text Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
Ascent
Variant
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
AssociatedXMLElements
Objects
read only
Returns the associated XML elements
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
Baseline
Variant
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
Buttons
Buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
Characters
Capitalization
Characters
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Characters
InDesign CS Scripting Guide Visual Basic Reference 1693
Property:
Type:
Access:
Description:
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
Descent
Variant
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GradientFillStart
Variant
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
GradientStrokeAngle
Double
read/write
he angle of the gradient applied to the stroke of the text.
GradientStrokeLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
1694
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
GradientStrokeStart
Variant
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
GraphicLines
GraphicLines
read only
All graphic lines
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
Groups
Groups
read only
Groups
HorizontalOffset
Variant
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Index
Long
read only
Index of the object within its parent object.
InsertionPoints
InsertionPoints
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
InDesign CS Scripting Guide Visual Basic Reference 1695
Property:
Type:
Access:
Description:
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Length
Long
read only
he number of characters in the text object.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Lines
Lines
read only
Lines
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OpenTypeFeatures
Variant
read/write
open type features as Array of Longs
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
1696
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
ParentStory
Story
read only
he story containing the text object.
ParentTextFrame
TextFrame
read only
he text frame containing the text object.
PointSize
Double
read/write
he size of the text in points.
Polygons
Polygons
read only
All polygons
Position
Name:
Decimal:
read/write
he position attribute applied to the text.
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Rectangles
Rectangles
read only
All rectangles
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
InDesign CS Scripting Guide Visual Basic Reference 1697
Property:
Type:
Access:
Description:
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleBelowWidth
1698
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
Visual Basic Reference
InDesign CS Scripting Guide
Property: SingleWordJustification
Type: Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Justification for lines containing a single word.
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tables
Tables
read only
All tables
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this Text as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
TextColumns
TextColumns
read only
Text columns
InDesign CS Scripting Guide Visual Basic Reference 1699
Property:
Type:
Access:
Description:
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Words
Words
read only
Words
Methods Method: ApplyStyle
Changecase
Parameters: Name:
Type:
Description:
Using
Variant
he paragraph style or character style to apply.
[ClearingOverrides]
Boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
Using
1700
Visual Basic Reference
Name:
Decimal:
idChangecaseMode. idUppercase
1667462499
idChangecaseMode. idLowercase
1667460195
idChangecaseMode. idTitlecase
1667462243
idChangecaseMode. idSentencecase
1667461987
InDesign CS Scripting Guide
Case option to use.
Return:
Description:
Nothing
Apply a paragraph or character style to the text object.
Nothing
Change the case of text.
Method: ConvertToTable
CreateOutlines
Delete Export
Parameters: Name:
Type:
Description:
[Column Separator]
String
he character to interpret as the column separator.
[RowSeparator]
String
he character to interpret as the row separator.
[NumberOfColumns]
Long
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original text.
None Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Return:
Description:
Table
Convert the text to a table. he parameters for this command correspond to the options in the Convert Text to Table dialog box (select some text and choose Table > Convert Text to Table to display this dialog box).
Objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Nothing
Deletes the object.
Nothing
Exports the object to a file.
InDesign CS Scripting Guide Visual Basic Reference 1701
Method: Markup
Move
Parameters: Name:
Type:
Description:
Using
XMLElement
he XML element to associate with the text.
Name:
Type:
Description:
To
Place
1702
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
InDesign CS Scripting Guide
Description:
Nothing
Associate the text with an XML element while preserving the existing text content.
Nothing
Moves the text.
Object
Place a file.
Where to move the text, relative to the reference object (before/ater).
[Reference]
Visual Basic Reference
Return:
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[ExistingSelection]
Return:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects text.
How to handle the existing selection.
InDesign CS Scripting Guide Visual Basic Reference 1703
TextColumn Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
Ascent
Variant
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
AssociatedXMLElements
Objects
read only
Returns the associated XML elements
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
Baseline
Variant
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
Buttons
Buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
Characters
Capitalization
Characters
1704
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Characters
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
Descent
Variant
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GradientFillStart
Variant
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
GradientStrokeAngle
Double
read/write
he angle of the gradient applied to the stroke of the text.
GradientStrokeLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
InDesign CS Scripting Guide Visual Basic Reference 1705
Property:
Type:
Access:
Description:
GradientStrokeStart
Variant
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
GraphicLines
GraphicLines
read only
All graphic lines
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
Groups
Groups
read only
Groups
HorizontalOffset
Variant
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Index
Long
read only
Index of the object within its parent object.
InsertionPoints
InsertionPoints
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
1706
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Length
Long
read only
he number of characters in the text object.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Lines
Lines
read only
Lines
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OpenTypeFeatures
Variant
read/write
open type features as Array of Longs
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
InDesign CS Scripting Guide Visual Basic Reference 1707
Property:
Type:
Access:
Description:
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
ParentStory
Story
read only
he story containing the text object.
ParentTextFrame
TextFrame
read only
he text frame containing the text object.
PointSize
Double
read/write
he size of the text in points.
Polygons
Polygons
read only
All polygons
Position
Name:
Decimal:
read/write
he position attribute applied to the text.
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Rectangles
Rectangles
read only
All rectangles
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
1708
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleBelowWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
InDesign CS Scripting Guide Visual Basic Reference 1709
Property: SingleWordJustification
Type: Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Justification for lines containing a single word.
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tables
Tables
read only
All tables
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this TextColumn as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
TextColumns
TextColumns
read only
Text columns
1710
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Words
Words
read only
Words
Methods Method: ApplyStyle
Changecase
Parameters: Name:
Type:
Description:
Using
Variant
he paragraph style or character style to apply.
[ClearingOverrides]
Boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
Using
Name:
Decimal:
idChangecaseMode. idUppercase
1667462499
idChangecaseMode. idLowercase
1667460195
idChangecaseMode. idTitlecase
1667462243
idChangecaseMode. idSentencecase
1667461987
Return:
Description:
Nothing
Apply a paragraph or character style to the text object.
Nothing
Change the case of text.
Case option to use.
InDesign CS Scripting Guide Visual Basic Reference 1711
Method: ConvertToTable
CreateOutlines
Delete Export
1712
Parameters: Name:
Type:
Description:
[Column Separator]
String
he character to interpret as the column separator.
[RowSeparator]
String
he character to interpret as the row separator.
[NumberOfColumns]
Long
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original text.
None Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Table
Convert the text to a table. he parameters for this command correspond to the options in the Convert Text to Table dialog box (select some text and choose Table > Convert Text to Table to display this dialog box).
Objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Nothing
Deletes the object.
Nothing
Exports the object to a file.
Method: Markup
Move
Parameters: Name:
Type:
Description:
Using
XMLElement
he XML element to associate with the text.
Name:
Type:
Description:
To
Place
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Return:
Description:
Nothing
Associate the text with an XML element while preserving the existing text content.
Nothing
Moves the text.
Object
Place a file.
Where to move the text, relative to the reference object (before/ater).
[Reference]
Variant
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
InDesign CS Scripting Guide Visual Basic Reference 1713
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
1714
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Visual Basic Reference
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects text.
TextColumns Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of TextColumns
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any TextColumn.
FirstItem
None
Object
Returns the first TextColumn.
TextColumn
Returns the text columns within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he text column at the start of the range, or the index of the text column at the start of the range.
To
Variant
he text column at the end of the range, or the index of the text column at the end of the range.
LastItem
None
Object
Returns the last TextColumn.
MiddleItem
None
Object
Returns the middle TextColumn.
Object
Returns the next TextColumn.
Object
Returns the previous TextColumn.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he TextColumn before the one desired.
Name:
Type:
Description:
Obj
Object
he TextColumn after the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1715
TextDefault Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
Capitalization
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
1716
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
InDesign CS Scripting Guide Visual Basic Reference 1717
Property: Justification
Type: Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Alignment of the paragraph containing the text.
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
1718
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
Parent
Variant
read only
he parent of the object.
PointSize
Double
read/write
he size of the text in points.
read/write
he position attribute applied to the text.
Position
Name:
Decimal:
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
InDesign CS Scripting Guide Visual Basic Reference 1719
Property:
Type:
Access:
Description:
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
1720
Visual Basic Reference
InDesign CS Scripting Guide
Property: RuleBelowWidth
SingleWordJustification
Type: Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Access:
Description:
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
read/write
Justification for lines containing a single word.
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this TextDefault as Array of Arrays of ID/Value Pairs
InDesign CS Scripting Guide Visual Basic Reference 1721
Property:
Type:
Access:
Description:
TabStops
TabStops
read only
Tab Stops
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
1722
Visual Basic Reference
InDesign CS Scripting Guide
TextEditbox Properties Property:
Type:
Access:
Description:
EditContents
String
read/write
he text in the text edit field of the control.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the TextEditbox within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
InDesign CS Scripting Guide Visual Basic Reference 1723
TextEditboxes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of TextEditboxes
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
Add
None
TextEditbox
Create a new text editbox.
AnyItem
None
Object
Returns any TextEditbox.
FirstItem
None
Object
Returns the first TextEditbox.
Description:
Object
Returns the TextEditbox with the specified ID.
TextEditbox
Returns the text editboxes within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he text editbox at the start of the range, or the index of the text editbox at the start of the range.
To
Variant
he text editbox at the end of the range, or the index of the text editbox at the end of the range.
LastItem
None
Object
Returns the last TextEditbox.
MiddleItem
None
Object
Returns the middle TextEditbox.
Object
Returns the next TextEditbox.
Object
Returns the previous TextEditbox.
NextItem
PreviousItem
1724
Name:
Type:
Description:
Obj
Object
he TextEditbox before the one desired.
Name:
Type:
Description:
Obj
Object
he TextEditbox after the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
TextExportPreference Properties Property: CharacterSet
Parent Platform
Type: Name:
Decimal:
idTextExportCharacterSet.idUnicode
1249209961
idTextExportCharacterSet.idDefaultPlatform
1415865972
Application Name:
Decimal:
idImportPlatform.idMacintosh
1296130931
idImportPlatform.idPC
1466852474
Access:
Description:
read/write
he character set to use when exporting plain text.
read only
he parent of the object.
read/write
he platform character set to use when exporting plain text.
InDesign CS Scripting Guide Visual Basic Reference 1725
TextFrame Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item, relative to its containing page item.
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item.
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item.
AbsoluteVerticalScale
Double
read/write
he vertical scaling percentage applied to the page item, relative to its containing page item.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All of the page items within this page item, regardless of their position in the object hierarchy (i.e., page items inside groups or inside other page items will be included).
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he transparency blending mode applied to the object. his property corresponds to the Blending Mode pop-up menu in the Transparency palette.
Buttons
read only
Every button
Characters
Characters
read only
Characters
Contents
Variant
read/write
he text frame’s contents
read/write
he type of content
BlendMode
Buttons
ContentType
1726
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Name:
Decimal:
idContentType.idUnassigned
1970168179
idContentType.idGraphicType
1735553140
idContentType.idTextType
1952412773
Visual Basic Reference
InDesign CS Scripting Guide
Property: CornerEffect
CornerRadius
EndCap
EndJoin
EndTextFrame FeatherCornerType
FeatherMode
Type: Name:
Decimal:
idCornerEffects.idNone
1852796517
idCornerEffects.idRoundedCorner
1667592804
idCornerEffects.idInverseRoundedCorner
1667591798
idCornerEffects.idInsetCorner
1667591795
idCornerEffects.idBevelCorner
1667588726
idCornerEffects.idFancyCorner
1667589742
Double
Name:
Decimal:
idEndCap.idButtEndCap
1650680176
idEndCap.idRoundEndCap
1919115632
idEndCap.idProjectingEndCap
1886020464
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
Variant Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
Access:
Description:
read/write
he corner effect applied to the page item. his property corresponds to the Effect pop-up menu in the Corner Effects dialog box.
read/write
he radius of the corner effect applied to the page item. his property corresponds to the Size field in the Corner Effects dialog box.
read/write
he appearance of the end points of an open path. his property corresponds to the End Cap options in the Stroke palette.
read/write
he appearance of the stroke at corner points. his property corresponds to the End Join options in the Stroke palette. his property has no effect on smooth (or “curve”) points on a path.
read only
he last text frame in the thread
read/write
his property controls the appearance of the feathering effect near the corners of the page item, and corresponds to the Corners pop-up menu in the Feather dialog box.
read/write
Turns feathering on or off for the page item. his property corresponds to the Feather option in the Feather dialog box.
FeatherWidth
Double
read/write
he width of the feathering effect applied to the page item. his option corresponds to the Feather Width field in the Feather dialog box.
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the page item.
FillTint
Double
read/write
he tint percentage applied to the fill of the page item (-1 indicates 100%, or no override).
FormFields
FormFields
read only
Every form field item
GapColor
Swatch
read/write
he swatch, color, tint, gradient, or mixed ink applied to the gap of the stroke of the page item.
GapTint
Double
read/write
he tint percentage applied to the gap of the stroke of the page item (-1 indicates 100%, or no override).
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width. If you want to consider the width of the stroke when calculating the bounds, use the visible bounds property instead.
GradientFillAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
InDesign CS Scripting Guide Visual Basic Reference 1727
Property:
Type:
Access:
Description:
GradientFillLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the fill of the page item.
GradientFillStart
Variant
read/write
he starting point of the gradient applied to the fill of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GradientStrokeAngle
Double
read/write
he angle of a linear gradient applied to the fill of the page item.
GradientStrokeLength
Double
read/write
he length of the ramp of a linear gradient (or the diameter of the ramp of a radial gradient) applied to the stroke of the page item.
GradientStrokeStart
Variant
read/write
he starting point of the gradient applied to the stroke of the page item (in page coordinates). For linear gradients, this property contains the location of one end of the gradient; for radial gradients, this property contains the center point of the gradient.
GraphicLines
GraphicLines
read only
All graphic lines
Groups
Groups
read only
Groups
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the page item.
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the text frame within its parent
InsertionPoints
InsertionPoints
read only
Insertion Points
IsolateBlending
Boolean
read/write
If true, blend the page item in isolation. his property corresponds to the Isolate Blending option in the Transparency palette.
ItemLayer
Layer
read/write
he layer containing the page item.
KnockoutGroup
Boolean
read/write
If true, apply transparency to the objects in the page item, but knock out any background objects. his property corresponds to the Knockout Group option in the Transparency palette.
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
A shape, such as an arrowhead, on the first (or “let) point of an open path.
LetLineEnd
1728
Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Lines
Lines
read only
Lines
read/write
he display setting for this page item.
LocalDisplaySetting
Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Locked
Boolean
read/write
If true, the page item is locked.
MiterLimit
Double
read/write
Defines the point at which a corner point switches from a mitered (pointed) join to a beveled (squared-off) join. If the width of the stroke at a corner point would be wider than this value times the stroke weight, InDesign applies a beveled join to the corner.
NextTextFrame
Variant
read/write
he next text frame in the thread
Nonprinting
Boolean
read/write
If true, the page item is non-printing.
Opacity
Double
read/write
he opacity of the page item. his property corresponds to the Opacity field/slider in the Transparency palette.
Ovals
Ovals
read only
All ovals
Overflows
Boolean
read only
Whether the frame has overset text. When true, there is more text in the story but no remaining text frames in which to place it
OverprintFill
Boolean
read/write
If true, the fill of the page item will overprint.
OverprintGap
Boolean
read/write
If true, overprint the gap color applied to the stroke of the page item.
OverprintStroke
Boolean
read/write
If true, overprint the stroke of the page item.
Overridden
Boolean
read only
If true, this page item originated on a master spread and was later overridden (i.e., copied to the document page). It is still linked to the page item on the master spread.
OverriddenMasterPageItem
PageItem
read only
A reference to the master page item linked to the page item (if any).
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the page item.
ParentStory
Story
read only
he related story
Paths
Paths
read only
All paths
Polygons
Polygons
read only
All polygons
PreviousTextFrame
Variant
read/write
he previous text frame in the thread
Rectangles
Rectangles
read only
All rectangles
InDesign CS Scripting Guide Visual Basic Reference 1729
Property: RightLineEnd
RotationAngle ShadowBlendMode
Type: Name:
Decimal:
idArrowHead.idNone
1852796517
idArrowHead.idSimpleArrowHead
1936289136
idArrowHead.idSimpleWideArrowHead
1937203560
idArrowHead.idTriangleArrowHead
1953655150
idArrowHead.idTriangleWideArrowHead
1953980776
idArrowHead.idBarbedArrowHead
1650553442
idArrowHead.idCurvedArrowHead
1668702568
idArrowHead.idCircleArrowHead
1668440424
idArrowHead.idCircleSolidArrowHead
1668505960
idArrowHead.idSquareArrowHead
1936810344
idArrowHead.idSquareSolidArrowHead
1936941416
idArrowHead.idBarArrowHead
1651663208
Double Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
Access:
Description:
read/write
A shape, such as an arrowhead, on the last (“right”) point of an open path.
read/write
he rotation angle of the page item.
read/write
he transparency blending mode applied to the drop shadow of the page item. his property corresponds to the Mode pop-up menu in the Drop Shadow dialog box.
ShadowBlurRadius
Double
read/write
he blur radius applied to the drop shadow of the page item. his property corresponds to the Blur field in the Drop Shadow dialog box.
ShadowColor
Swatch
read/write
he color of the drop shadow applied to the page item. his property corresponds to the Color pop-up menu in the Drop Shadow dialog box.
read/write
his property turns the drop shadow effect on or off for the page item, and corresponds to the Drop Shadow option in the Drop Shadow dialog box.
read/write
he opacity of the drop shadow applied to the page item, as a percentage from 0 to 100. his property corresponds to the Opacity field in the Drop Shadow dialog box.
ShadowMode
ShadowOpacity
1730
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
Double
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
ShadowXOffset
Double
read/write
he horizontal offset of the drop shadow from the page item, in current measurement units. his property corresponds to the X Offset field in the Drop Shadow dialog box. Negative values move the shadow to the let; positive values move it to the right.
ShadowYOffset
Double
read/write
he vertical offset of the drop shadow from the page item, in current measurement units. his property corresponds to the Y Offset field in the Drop Shadow dialog box. Negative values move the shadow to the up; positive values move it down.
ShearAngle
Double
read/write
he shear angle applied to the page item.
StartTextFrame
Variant
read only
he first text frame in the thread
read/write
his property controls the way that the stroke of a path is drawn relative to the path, and corresponds to the Stroke Alginment options in the Stroke palette.
read/write
he swatch, color, tint, gradient, or mixed ink applied to the stroke of the page item.
read/write
he method used to adjust the position of dashes and gaps on a dashed stroke around corner points on a path. his property corresponds to the Corners popup menu in the Stroke palette (only visible when a dashed stroke is selected).
StrokeAlignment
StrokeColor StrokeCornerAdjustment
Name:
Decimal:
idStrokeAlignment.idCenterAlignment
1936998723
idStrokeAlignment.idInsideAlignment
1936998729
idStrokeAlignment.idOutsideAlignment
1936998735
Variant Name:
Decimal:
idStrokeCornerAdjustment.idNone
1852796517
idStrokeCornerAdjustment.idDashes
1162113896
idStrokeCornerAdjustment.idGaps
1164406899
idStrokeCornerAdjustment.idDashesAndGaps
1148405616
StrokeDashAndGap
Variant
read/write
he dash and gap settings of a dashed line. A list of up to 6 values.
StrokeTint
Double
read/write
he tint percentage applied to the stroke of the page item (-1 indicates 100%, or no override).
StrokeType
StrokeStyle
read/write
he stroke type applied to the page item-either one of the default stroke types, or the name of a custom stroke style.
StrokeWeight
Double
read/write
he weight (in points) of the stroke applied to the page item.
Tables
Tables
read only
All tables
TextColumns
TextColumns
read only
Text columns
TextFrameIndex
Long
read only
Index of the text frame in its thread of linked frames
TextFramePreferences
TextFramePreference
read only
Text frame preferences
TextFrames
TextFrames
read only
Text Frames
TextPaths
TextPaths
read only
All text paths
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
TextWrapPreferences
TextWrapPreference
read only
he text wrap applied to the page item.
VerticalScale
Double
read/write
he vertical scaling percentage of the page item.
InDesign CS Scripting Guide Visual Basic Reference 1731
Property:
Type:
Access:
Description:
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width. If you want to ignore the width of the stroke when calculating the bounds, use the geometric bounds property instead.
Words
Words
read only
Words
Methods Method: AddPath
Parameters: Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Return:
Description:
PageItem
Create a new shape by adding the path(s) of this object with the paths of other objects. his method corresponds to the Add path operation (Objects>P athfinder>Add). Brings the object forward.
BringForward
None
Nothing
BringToFront
None
Nothing
Brings the object to the front.
Objects
Create outlines from the text.
CreateOutlines
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original objects.
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
PageItem
Creates a new shape by excluding area of intersection of this object with the other objects. his method corresponds to the Exclude Overlap path operation (Objects>Pathfinder >Exclude Overlap).
ExcludeOverlapPath
1732
Name:
Type:
Description:
With
Objects
he objects to exclude.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Export
ExtractLabel
Fit
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
IntersectPath
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Given
InsertLabel
Name:
Name:
Decimal:
idFitOptions.idContentToFrame
1668575078
idFitOptions.idFrameToContent
1718906723
idFitOptions.idCenterContent
1667591779
idFitOptions.idProportionally
1668247152
Return:
Description:
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Fit content within a frame.
Nothing
Sets the string associated with the given key (label name).
PageItem
Create a new shape based on the area of intersection of this object and other objects. his method corresponds to the Intersect path operation (Objec ts>Pathfinder>Intersect).
he fit option.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Objects
he objects to intersect with.
InDesign CS Scripting Guide Visual Basic Reference 1733
Method:
Parameters:
MakeCompoundPath
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Markup
Name:
Type:
Description:
Using
XMLElement
he element to mark up.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Name:
Type:
Description:
DestinationPage
Page
he page on which to override the master page item.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Name:
Type:
Description:
Using
XMLElement
he element to place into.
MinusBack
Move
Override
Place
PlaceXML
Return:
Description:
PageItem
Create a compound path by adding the paths of this object to the paths of other objects. his method corresponds to the Object>Compound Paths>Make command.
Nothing
Markup layout content with XML preserving the existing content.
PageItem
Create a new shape by reverse subtracting this object from other objects. his method corresponds to the Minus Back path operation (Objects>Pathfi nder>Minus Back).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
PageItem
Overrides an item from the master page and places it on the page.
Object
Place a file.
Nothing
Places XML content from the specified element replacing the existing content.
ReleaseCompoundPath
None
Objects
Releases a compound path and returns the released page items. Corresponds to the Object>Compound Path>Release menu option.
RemoveOverride
None
Nothing
Removes a locally overriden master page item
1734
Visual Basic Reference
InDesign CS Scripting Guide
Method:
Parameters:
Return:
Description:
ResetScaling
None
Nothing
Reset an item to 100% scaling, resizes to retain same appearance
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Resize
Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
InDesign CS Scripting Guide Visual Basic Reference 1735
Method: Rotate
ScaleTextAttributes
1736
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
None
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Rotate the page item.
Nothing
Move a text frame’s scaling into the text attributes
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[ExistingSelection]
Return:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Select this text frame.
How to handle the existing selection.
SendBackward
None
Nothing
Sends the object backward.
SendToBack
None
Nothing
Send object to the back
InDesign CS Scripting Guide Visual Basic Reference 1737
Method: Shear
Store
SubtractPath
1738
Parameters: Name:
Type:
Description:
By
Double
angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to transform around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
With
Objects
he objects to merge with this object.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
PageItem
Create a new shape by subtracting the area of intersection of this object and other objects from the other objects. his method corresponds to the Subtract path operation (Objec ts>Pathfinder>Subtract).
Method: Unlink
Parameters: Name: From
Type: Name:
Description: Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
What to unlink from.
Return:
Description:
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
InDesign CS Scripting Guide Visual Basic Reference 1739
TextFramePreference Properties Property: FirstBaselineOffset
Type: Name:
Decimal:
idFirstBaseline.idAscentOffset
1296135023
idFirstBaseline.idCapHeight
1296255087
idFirstBaseline.idLeadingOffset
1296852079
idFirstBaseline.idEmboxHeight
1296386159
idFirstBaseline.idXHeight
1299728495
idFirstBaseline.idFixedHeight
1296451695
Access:
Description:
read/write
he method used to calculate the distance between the first baseline of text in the text frame and the top inset of the text frame.
IgnoreWrap
Boolean
read/write
If true, the text in the text frame ignores the text wrap of other objects.
InsetSpacing
Variant
read/write
he text inset of the text frame. For rectangular text frames, this property contains a four-item array; for non-rectangular text frames, the property contains a single value.
MinimumFirstBaselineOffset
Variant
read/write
he minimum distance in points between the baseline of the first line of text in the text frame and the top inset of the text frame.
Parent
Variant
read only
he parent of the object.
TextColumnCount
Long
read/write
he number of columns in the text frame.
TextColumnFixedWidth
Variant
read/write
he fixed column width of the text frame.
TextColumnGutter
Variant
read/write
he distance between the columns of the text frame.
UseFixedColumnWidth
Boolean
read/write
If true, the columns of the text frame are a fixed width.
read/write
he type of vertical justification applied to the text frame.
read/write
he maximum amount of vertical space between two paragraphs.
VerticalJustification
Verticalhreshold
1740
Name:
Decimal:
idVerticalJustification.idTopAlign
1953460256
idVerticalJustification.idCenterAlign
1667591796
idVerticalJustification.idBottomAlign
1651471469
idVerticalJustification.idJustifyAlign
1785951334
Variant
Visual Basic Reference
InDesign CS Scripting Guide
TextFrames Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of TextFrames
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Layer]
Variant
he layer on which to create the TextFrame as Layer.
[At]
[Reference]
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
Return:
Description:
TextFrame
Create a new text frame.
Location.
Before/ater this TextFrame or at the beginning/end of this Document, Spread, Master Spread, Page or Layer as Document, Spread, MasterSpread, Page or Layer.
AnyItem
None
Object
Returns any TextFrame.
FirstItem
None
Object
Returns the first TextFrame.
Description:
Object
Returns the TextFrame with the specified ID.
TextFrame
Returns the text frames within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he text frame at the start of the range, or the index of the text frame at the start of the range.
To
Variant
he text frame at the end of the range, or the index of the text frame at the end of the range.
LastItem
None
Object
Returns the last TextFrame.
MiddleItem
None
Object
Returns the middle TextFrame.
InDesign CS Scripting Guide Visual Basic Reference 1741
Method: NextItem
PreviousItem
1742
Parameters: Name:
Type:
Description:
Obj
Object
he TextFrame before the one desired.
Name:
Type:
Description:
Obj
Object
he TextFrame ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Object
Returns the next TextFrame.
Object
Returns the previous TextFrame.
TextImportPreference Properties Property: CharacterSet
Type: Name:
Decimal:
idTextImportCharacterSet.idAnsi
1095652169
idTextImportCharacterSet.idASCII
1095975753
idTextImportCharacterSet.idUnicode
1249209961
idTextImportCharacterSet.idRecommendShitJIS83pv
1412969328
idTextImportCharacterSet.idShitJIS90pv
1413034096
idTextImportCharacterSet.idShitJIS90ms
1413034093
idTextImportCharacterSet.idGB2312
1416061535
idTextImportCharacterSet.idChineseBig5
1415799349
idTextImportCharacterSet.idMacintoshCE
1416446789
idTextImportCharacterSet.idMacintoshCyrillic
1416446841
idTextImportCharacterSet.idMacintoshGreek
1416447858
idTextImportCharacterSet.idMacintoshTurkish
1416451186
idTextImportCharacterSet.idWindowsCyrillic
1417102201
idTextImportCharacterSet.idWindowsEE
1417102661
idTextImportCharacterSet.idWindowsGreek
1417103218
idTextImportCharacterSet.idWindowsTurkish
1417106549
idTextImportCharacterSet.idDOSLatin2
1415867442
Access:
Description:
read/write
he character set to use.
ConvertSpacesIntoTabs
Boolean
read/write
If true, convert sequentially repeating spaces to tabs.
Dictionary
String
read/write
Language to use.
Parent
Application
read only
he parent of the object.
read/write
he platform character set to use when exporting plain text.
Platform
Name:
Decimal:
idImportPlatform.idMacintosh
1296130931
idImportPlatform.idPC
1466852474
SpacesIntoTabsCount
Long
read/write
he number of sequential spaces to convert to a tab.
StripReturnsBetweenLines
Boolean
read/write
If true, remove extra carriage returns at the ends of lines.
StripReturnsBetweenParagraphs
Boolean
read/write
If true, remove extra carriage returns between paragraphs.
InDesign CS Scripting Guide Visual Basic Reference 1743
TextPath Properties Property:
Type:
Access:
Description:
CenterBracket
Double
read only
he center bracket.
Characters
Characters
read only
Characters
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
EndBracket
Double
read/write
he end bracket.
EndTextFrame
Variant
read only
he last text frame in the thread.
read/write
he flip path effect.
FlipPathEffect
Name:
Decimal:
idFlipValues.idNotFlipped
1852206192
idFlipValues.idFlipped
2036755568
idFlipValues.idUndefinedFlipValue
1969646704
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the object within its parent object.
InsertionPoints
InsertionPoints
read only
Insertion Points
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
Lines
Lines
read only
Lines
NextTextFrame
Variant
read/write
he next text frame in the thread.
Overflows
Boolean
read only
If true, the text path contains overset text.
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
ParentStory
Story
PathAlignment
PathEffect
Name:
Decimal:
idPathTypeAlignments.idTopPathAlignment
1885434975
idPathTypeAlignments.idBottomPathAlignment
1885430367
idPathTypeAlignments.idCenterPathAlignment
1885430623
Name:
Decimal:
idTextPathEffects.idRainbowPathEffect
1601201778
idTextPathEffects.idSkewPathEffect
1601201779
idTextPathEffects.idRibbonPathEffect
1601201715
idTextPathEffects.idStairStepPathEffect
1601205107
idTextPathEffects.idGravityPathEffect
1601201767
read only
he related story
read/write
he path alignment.
read/write
he path effect.
PathSpacing
Long
read/write
he path spacing.
PreviousTextFrame
Variant
read/write
he previous text frame in the thread.
StartBracket
Double
read/write
he start bracket.
StartTextFrame
Variant
read only
he first text frame in the thread.
1744
Visual Basic Reference
InDesign CS Scripting Guide
Property: TextAlignment
Type: Name:
Decimal:
idTextTypeAlignments.idAscenderTextAlignment
1952538995
idTextTypeAlignments.idDescenderTextAlignment
1952539763
idTextTypeAlignments.idCenterTextAlignment
1952539508
idTextTypeAlignments.idBaselineTextAlignment
1952539244
idTextTypeAlignments.idAboveRightEmBoxTextAlignment
1952543333
idTextTypeAlignments.idBelowLetEmBoxTextAlignment
1952607333
idTextTypeAlignments.idAboveRightIcfBoxTextAlignment
1952543337
idTextTypeAlignments.idBelowLetIcfBoxTextAlignment
1952607337
Access:
Description:
read/write
he text alignment.
TextColumns
TextColumns
read only
Text columns
TextFrameIndex
Long
read only
Index of the text frame in its thread of linked frames.
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Words
Words
read only
Words
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature.
ExtractLabel
InsertLabel
Search
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
[ReplacingWith]
Boolean
String
If true, limit the search to text that matches the case used in the search string. he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character) For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter).
InDesign CS Scripting Guide Visual Basic Reference 1745
TextPaths Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of TextPaths
Item
Object
read only
Returns the object with the specified index (as Long) or label (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
TextPath
Create a new text path.
AnyItem
None
Object
Returns any TextPath.
FirstItem
None
Object
Returns the first TextPath.
Description:
Object
Returns the TextPath with the specified ID.
TextPath
Returns the text paths within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he text path at the start of the range, or the index of the text path at the start of the range.
To
Variant
he text path at the end of the range, or the index of the text path at the end of the range.
LastItem
None
Object
Returns the last TextPath.
MiddleItem
None
Object
Returns the middle TextPath.
Object
Returns the next TextPath.
Object
Returns the previous TextPath.
NextItem
PreviousItem
1746
Name:
Type:
Description:
Obj
Object
he TextPath before the one desired.
Name:
Type:
Description:
Obj
Object
he TextPath ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
TextPreference Properties Property:
Type:
Access:
Description:
AbutTextToTextWrap
Boolean
read/write
If true, text will abut the bottom of a text wrap object.
BaselineShitKeyIncrement
Double
read/write
he amount of baseline shit each press of the shit-option/alt-up arrow or shit-option/alt-down arrow increases or decreases.
HighlightCustomSpacing
Boolean
read/write
If true, use on-screen highlighting to identify custom spacing.
HighlightHjViolations
Boolean
read/write
If true, use on-screen highlighting to identify hyphenation and justification violations.
HighlightKeeps
Boolean
read/write
If true, use on-screen highlighting to identify paragraphs that violate keep options.
HighlightSubstitutedFonts
Boolean
read/write
If true, to highlight text formatted using missing fonts.
HighlightSubstitutedGlyphs
Boolean
read/write
If true, use on-screen highlighting to identify substituted glyphs.
JustifyTextWraps
Boolean
read/write
If true, to justify text where it wraps around other objects.
KerningKeyIncrement
Double
read/write
he amount of kerning each press of the option/alt-right arrow or option/alt-let arrow increases or decreases.
LeadingKeyIncrement
Double
read/write
he amount of leading each press of the option/alt-up arrow or option/alt-down arrow increases or decreases.
LinkTextFilesWhenImporting
Boolean
read/write
Whether text files should be linked when importing
Parent
Variant
read only
he parent of the object.
ScalingAdjustsText
Boolean
read/write
If true, scaling adjusts text attributes.
ShowInvisibles
Boolean
read/write
If true, show hidden characters.
SmallCap
Double
read/write
he percentage of the font size for text formatted as small caps. his setting has no effect on true small caps from an OpenType font.
SubscriptPosition
Double
read/write
he percentage of the leading that subscripted text will move.
SubscriptSize
Double
read/write
he percentage of the font size for subscripted text.
SuperscriptPosition
Double
read/write
he percentage of the leading that the superscripted text will move.
SuperscriptSize
Double
read/write
he percentage of the font size for superscripted text.
TypographersQuotes
Boolean
read/write
If true, typed straight quotes will be converted to typographic quotes.
UseOpticalSize
Boolean
read/write
If true, use a multiple master’s optical size axis.
UseParagraphLeading
Boolean
read/write
If true, apply leading changes to entire paragraphs.
ZOrderTextWrap
Boolean
read/write
Whether text wrap only affects text beneath it in the z order.
InDesign CS Scripting Guide Visual Basic Reference 1747
Texts Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Texts
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Text.
FirstItem
None
Object
Returns the first Text.
Text
Returns the texts within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he text at the start of the range, or the index of the text at the start of the range.
To
Variant
he text at the end of the range, or the index of the text at the end of the range.
LastItem
None
Object
Returns the last Text.
MiddleItem
None
Object
Returns the middle Text.
Object
Returns the next Text.
Object
Returns the previous Text.
NextItem
PreviousItem
1748
Name:
Type:
Description:
Obj
Object
he Text before the one desired.
Name:
Type:
Description:
Obj
Object
he Text ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
TextStyleRange Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
Ascent
Variant
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
AssociatedXMLElements
Objects
read only
Returns the associated XML elements
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
Baseline
Variant
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
Buttons
Buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
Characters
Capitalization
Characters
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Characters
InDesign CS Scripting Guide Visual Basic Reference 1749
Property:
Type:
Access:
Description:
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
Descent
Variant
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GradientFillStart
Variant
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
GradientStrokeAngle
Double
read/write
he angle of the gradient applied to the stroke of the text.
GradientStrokeLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
1750
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
GradientStrokeStart
Variant
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
GraphicLines
GraphicLines
read only
All graphic lines
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
Groups
Groups
read only
Groups
HorizontalOffset
Variant
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Index
Long
read only
Index of the object within its parent object.
InsertionPoints
InsertionPoints
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
InDesign CS Scripting Guide Visual Basic Reference 1751
Property:
Type:
Access:
Description:
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Length
Long
read only
he number of characters in the text object.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Lines
Lines
read only
Lines
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OpenTypeFeatures
Variant
read/write
open type features as Array of Longs
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
1752
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
ParentStory
Story
read only
he story containing the text object.
ParentTextFrame
TextFrame
read only
he text frame containing the text object.
PointSize
Double
read/write
he size of the text in points.
Polygons
Polygons
read only
All polygons
Position
Name:
Decimal:
read/write
he position attribute applied to the text.
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Rectangles
Rectangles
read only
All rectangles
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
InDesign CS Scripting Guide Visual Basic Reference 1753
Property:
Type:
Access:
Description:
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleBelowWidth
1754
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
Visual Basic Reference
InDesign CS Scripting Guide
Property: SingleWordJustification
Type: Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Justification for lines containing a single word.
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tables
Tables
read only
All tables
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this TextStyleRange as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
TextColumns
TextColumns
read only
Text columns
InDesign CS Scripting Guide Visual Basic Reference 1755
Property:
Type:
Access:
Description:
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Words
Words
read only
Words
Methods Method: ApplyStyle
Changecase
Parameters: Name:
Type:
Description:
Using
Variant
he paragraph style or character style to apply.
[ClearingOverrides]
Boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
Using
1756
Visual Basic Reference
Name:
Decimal:
idChangecaseMode. idUppercase
1667462499
idChangecaseMode. idLowercase
1667460195
idChangecaseMode. idTitlecase
1667462243
idChangecaseMode. idSentencecase
1667461987
InDesign CS Scripting Guide
Case option to use.
Return:
Description:
Nothing
Apply a paragraph or character style to the text object.
Nothing
Change the case of text.
Method: ConvertToTable
CreateOutlines
Delete Export
Parameters: Name:
Type:
Description:
[Column Separator]
String
he character to interpret as the column separator.
[RowSeparator]
String
he character to interpret as the row separator.
[NumberOfColumns]
Long
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original text.
None Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Return:
Description:
Table
Convert the text to a table. he parameters for this command correspond to the options in the Convert Text to Table dialog box (select some text and choose Table > Convert Text to Table to display this dialog box).
Objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Nothing
Deletes the object.
Nothing
Exports the object to a file.
InDesign CS Scripting Guide Visual Basic Reference 1757
Method: Markup
Move
Parameters: Name:
Type:
Description:
Using
XMLElement
he XML element to associate with the text.
Name:
Type:
Description:
To
Place
1758
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
InDesign CS Scripting Guide
Description:
Nothing
Associate the text with an XML element while preserving the existing text content.
Nothing
Moves the text.
Object
Place a file.
Where to move the text, relative to the reference object (before/ater).
[Reference]
Visual Basic Reference
Return:
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
[ExistingSelection]
Return:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects text.
How to handle the existing selection.
InDesign CS Scripting Guide Visual Basic Reference 1759
TextStyleRanges Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of TextStyleRanges
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any TextStyleRange.
FirstItem
None
Object
Returns the first TextStyleRange.
TextStyleRange
Returns the text style ranges within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he text style range at the start of the range, or the index of the text style range at the start of the range.
To
Variant
he text style range at the end of the range, or the index of the text style range at the end of the range.
LastItem
None
Object
Returns the last TextStyleRange.
MiddleItem
None
Object
Returns the middle TextStyleRange.
Object
Returns the next TextStyleRange.
Object
Returns the previous TextStyleRange.
NextItem
PreviousItem
1760
Name:
Type:
Description:
Obj
Object
he TextStyleRange before the one desired.
Name:
Type:
Description:
Obj
Object
he TextStyleRange ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
TextWrapPreference Properties Property:
Type:
Access:
ContourOptions
ContourOption
read only
he contour options.
Inverse
Boolean
read/write
If true, invert the text wrap (creating an inside-out wrap).
Parent
Variant
read only
he parent of the object.
Paths
Paths
read only
All paths
TextWrapOffset
Variant
read/write
he amount of offset to move the wrap away from the edges of the frame. as Unit (Double or String), Array of Units (Doubles or Strings) or idNothingEnum
read/write
he type of text wrap applied to the object.
TextWrapType
Name:
Decimal:
idTextWrapTypes.idNone
1852796517
idTextWrapTypes.idJumpObjectTextWrap
1650552420
idTextWrapTypes.idNextColumnTextWrap
1853384306
idTextWrapTypes.idBoundingBoxTextWrap
1651729523
idTextWrapTypes.idContour
1835233134
idTextWrapTypes.idUserModified
1970498916
Description:
InDesign CS Scripting Guide Visual Basic Reference 1761
Tint Properties Property:
Type:
Access:
Description:
ColorValue
Variant
read/write
he color values of the tint
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Tint within its parent Application or Document
Label
String
read/write
A property that can be set to any string (up to 32Kb of text).
read/write
he color model of the tint.
he name of the tint.
Model
Name:
Decimal:
idColorModel.idSpot
1936748404
idColorModel.idProcess
1886548851
idColorModel.idRegistration
1919248243
idColorModel.idMixedinkmodel
1768844664
Name
String
read/write
Parent
Variant
read only
he parent of the object.
read/write
he color space of the tint.
read/write
he percentage tint of the base color.
Space
TintValue
Name:
Decimal:
idColorSpace.idRGB
1666336578
idColorSpace.idCMYK
1129142603
idColorSpace.idLAB
1665941826
idColorSpace.idMixedInk
1666009432
Double
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Merge one or more other swatches into this one.
ExtractLabel
InsertLabel
Merge
1762
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
With
Variant
he swatches to merge.
Visual Basic Reference
InDesign CS Scripting Guide
Tints Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Tints
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Color]
Variant
he base color as Color.
Return:
Description:
Tint
Create a new tint.
AnyItem
None
Object
Returns any Tint.
FirstItem
None
Object
Returns the first Tint.
Description:
Object
Returns the Tint with the specified ID.
Tint
Returns the tints within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he tint at the start of the range, or the index of the tint at the start of the range.
To
Variant
he tint at the end of the range, or the index of the tint at the end of the range.
LastItem
None
Object
Returns the last Tint.
MiddleItem
None
Object
Returns the middle Tint.
Object
Returns the next Tint.
Object
Returns the previous Tint.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Tint before the one desired.
Name:
Type:
Description:
Obj
Object
he Tint ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1763
TOCStyle Properties Property:
Type:
Access:
Id
Long
read only
Description: he TOCStyle’s unique id
IncludeBookDocuments
Boolean
read/write
If the document this TOC style belongs to is in a book, whether to include TOC data from other book documents
IncludeHidden
Boolean
read/write
Whether to include text on hidden layers
Index
Long
read only
Index of the TOCStyle within its parent Application or Document
Label
String
read/write
A label that can be set to any string
Name
String
read/write
he name of the TOCStyle
Parent
Variant
read only
he TOCStyle’s parent as Application or Document
RunIn
Boolean
read/write
Whether the last levels of entries are run in
Title
String
read/write
he title of the table of content to create
TitleStyle
ParagraphStyle
read/write
he paragraph style TOC title is formatted to
TOCStyleEntries
TOCStyleEntries
read only
Every TOC style entry
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
1764
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
TOCStyleEntries Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of TOCStyleEntries
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[StyleName]
Variant
Paragraph style name to use for creating TOC style entry as String.
Return:
Description:
TOCStyleEntry
Add a new TOC style entry (selected from paragraph style).
AnyItem
None
Object
Returns any TOCStyleEntry.
FirstItem
None
Object
Returns the first TOCStyleEntry.
TOCStyleEntry
Returns the toc style entries within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he toc style entry at the start of the range, or the index of the toc style entry at the start of the range.
To
Variant
he toc style entry at the end of the range, or the index of the toc style entry at the end of the range.
LastItem
None
Object
Returns the last TOCStyleEntry.
MiddleItem
None
Object
Returns the middle TOCStyleEntry.
Object
Returns the next TOCStyleEntry.
Object
Returns the previous TOCStyleEntry.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he TOCStyleEntry before the one desired.
Name:
Type:
Description:
Obj
Object
he TOCStyleEntry ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1765
TOCStyleEntry Properties Property:
Type:
Access:
Description:
FormatStyle
ParagraphStyle
read/write
he paragraph style object which the TOC entry text will be formatted
Index
Long
read only
Index of the TOCStyleEntry within its parent TOCStyle
Level
Long
read/write
Level of this entry
Name
String
read/write
he name of the TOCStyleEntry
read/write
Options for where to put page number
CharacterStyle
read/write
he character style object which the page number of entry text will be formatted
Parent
TOCStyle
read only
he TOCStyleEntry’s parent
Separator
String
read/write
he string between entry text and page number
SeparatorStyle
CharacterStyle
read/write
he character style object which the separator text will be formatted
SortAlphabet
Boolean
read/write
Whether sort Table of Content alphabetically
PageNumberPosition
PageNumberStyle
Name:
Decimal:
idPageNumberPosition.idAterEntry
1634100590
idPageNumberPosition.idBeforeEntry
1650877806
idPageNumberPosition.idNone
1852796517
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
1766
Visual Basic Reference
InDesign CS Scripting Guide
TOCStyles Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of TOCStyles
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
TOCStyle
Create a new toc style.
AnyItem
None
Object
Returns any TOCStyle.
FirstItem
None
Object
Returns the first TOCStyle.
Description:
Object
Returns the TOCStyle with the specified ID.
TOCStyle
Returns the toc styles within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he toc style at the start of the range, or the index of the toc style at the start of the range.
To
Variant
he toc style at the end of the range, or the index of the toc style at the end of the range.
LastItem
None
Object
Returns the last TOCStyle.
MiddleItem
None
Object
Returns the middle TOCStyle.
Object
Returns the next TOCStyle.
Object
Returns the previous TOCStyle.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he TOCStyle before the one desired.
Name:
Type:
Description:
Obj
Object
he TOCStyle ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1767
Topic Properties Property:
Type:
Access:
Description:
CrossReferences
CrossReferences
read only
Every index cross reference
Index
Long
read only
Index of the Topic within its parent Index
Name
String
read only
he name of the index topic.
PageReferences
PageReferences
read only
Every index page reference
Parent
Index
read only
he parent of the object.
Subtopics
Subtopics
read only
Every index subtopic
Methods Method: Capitalize
Parameters: Name:
Type:
[CapitalizationOption]
Delete
1768
Description:
Name:
Decimal:
idIndexCapitalizationOptions.idSelectedEntry
1398042725
idIndexCapitalizationOptions.idIncludeSubentries
1767072325
idIndexCapitalizationOptions. idAllLevel1Entries
1095517556
idIndexCapitalizationOptions.idAllEntries
1097624645
None
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Applies capitalization options to the index entries.
Nothing
Deletes the object.
What to capitalize.
Topics Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Topics
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Name
String
Description: Topic name.
[SortBy]
Variant
String to use for sorting this topic as String.
Return:
Description:
Topic
Create a new topic.
AnyItem
None
Object
Returns any Topic.
FirstItem
None
Object
Returns the first Topic.
Topic
Returns the topics within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he topic at the start of the range, or the index of the topic at the start of the range.
To
Variant
he topic at the end of the range, or the index of the topic at the end of the range.
LastItem
None
Object
Returns the last Topic.
MiddleItem
None
Object
Returns the middle Topic.
Object
Returns the next Topic.
Object
Returns the previous Topic.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Topic before the one desired.
Name:
Type:
Description:
Obj
Object
he Topic ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1769
TransformPreference Properties Property:
Type:
Access:
Description:
DimensionsIncludeStrokeWeight
Boolean
read/write
Whether transform panel includes stroke weight in its dimension values
Parent
Application
read only
he TransformPreference’s parent
ScaleStrokes
Boolean
read/write
Whether strokes are scaled when objects are scaled
ShowContentOffset
Boolean
read/write
Whether transform panel display values includes stroke weight in its dimension values
TransformationsAreTotals
Boolean
read/write
Whether transform panel displays values for nested objects relative to the parent object
TransformContent
Boolean
read/write
Whether transform panel transforms content when rotating, scaling, skewing and resizing objects
1770
Visual Basic Reference
InDesign CS Scripting Guide
TransparencyPreference Properties Property: BlendingSpace
Parent
Type: Name:
Decimal:
idBlendingSpace.idDefault
1147563124
idBlendingSpace.idRGB
1666336578
idBlendingSpace.idCMYK
1129142603
Variant
Access:
Description:
read/write
Determines the color space in which colors will be blended on spreads where there is transparency present.
read only
he parent of the object.
InDesign CS Scripting Guide Visual Basic Reference 1771
TrapPreset Properties Property:
Type:
Access:
Description:
BlackColorhreshold
Double
read/write
Trap preset’s black color threshold in percentage between 0% and 100%
BlackDensity
Double
read/write
Trap preset’s black density in the range, 0.001 to 12.0
BlackWidth
Double
read/write
he trap preset’s black width in the range 0.0 and 8.0
ColorReduction
Double
read/write
Trap preset’s color reduction threshold in percentage between 0% and 100%
DefaultTrapWidth
Double
read/write
he trap preset’s default width in the range 0.0 and 8.0
Id
Long
read only
he TrapPreset’s unique id
read/write
he trap preset’s image placement
ImagePlacement
Name:
Decimal:
idTrapImagePlacementTypes.idCenterEdges
1953522542
idTrapImagePlacementTypes.idChoke
1953522536
idTrapImagePlacementTypes.idImageNeutralDensity
1953525348
idTrapImagePlacementTypes.idImagesOverSpread
1953526640
ImagesToImages
Boolean
read/write
If true, trap images to images
Index
Long
read only
Index of the TrapPreset within its parent Application or Document
InternalImages
Boolean
read/write
If true, trap images internally
Label
String
read/write
A label that can be set to any string
Name
String
read/write
he name of the TrapPreset
ObjectsToImages
Boolean
read/write
If true, trap objects to images.
OneBitImages
Boolean
read/write
If trye, apply trapping to one-bit images
Parent
Variant
read only
he TrapPreset’s parent as Application or Document
SlidingTraphreshold
Double
read/write
Trap preset’s sliding trap threshold in percentage between 0% and 100%
Stephreshold
Double
read/write
Trap preset’s step threshold in percentage between 1% and 100%
read/write
he trap preset’s end type
read/write
he trap preset’s join type
TrapEnd
TrapJoin
Name:
Decimal:
idTrapEndTypes.idMiterTrapEnds
1953525093
idTrapEndTypes.idOverlapTrapEnds
1953525612
Name:
Decimal:
idEndJoin.idMiterEndJoin
1835691886
idEndJoin.idRoundEndJoin
1919577966
idEndJoin.idBevelEndJoin
1651142510
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
String
Gets the label value associated with the given key (label name).
ExtractLabel
1772
Name:
Type:
Description:
Key
String
he key.
Visual Basic Reference
InDesign CS Scripting Guide
Method: InsertLabel
Parameters: Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Return:
Description:
Nothing
Sets the string associated with the given key (label name).
InDesign CS Scripting Guide Visual Basic Reference 1773
TrapPresets Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of TrapPresets
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
TrapPreset
Create a new trap preset.
AnyItem
None
Object
Returns any TrapPreset.
FirstItem
None
Object
Returns the first TrapPreset.
Description:
Object
Returns the TrapPreset with the specified ID.
TrapPreset
Returns the trap presets within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he trap preset at the start of the range, or the index of the trap preset at the start of the range.
To
Variant
he trap preset at the end of the range, or the index of the trap preset at the end of the range.
LastItem
None
Object
Returns the last TrapPreset.
MiddleItem
None
Object
Returns the middle TrapPreset.
Object
Returns the next TrapPreset.
Object
Returns the previous TrapPreset.
NextItem
PreviousItem
1774
Name:
Type:
Description:
Obj
Object
he TrapPreset before the one desired.
Name:
Type:
Description:
Obj
Object
he TrapPreset ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
UserDictionaries Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of UserDictionaries
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any UserDictionary.
FirstItem
None
Object
Returns the first UserDictionary.
UserDictionary
Returns the user dictionaries within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he user dictionary at the start of the range, or the index of the user dictionary at the start of the range.
To
Variant
he user dictionary at the end of the range, or the index of the user dictionary at the end of the range.
LastItem
None
Object
Returns the last UserDictionary.
MiddleItem
None
Object
Returns the middle UserDictionary.
Object
Returns the next UserDictionary.
Object
Returns the previous UserDictionary.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he UserDictionary before the one desired.
Name:
Type:
Description:
Obj
Object
he UserDictionary ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1775
UserDictionary Properties Property:
Type:
Access:
Description:
AddedWords
Variant
read/write
Words in the user dictionary.
Index
Long
read only
Index of the UserDictionary within its parent Application
Name
String
read only
he name of the user dictionary.
Parent
Application
read only
he parent of the object.
RemovedWords
Variant
read/write
Words in the not list dictionary.
Methods Method: AddWord
RemoveWord
1776
Parameters: Name:
Type:
Description:
AddedWords
Variant
he list of exceptions to remove from the user dictionary.
[RemovedList]
Boolean
If true, modify the ‘removed words’ list, the ‘added words’ list is modified by default.
Name:
Type:
Description:
RemovedWords
Variant
he list of exceptions to remove from the user dictionary.
[RemovedList]
Boolean
If true, modify the ‘removed words’ list, the ‘added words’ list is modified by default.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Add a word to the user dictionary.
Nothing
Remove a word from the user dictionary.
ValidationError Properties Property:
Type:
Access:
Description:
AttributeName
String
read only
he attribute name if the validation error refers to an attribute.
Element
XMLElement
read only
he XML element which caused the validation error.
ErrorMessage
String
read only
he validation error message.
Index
Long
read only
Index of the ValidationError within its parent Document
Parent
Document
read only
he parent of the object.
InDesign CS Scripting Guide Visual Basic Reference 1777
ValidationErrors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of ValidationErrors
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any ValidationError.
FirstItem
None
Object
Returns the first ValidationError.
ValidationError
Returns the validation errors within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he validation error at the start of the range, or the index of the validation error at the start of the range.
To
Variant
he validation error at the end of the range, or the index of the validation error at the end of the range.
LastItem
None
Object
Returns the last ValidationError.
MiddleItem
None
Object
Returns the middle ValidationError.
Object
Returns the next ValidationError.
Object
Returns the previous ValidationError.
NextItem
PreviousItem
1778
Name:
Type:
Description:
Obj
Object
he ValidationError before the one desired.
Name:
Type:
Description:
Obj
Object
he ValidationError ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
ViewPreference Properties Property:
Type:
Access:
Description:
CursorKeyIncrement
Double
read/write
he distance each press of an arrow key will move the selection.
GuideSnaptoZone
Long
read/write
he range within which an object snaps to guides.
read/write
he measurement unit to use for the horizontal ruler.
HorizontalMeasurementUnits
Parent RulerOrigin
Name:
Decimal:
idMeasurementUnits.idPoints
2054188905
idMeasurementUnits.idPicas
2054187363
idMeasurementUnits.idInches
2053729891
idMeasurementUnits.idInchesDecimal
2053729892
idMeasurementUnits.idMillimeters
2053991795
idMeasurementUnits.idCentimeters
2053336435
idMeasurementUnits.idCiceros
2053335395
Variant Name:
Decimal:
idRulerOrigin.idSpreadOrigin
1380143983
idRulerOrigin.idPageOrigin
1380143215
idRulerOrigin.idSpineOrigin
1380143984
read only
he parent of the object.
read/write
Where the default ruler origin (zero point) should appear.
ShowFrameEdges
Boolean
read/write
If true, show the edges of non-selected text frames.
ShowRulers
Boolean
read/write
If true, show the horizontal and vertical rulers.
read/write
he measurement unit to use for the vertical ruler.
VerticalMeasurementUnits
Name:
Decimal:
idMeasurementUnits.idPoints
2054188905
idMeasurementUnits.idPicas
2054187363
idMeasurementUnits.idInches
2053729891
idMeasurementUnits.idInchesDecimal
2053729892
idMeasurementUnits.idMillimeters
2053991795
idMeasurementUnits.idCentimeters
2053336435
idMeasurementUnits.idCiceros
2053335395
InDesign CS Scripting Guide Visual Basic Reference 1779
ViewZoomBehavior Properties Property:
Type:
Access:
Description:
EnableBehavior
Boolean
read/write
Whether behavior is enabled
Name:
read/write
he event which triggers the behavior
Event
Decimal:
idBehaviorEvents.idMouseUp
1836410230
idBehaviorEvents.idMouseDown
1835296118
idBehaviorEvents.idMouseEnter
1835361654
idBehaviorEvents.idMouseExit
1836606838
idBehaviorEvents.idOnFocus
1868981622
idBehaviorEvents.idOnBlur
1868719478
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the ViewZoomBehavior within its parent FormField or Button
Label
String
read/write
A property that can be set to any string (of up to 32Kb in length).
Name
String
read only
he name of the view zoom behavior.
Parent
Variant
read only
he parent of the object.
read/write
he View Zoom style.
ViewZoomStyle
Name:
Decimal:
idViewZoomStyle.idFullScreen
1987733107
idViewZoomStyle.idZoomIn
2053990766
idViewZoomStyle.idZoomOut
2054124916
idViewZoomStyle.idFitPage
2053534832
idViewZoomStyle.idActualSize
2053206906
idViewZoomStyle.idFitWidth
1212437335
idViewZoomStyle.idFitVisible
1212437334
idViewZoomStyle.idReflow
1987736166
idViewZoomStyle.idSinglePage
1987736432
idViewZoomStyle.idOneColumn
1987735395
idViewZoomStyle.idTwoColumn
1987736675
idViewZoomStyle.idRotateCW
1987736163
idViewZoomStyle.idRotateCCW
1987736183
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
1780
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Visual Basic Reference
InDesign CS Scripting Guide
ViewZoomBehaviors Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of ViewZoomBehaviors
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
ViewZoomBehavior
Create a new view zoom behavior.
AnyItem
None
Object
Returns any ViewZoomBehavior.
FirstItem
None
Object
Returns the first ViewZoomBehavior.
Description:
Object
Returns the ViewZoomBehavior with the specified ID.
ViewZoomBehavior
Returns the view zoom behaviors within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he view zoom behavior at the start of the range, or the index of the view zoom behavior at the start of the range.
To
Variant
he view zoom behavior at the end of the range, or the index of the view zoom behavior at the end of the range.
LastItem
None
Object
Returns the last ViewZoomBehavior.
MiddleItem
None
Object
Returns the middle ViewZoomBehavior.
Object
Returns the next ViewZoomBehavior.
Object
Returns the previous ViewZoomBehavior.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he ViewZoomBehavior before the one desired.
Name:
Type:
Description:
Obj
Object
he ViewZoomBehavior ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1781
Widget Properties Property:
Type:
Access:
Description:
Id
Long
read only
A unique number identifying the object.
Index
Long
read only
Index of the Widget within its parent DialogColumn, DialogRow, EnablingGroup or BorderPanel
MinWidth
Double
read/write
he minimum width of the control.
Parent
Variant
read only
he parent of the object.
1782
Visual Basic Reference
InDesign CS Scripting Guide
Widgets Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Widgets
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Widget.
FirstItem
None
Object
Returns the first Widget.
Description:
Object
Returns the Widget with the specified ID.
Widget
Returns the widgets within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he widget at the start of the range, or the index of the widget at the start of the range.
To
Variant
he widget at the end of the range, or the index of the widget at the end of the range.
LastItem
None
Object
Returns the last Widget.
MiddleItem
None
Object
Returns the middle Widget.
Object
Returns the next Widget.
Object
Returns the previous Widget.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Widget before the one desired.
Name:
Type:
Description:
Obj
Object
he Widget ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1783
Window Properties Property:
Type:
Access:
Description:
Bounds
Variant
read/write
he bounds of the window, in screen pixels.
Index
Long
read only
Index of the Window within its parent Document or Application
Name
String
read only
he name of the window.
Parent
Variant
read only
he parent of the object.
Selection
Variant
read/write
he selection of the window.
Methods Method:
Parameters:
Return:
Description:
BringToFront
None
Nothing
Brings the object to the front.
Close
None
Nothing
Close the window
Maximize
None
Nothing
Maximize the window
Minimize
None
Nothing
Minimize the window
Restore
None
Nothing
Restore the window
Nothing
Selects an object or objects. If the object is a text object (e.g., characters, words, lines, paragraphs), any other selected objects are deselected (the AppendSelection parameter has no effect).
Select
Name:
Type:
Description:
SelectableItems
Object, Array of Objects, or idNothingEnum.idNothing (to deselect all)
he object(s) to select.
[ExistingSelection]
1784
Visual Basic Reference
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
Windows Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Windows
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method:
Parameters:
Return:
Description:
Add
None
Window
Create a new window.
AnyItem
None
Object
Returns any Window.
FirstItem
None
Object
Returns the first Window.
Window
Returns the windows within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he window at the start of the range, or the index of the window at the start of the range.
To
Variant
he window at the end of the range, or the index of the window at the end of the range.
LastItem
None
Object
Returns the last Window.
MiddleItem
None
Object
Returns the middle Window.
Object
Returns the next Window.
Object
Returns the previous Window.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he Window before the one desired.
Name:
Type:
Description:
Obj
Object
he Window ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1785
WMF Properties Property:
Type:
Access:
Description:
AbsoluteHorizontalScale
Double
read/write
he horizontal scale of the page item relative to its containing page item
AbsoluteRotationAngle
Double
read/write
he rotation angle of the page item relative to its containing page item
AbsoluteShearAngle
Double
read/write
he shear angle of the page item relative to its containing page item
AbsoluteVerticalScale
Double
read/write
he vertical scale of the page item relative to its containing page item
AssociatedXMLElement
XMLElement
read only
Returns the associated XML element
read/write
he blend mode used to combine the object’s color with the background
BlendMode
ClippingPath FeatherCornerType
FeatherMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ClippingPathSettings Name:
Decimal:
idFeatherCornerType.idSharp
2020623201
idFeatherCornerType.idRounded
2020623202
idFeatherCornerType.idDiffusion
2020623203
Name:
Decimal:
idFeatherMode.idNone
1852796517
idFeatherMode.idStandard
2020623970
read only
he clipping path settings
read/write
he type of feathering to apply
read/write
he feather mode
FeatherWidth
Double
read/write
he width of the feathering
GeometricBounds
Variant
read/write
he bounds of the page item excluding the stroke width, in the format (top, let, bottom, right) as Array of 4 Units (Doubles or Strings)
HorizontalScale
Double
read/write
he scale percentage in the horizontal direction
Id
Long
read only
he WMF’s unique id
ImageTypeName
String
read only
he type of image
1786
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Index
Long
read only
Index of the WMF within its parent XMLElement, PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
IsolateBlending
Boolean
read/write
Indicates whether the object should blend in isolation
ItemLink
Link
read only
Link to a placed file
KnockoutGroup
Boolean
read/write
Indicates whether the object is a knockout group
Label
String
read/write
A label that can be set to any string
read/write
he display settings for this page item
LocalDisplaySetting
Name:
Decimal:
idDisplaySettings.idHighQuality
1346922866
idDisplaySettings.idTypical
1349810544
idDisplaySettings.idOptimized
1349480564
idDisplaySettings.idDefault
1147563124
Nonprinting
Boolean
read/write
Whether the page item is non-printing
Opacity
Double
read/write
he opacity of the object
Parent
Variant
read only
he WMF’s parent as XMLElement, PageItem, Oval, Rectangle, Polygon, GraphicLine, State, Group or Button
RotationAngle
Double
read/write
Angle of rotation
read/write
he blend mode to use for drawing the shadow
ShadowBlendMode
Name:
Decimal:
idBlendMode.idNormal
1852797549
idBlendMode.idMultiply
2020625762
idBlendMode.idScreen
2020625763
idBlendMode.idOverlay
2020625764
idBlendMode.idSotLight
2020625765
idBlendMode.idHardLight
2020625766
idBlendMode.idColorDodge
2020625767
idBlendMode.idColorBurn
2020625768
idBlendMode.idDarken
2020625769
idBlendMode.idLighten
2020625770
idBlendMode.idDifference
2020625771
idBlendMode.idExclusion
2020625772
idBlendMode.idHue
2020625773
idBlendMode.idSaturation
1380545377
idBlendMode.idColor
1668246642
idBlendMode.idLuminosity
2020625776
ShadowBlurRadius
Double
read/write
he radius of the blur to apply to the shadow
ShadowColor
Swatch
read/write
he color to apply to the shadow
read/write
he shadow mode
Double
read/write
he opacity of the shadow
ShadowXOffset
Double
read/write
he horizontal offset of the shadow
ShadowYOffset
Double
read/write
he vertical offset of the shadow
ShearAngle
Double
read/write
he shear angle of the page item relative to the spread
ShadowMode
ShadowOpacity
Name:
Decimal:
idShadowMode.idNone
1852796517
idShadowMode.idDrop
2020623440
InDesign CS Scripting Guide Visual Basic Reference 1787
Property:
Type:
Access:
Description:
TextWrapPreferences
TextWrapPreference
read only
he text wrap preferences
VerticalScale
Double
read/write
he scale percentage in the vertical direction
VisibleBounds
Variant
read/write
he bounds of the page item including the stroke width.
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Nothing
Exports the object to a file.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
Nothing
Move Page Item to a new location. One of the parameters (“To” or “By”) is required.
Export
ExtractLabel
InsertLabel
Move
1788
Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
Name:
Type:
Description:
[To]
Array of Doubles or Strings (x, y), or Spread, Page, or Layer
he new location of the object.
[By]
Array of Doubles or Strings (x, y)
Amount by which to move the object relative to its current position.
Visual Basic Reference
InDesign CS Scripting Guide
Method: Place
Parameters: Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
Return:
Description:
Object
Place a file.
InDesign CS Scripting Guide Visual Basic Reference 1789
Method: Resize
1790
Parameters: Name:
Type:
Description:
[HorizontalScale]
Variant
he horizontal scaling percentage to apply.
[VerticalScale]
Variant
he vertical scaling percentage to apply.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to scale around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1952400720
idAnchorPoint. idBottomLetAnchor
1768842084
idAnchorPoint. idBottomRightAnchor
1246775072
idAnchorPoint. idCenterAnchor
1952403524
idAnchorPoint. idLetCenterAnchor
1381254688
idAnchorPoint. idRightCenterAnchor
1398163232
idAnchorPoint. idTopCenterAnchor
1398163267
idAnchorPoint. idTopLetAnchor
1416066168
idAnchorPoint. idTopRightAnchor
1952412773
[ConsideringCurrentScale]
Boolean
If true then the object’s current scale and new scale will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are scaled.
[ConsideringParentsScale]
Boolean
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Nothing
Resize the page item. You must specify either horizontal scale or vertical scale or both.
Method: Rotate
Parameters: Name:
Type:
Description:
By
Double
he angle by which to rotate the page item.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to rotate around.
Name:
Decimal:
idAnchorPoint. idBottomCenterAnchor
1952400720
idAnchorPoint. idBottomLetAnchor
1768842084
idAnchorPoint. idBottomRightAnchor
1246775072
idAnchorPoint. idCenterAnchor
1952403524
idAnchorPoint. idLetCenterAnchor
1381254688
idAnchorPoint. idRightCenterAnchor
1398163232
idAnchorPoint. idTopCenterAnchor
1398163267
idAnchorPoint. idTopLetAnchor
1416066168
idAnchorPoint. idTopRightAnchor
1952412773
[ConsideringCurrentRotation]
Boolean
If true then the object’s current rotation and new rotation will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
If true then both the object and items within it are rotated.
[ConsideringParentsRotation]
Boolean
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread.
Return:
Description:
Nothing
Rotate the page item.
InDesign CS Scripting Guide Visual Basic Reference 1791
Method: Shear
Store
Unlink
Parameters: Name:
Type:
Description:
By
Double
Angle by which to shear the object.
[Around]
Array of Doubles or measurement strings (x, y), or:
he point to scale around.
Decimal:
idAnchorPoint. idBottomCenterAnchor
1095656035
idAnchorPoint. idBottomLetAnchor
1095656044
idAnchorPoint. idBottomRightAnchor
1095656050
idAnchorPoint. idCenterAnchor
1095656308
idAnchorPoint. idLetCenterAnchor
1095658595
idAnchorPoint. idRightCenterAnchor
1095660131
idAnchorPoint. idTopCenterAnchor
1095660643
idAnchorPoint. idTopLetAnchor
1095660652
idAnchorPoint. idTopRightAnchor
1095660658
[ConsideringCurrentShear]
Boolean
if true then the object’s current shear and new shear will be combined. If false then the new value is absolute. he default value is false.
[TransformingContent]
Boolean
if true then both the object and items within it are sheared.
[ConsideringParentsShear]
Boolean
if true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread.
Name:
Type:
Description:
Using
Library
he library in which to store.
Name:
Type:
Description:
From
1792
Name:
Visual Basic Reference
Name:
Decimal:
idUnlinkFrom.idPage
1885431653
idUnlinkFrom.idMasterSpread
1836281970
InDesign CS Scripting Guide
What to unlink from.
Return:
Description:
Nothing
Shear the page item.
Asset
Store a page item in a library.
Nothing
Detaches an overridden master page item from the page or from the master, or a text frame from its threads.
WMFs Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of WMFs
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any WMF.
FirstItem
None
Object
Returns the first WMF.
Object
Returns the WMF with the specified ID.
Widget
Returns the wm fs within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
Variant
he widget at the start of the range, or the index of the widget at the start of the range.
To
Variant
he widget at the end of the range, or the index of the widget at the end of the range.
LastItem
None
Object
Returns the last WMF.
MiddleItem
None
Object
Returns the middle WMF.
Object
Returns the next WMF.
Object
Returns the previous WMF.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he WMF before the one desired.
Name:
Type:
Description:
Obj
Object
he WMF ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1793
Word Properties Property:
Type:
Access:
Description:
AlignToBaseline
Boolean
read/write
If true, the baseline of the text in the paragraph containing the text object will align to the document’s baseline grid.
AllGraphics
Objects
read only
All graphics
AllPageItems
Objects
read only
All page item objects contained by this text object, including any nested page items or page items inside groups.
AppliedCharacterStyle
Variant
read/write
he character style applied to the text.
AppliedFont
Variant
read/write
he font applied to the text. You can apply a font using either a font object or a string containing the name of the font family (“MinionPro”). To set both the font family and the font style at the same time, you can also use a string in the form font_ family_name tab font_style_name (for example, “MinonPro Semibold Cond” for MinionPro Semibold Condensed).
AppliedLanguage
Variant
read/write
he language applied to the text. his value can be a language object or the name of the language dictionary (“,” for example).
AppliedParagraphStyle
Variant
read/write
he paragraph style applied to the text.
Ascent
Variant
read only
he maximum ascent of any character in the text object (in points, relative to the baseline of the line containing the text).
AssociatedXMLElements
Objects
read only
Returns the associated XML elements
AutoLeading
Double
read/write
Auto leading percentage applied to the paragraph containing the text. Multiply this value by the point size to calculate the leading value.
BalanceRaggedLines
Boolean
read/write
If true, InDesign will attempt to balance the lines (i.e., make them the same width) in the paragraph containing the text object. his property has no effect on justified text.
Baseline
Variant
read only
he vertical location of the baseline of the text, in the current vertical measurement units, relative to the ruler zero point.
BaselineShit
Double
read/write
he amount of baseline shit (in points) applied to the text object. Baseline shit is applied relative to the baseline of the line containing the text object. Positive values move the text above the baseline; negative values move the text below the baseline.
Buttons
Buttons
read only
Every button
read/write
he capitalization option applied to the text. Note that this does not change the typed characters in the text; only the appearance of the characters (on-screen and in print) is affected.
read only
Characters
Capitalization
Characters
1794
Name:
Decimal:
idCapitalization.idNormal
1852797549
idCapitalization.idSmallCaps
1936548720
idCapitalization.idAllCaps
1634493296
idCapitalization.idCapToSmallCap
1664250723
Characters
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
Composer
String
read/write
he text composer applied to the paragraph containing the text object. Use “Adobe Paragraph Composer” for the paragraph (i.e., multi-line) composer, or “Adobe Single-line Composer” for the single-line composer.
Contents
Variant
read/write
he contents of the text object. If the text object is a single character, this property might contain either a special character constant or a string; for text objects containing multiple characters, this property will contain a string.
Descent
Variant
read only
he maximum descent of any character in the text, in points, relative to the baseline of the line containing the text object.
DesiredGlyphScaling
Double
read/write
he desired glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Desired Glyph Scaling field in the Justification dialog box.
DesiredLetterSpacing
Double
read/write
he desired letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Letter Spacing field in the Justification dialog box.
DesiredWordSpacing
Double
read/write
he desired word spacing percentage applied to the paragraph containing the text. his property corresponds to the Desired Word Spacing field in the Justification dialog box.
DropCapCharacters
Long
read/write
Number of characters for drop cap.
DropCapLines
Long
read/write
Number of lines for drop cap.
DropCapStyle
Variant
read/write
Character style of drop cap as CharacterStyle or String
FillColor
Variant
read/write
he swatch, color, tint, gradient, or mixed ink applied to the fill of the text.
FillTint
Double
read/write
he tint applied to the fill color of the characters in the text object (-1 indicates no tint or 100%).
FirstLineIndent
Variant
read/write
he indent applied to the first line of the paragraph containing the text.
FontStyle
String
read/write
he name of the font style applied to the text (“Regular,” or “Bold,” for example).
FormFields
FormFields
read only
Every form field item
GradientFillAngle
Double
read/write
he angle of the gradient applied to the fill of the text (if any).
GradientFillLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the fill of the text.
GradientFillStart
Variant
read/write
he starting point of the linear gradient applied to the fill of the text, or the center point of a radial gradient applied to the fill of the text.
GradientStrokeAngle
Double
read/write
he angle of the gradient applied to the stroke of the text.
GradientStrokeLength
Double
read/write
Length of a linear gradient or the radius of a radial gradient applied to the stroke of the text.
InDesign CS Scripting Guide Visual Basic Reference 1795
Property:
Type:
Access:
Description:
GradientStrokeStart
Variant
read/write
he starting point of the linear gradient applied to stroke of the text, or the center point of a radial gradient applied to the stroke of the text.
GraphicLines
GraphicLines
read only
All graphic lines
GridAlignFirstLineOnly
Boolean
read/write
If true, only the first line of the paragraph containing the text object will be aligned to the frame grid (InDesign J only) or baseline grid.
Groups
Groups
read only
Groups
HorizontalOffset
Variant
read only
he horizontal location of the let edge of the first character in the text, in page coordinates, relative to the current zero point.
HorizontalScale
Double
read/write
he horizontal scaling percentage applied to the text object.
HyphenateAterFirst
Long
read/write
Sets the minimum length (in characters) of the word fragment preceding a hyphenation break.
HyphenateBeforeLast
Long
read/write
Sets the minimum length (in characters) of the word fragment following a hyphenation break.
HyphenateCapitalizedWords
Boolean
read/write
If true, hyphenate capitalized words in the text.
HyphenateLadderLimit
Long
read/write
Sets the maximum number of consecutive lines of text that can end with a hyphen.
HyphenateWordsLongerhan
Long
read/write
Sets the minimum word length (in characters) of words to eligible for hyphenation.
Hyphenation
Boolean
read/write
If true, hyphenation is on for the paragraph containing the text.
HyphenationZone
Variant
read/write
he width of the hyphenation zone applied to the paragraph containing the text.
HyphenWeight
Long
read/write
he weight (in points) of hyphen characters used in the text object.
Index
Long
read only
Index of the object within its parent object.
InsertionPoints
InsertionPoints
read only
Insertion Points
read/write
Alignment of the paragraph containing the text.
Justification
Name:
Decimal:
idJustification.idLetAlign
1818584692
idJustification.idCenterAlign
1667591796
idJustification.idRightAlign
1919379572
idJustification.idLetJustified
1818915700
idJustification.idRightJustified
1919578996
idJustification.idCenterJustified
1667920756
idJustification.idFullyJustified
1718971500
KeepAllLinesTogether
Boolean
read/write
If true, keep all lines in the paragraph together (i.e., don’t split them between text columns or text frames).
KeepFirstLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the bottom of a text frame or text column.
KeepLastLines
Long
read/write
Sets the minimum number of lines of the paragraph containing the text that will appear at the top of a text frame or text column.
1796
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
KeepLinesTogether
Boolean
read/write
If true, honor the settings of the KeepFirstLInes and KeepLastLines properties.
KeepWithNext
Long
read/write
Prevents InDesign from breaking text for 1-3 lines following the paragraph containing the text. In some cases, this will force InDesign to move the paragraph to the next text frame or text column.
KerningMethod
String
read/write
he kerning method applied to the text (optical, metrics or none).
KerningValue
Double
read/write
he amount of kerning applied to the characters in the text object.
Leading
Variant
read/write
he leading value (in points) applied to the text object, or ‘Auto’ for auto leading. he largest leading value in a line sets the leading for the line.
LetIndent
Variant
read/write
he let indent applied to the paragraph containing the text.
Length
Long
read only
he number of characters in the text object.
Ligatures
Boolean
read/write
If true, replace ligature character pairs (“fi,” “fl”) appearing in the text object with ligature characters.
Lines
Lines
read only
Lines
MaximumGlyphScaling
Double
read/write
he maximum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Maximum Glyph Scaling field in the Justification dialog box.
MaximumLetterSpacing
Double
read/write
he maximum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Letter Spacing field in the Justification dialog box.
MaximumWordSpacing
Double
read/write
he maximum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Maximum Word Spacing field in the Justification dialog box.
MinimumGlyphScaling
Double
read/write
he minumum glyph scaling percentage applied to the paragraph containing the text. his property corresponds to the Minimum Glyph Scaling field in the Justification dialog box.
MinimumLetterSpacing
Double
read/write
he minumum letter spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Letter Spacing field in the Justification dialog box.
MinimumWordSpacing
Double
read/write
he minumum word spacing percentage applied to the paragraph containing the text. his property corresponds to the Minimum Word Spacing field in the Justification dialog box.
NestedStyles
NestedStyles
read only
Nested styles
NoBreak
Boolean
read/write
If true, the no break attribute is applied to the text.
OpenTypeFeatures
Variant
read/write
open type features as Array of Longs
OTFContextualAlternate
Boolean
read/write
Whether to use contextual alternate forms in OpenType fonts
InDesign CS Scripting Guide Visual Basic Reference 1797
Property:
Type:
Access:
Description:
OTFDiscretionaryLigature
Boolean
read/write
Whether to use discretionary ligatures in OpenType fonts
read/write
Which figure style to use in OpenType fonts
OTFFigureStyle
Name:
Decimal:
idOTFFigureStyle.idTabularLining
1330931316
idOTFFigureStyle.idProportionalOldstyle
1330933619
idOTFFigureStyle.idProportionalLining
1330932848
idOTFFigureStyle.idTabularOldstyle
1330933620
idOTFFigureStyle.idDefault
1147563124
OTFFraction
Boolean
read/write
Whether to use fractions in OpenType fonts
OTFOrdinal
Boolean
read/write
Whether to use ordinals in OpenType fonts
OTFSwash
Boolean
read/write
Whether to use swash forms in OpenType fonts
OTFTitling
Boolean
read/write
Whether to use titling forms in OpenType fonts
Ovals
Ovals
read only
All ovals
OverprintFill
Boolean
read/write
If true, the fill of the characters in the text object will overprint.
OverprintStroke
Boolean
read/write
If true, the stroke of the characters in the text object will overprint.
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he parent of the object.
ParentStory
Story
read only
he story containing the text object.
ParentTextFrame
TextFrame
read only
he text frame containing the text object.
PointSize
Double
read/write
he size of the text in points.
Polygons
Polygons
read only
All polygons
Position
Name:
Decimal:
read/write
he position attribute applied to the text.
idPosition.idNormal
1852797549
idPosition.idSuperscript
1936749411
idPosition.idSubscript
1935831907
idPosition.idOTSuperscript
1884247155
idPosition.idOTSubscript
1884247138
idPosition.idOTNumerator
1884247150
idPosition.idOTDenominator
1884247140
Rectangles
Rectangles
read only
All rectangles
RightIndent
Variant
read/write
he right indent applied to the paragraph containing the text.
RuleAbove
Boolean
read/write
If true, the paragraph containing the text object has a rule above.
RuleAboveColor
Variant
read/write
he color of the paragraph rule above.
RuleAboveGapColor
Variant
read/write
he gap color of the paragraph rule above.
RuleAboveGapOverprint
Boolean
read/write
If true, overprint the rule above gap color.
RuleAboveGapTint
Double
read/write
he tint of the rule above gap color (-1 indicates no tint or 100%).
RuleAboveLetIndent
Variant
read/write
he let indent of the paragraph rule above.
1798
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
RuleAboveLineWeight
Double
read/write
he stroke weight of the paragraph rule above.
RuleAboveOffset
Variant
read/write
he offset of the paragraph rule above from the baseline of the first line of the paragraph containing the text. Positive values move the rule above the baseline; negative values move it below the baseline.
RuleAboveOverprint
Boolean
read/write
If true, the paragraph rule above will overprint.
RuleAboveRightIndent
Variant
read/write
he right indent of the paragraph rule above.
RuleAboveTint
Double
read/write
he tint of stroke applied to the paragraph rule above (-1 indicates no tint or 100%).
RuleAboveType
StrokeStyle
read/write
he stroke type of the rule above. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule above. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleAboveWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
RuleBelow
Boolean
read/write
If true, the paragraph containing the text object will have a rule below.
RuleBelowColor
Variant
read/write
he color of the paragraph rule below.
RuleBelowGapColor
Variant
read/write
he color of the paragraph rule below gap
RuleBelowGapOverPrint
Boolean
read/write
Whether to overprint the rule below gap color
RuleBelowGapTint
Double
read/write
he tint of the gap applied to the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowLetIndent
Variant
read/write
he let indent of the paragraph rule below.
RuleBelowLineWeight
Double
read/write
he stroke weight of the paragraph rule below.
RuleBelowOffset
Variant
read/write
he offset of the paragraph rule below.
RuleBelowOverPrint
Boolean
read/write
Whether to overprint the rule below
RuleBelowRightIndent
Variant
read/write
he right indent of the paragraph rule below.
RuleBelowTint
Double
read/write
he tint applied to the stroke color of the paragraph rule below (-1 indicates no tint or 100%).
RuleBelowType
StrokeStyle
read/write
he stroke type of the rule below. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
read/write
he basis for calculating the width of the paragraph rule below. You can base the width of the rule on the width of the column or on the composed width of the text in the paragraph.
RuleBelowWidth
Name:
Decimal:
idRuleWidth.idColumnWidth
1802270564
idRuleWidth.idTextWidth
1886681207
InDesign CS Scripting Guide Visual Basic Reference 1799
Property: SingleWordJustification
Type: Name:
Decimal:
idSingleWordJustification.idLetAlign
1818584692
idSingleWordJustification.idCenterAlign
1667591796
idSingleWordJustification.idRightAlign
1919379572
idSingleWordJustification.idFullyJustified
1718971500
Access:
Description:
read/write
Justification for lines containing a single word.
Skew
Double
read/write
he skewing angle (in degrees) applied to the text object.
SpaceAter
Variant
read/write
he space ater applied to the paragraph containing the text.
SpaceBefore
Variant
read/write
he space before applied to the paragraph containing the text.
read/write
his property controls the location at which InDesign will start the paragraph.
StartParagraph
Name:
Decimal:
idStartParagraph.idAnywhere
1851945579
idStartParagraph.idNextColumn
1667396203
idStartParagraph.idNextFrame
1313235563
idStartParagraph.idNextPage
1885500011
idStartParagraph.idNextOddPage
1332765291
idStartParagraph.idNextEvenPage
1164993131
StrikehroughColor
Variant
read/write
he stroke color of the strike through.
StrikehroughGapColor
Variant
read/write
he gap color of the strike through
StrikehroughGapOverprint
Boolean
read/write
If true, overprint the gap of the strike through applied to the text (if any).
StrikehroughGapTint
Double
read/write
he gap tint of the strike through
StrikehroughOffset
Variant
read/write
he offset of the strike through, relative to the baseline of the text (in points). Positive values move the strike through up; negative values move it down.
StrikehroughOverprint
Boolean
read/write
If true, overprint the strike through applied to the text (if any).
StrikehroughTint
Double
read/write
he tint of the strike through
StrikehroughType
StrokeStyle
read/write
he stroke type of the strikethrough. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
StrikehroughWeight
Double
read/write
he stroke weight of the strike through, in points.
Strikehru
Boolean
read/write
If true, InDesign applies the strikethrough type effect to the text object.
StrokeColor
Variant
read/write
he color applied to the stroke of the text.
StrokeTint
Double
read/write
he tint applied to the stroke color of the characters in the text object (-1 indicates no tint or 100%).
StrokeWeight
Double
read/write
he width (in points) of the stroke applied to the text.
Tables
Tables
read only
All tables
TabList
Variant
read/write
A list of all of the properties of all of the tab stops on this Word as Array of Arrays of ID/Value Pairs
TabStops
TabStops
read only
Tab Stops
TextColumns
TextColumns
read only
Text columns
1800
Visual Basic Reference
InDesign CS Scripting Guide
Property:
Type:
Access:
Description:
TextFrames
TextFrames
read only
Text Frames
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
Tracking
Double
read/write
he tracking or range kerning applied to the text object (in thousanths of an em).
Underline
Boolean
read/write
If true, InDesign applies the underline type style to the text object.
UnderlineColor
Variant
read/write
he color applied to the stroke of the underline.
UnderlineGapColor
Variant
read/write
he gap color applied to the stroke of the underline.
UnderlineGapOverprint
Boolean
read/write
If true, the gap of the underline will overprint.
UnderlineGapTint
Double
read/write
he gap tint of the stroke applied to the underline.
UnderlineOffset
Variant
read/write
he offset of the underline from the baseline of the text, in points. Positive values move the underline below the baseline of the text; negative values move it above the baseline.
UnderlineOverprint
Boolean
read/write
If true, the underline will overprint.
UnderlineTint
Double
read/write
he tint of the color applied to the stroke of the underline.
UnderlineType
StrokeStyle
read/write
he stroke type of the underline. his property can contain either one of the stroke type constants or the name of a stroke style defined in the document.
UnderlineWeight
Double
read/write
he stroke weight of the underline.
VerticalScale
Double
read/write
he vertical scaling percentage applied to the text object.
Words
Words
read only
Words
Methods Method: ApplyStyle
Changecase
Parameters: Name:
Type:
Description:
Using
Variant
he paragraph style or character style to apply.
[ClearingOverrides]
Boolean
If true, clear any local formatting in the text object before applying the style.
Name:
Type:
Description:
Using
Name:
Decimal:
idChangecaseMode. idUppercase
1667462499
idChangecaseMode. idLowercase
1667460195
idChangecaseMode. idTitlecase
1667462243
idChangecaseMode. idSentencecase
1667461987
Return:
Description:
Nothing
Apply a paragraph or character style to the text object.
Nothing
Change the case of text.
Case option to use.
InDesign CS Scripting Guide Visual Basic Reference 1801
Method: ConvertToTable
CreateOutlines
Delete Export
1802
Parameters: Name:
Type:
Description:
[Column Separator]
String
he character to interpret as the column separator.
[RowSeparator]
String
he character to interpret as the row separator.
[NumberOfColumns]
Long
he number of columns in the table (only used if the column and row separators are the same).
Name:
Type:
Description:
[DeleteOriginal]
Boolean
If true, delete the original text.
None Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Name:
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Visual Basic Reference
InDesign CS Scripting Guide
Return:
Description:
Table
Convert the text to a table. he parameters for this command correspond to the options in the Convert Text to Table dialog box (select some text and choose Table > Convert Text to Table to display this dialog box).
Objects
Create outlines from the text. If you set the delete original parameter to true, InDesign will delete the original text and insert the character outlines as an inline graphic; if the delete original parameter is false, InDesign creates an independent graphic and places it above the text.
Nothing
Deletes the object.
Nothing
Exports the object to a file.
Method: Markup
Move
Parameters: Name:
Type:
Description:
Using
XMLElement
he XML element to associate with the text.
Name:
Type:
Description:
To
Place
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Return:
Description:
Nothing
Associate the text with an XML element while preserving the existing text content.
Nothing
Moves the text.
Object
Place a file.
Where to move the text, relative to the reference object (before/ater).
[Reference]
Variant
A text object that specifies the destination of the text you’re moving.
Name:
Type:
Description:
FileName
file name as String
he file path of the file to place.
[PlacePoint]
Array of Doubles or Strings (x, y)
he point at which to place the file.
[DestinationLayer]
Layer or layer name as String
he layer on which to place the file.
[ShowingOptions]
Boolean
If true, display the import options dialog.
[Autoflowing]
Boolean
If true, autoflow placed text.
[RetainingFormatting]
Boolean
If true, keep formatting of placed text files.
[ConvertingQuotes]
Boolean
If true, convert straight quotes in placed text files to typographic quotes.
InDesign CS Scripting Guide Visual Basic Reference 1803
Method: Search
Parameters: Name:
Type:
Description:
[For]
String
he text to search for. Corresponds to the Find What field in the Find/Change dialog box. .
[WholeWord]
Boolean
If true, limit the search to whole words that match the search string.
[CaseSensitive]
Select
Boolean
1804
String
he replacement text. his parameter corresponds to the Change To field of the Find/Change dialog box.
Name:
Type:
Description:
Visual Basic Reference
Description:
Objects
Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. his command corresponds to InDesign’s Find/Change feature. You can use any of InDesign’s metacharacters as part of the “For” string (e.g., “^p” for a return character)
If true, limit the search to text that matches the case used in the search string.
[ReplacingWith]
[ExistingSelection]
Return:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
InDesign CS Scripting Guide
How to handle the existing selection.
For the “ReplacingWith” parameter, you can use some of InDesign’s metacharacters (e.g., “^t” for a tab character), but not all of them (wildcard characters, such as “^?” for any character, are not supported by this parameter). Nothing
Selects text.
WordRTFImportPreference Properties Property: ConvertPageBreaks
ConvertTablesTo
Type: Name:
Decimal:
idConvertPageBreaks.idNone
1852796517
idConvertPageBreaks.idPageBreak
1397778242
idConvertPageBreaks.idColumnBreak
1396927554
Name:
Decimal:
idConvertTablesTo.idUnformattedTable
1396921684
idConvertTablesTo.idUnformattedTabbedText
1398101076
Access:
Description:
read/write
How user defined page breaks in the imported file should be converted
read/write
Options for Convert Tables To
ImportIndex
Boolean
read/write
Whether to import index text
ImportNotes
Boolean
read/write
Whether to import footnotes and endnotes
ImportTOC
Boolean
read/write
Whether to import table of contents text
Parent
Application
read only
he WordRTFImportPreference’s parent
read/write
Whether to remove text and table formatting
RemoveFormatting Boolean
InDesign CS Scripting Guide Visual Basic Reference 1805
Words Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of Words
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any Word.
FirstItem
None
Object
Returns the first Word.
Word
Returns the words within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he word at the start of the range, or the index of the word at the start of the range.
To
Variant
he word at the end of the range, or the index of the word at the end of the range.
LastItem
None
Object
Returns the last Word.
MiddleItem
None
Object
Returns the middle Word.
Object
Returns the next Word.
Object
Returns the previous Word.
NextItem
PreviousItem
1806
Name:
Type:
Description:
Obj
Object
he Word before the one desired.
Name:
Type:
Description:
Obj
Object
he Word ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
XMLAttribute Properties Property:
Type:
Access:
Description:
Index
Long
read only
Index of the XMLAttribute within its parent XMLElement
Name
String
read/write
he name of the XMLAttribute
Parent
XMLElement
read only
he XMLAttribute’s parent
Value
String
read/write
he value
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Nothing
Select this XMLAttribute.
Select
Name: [ExistingSelection]
Type:
Description:
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide Visual Basic Reference 1807
XMLAttributes Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of XMLAttributes
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
Name
String
he attribute name.
Value
String
he attribute value.
Return:
Description:
XMLAttribute
Create a new attribute.
AnyItem
None
Object
Returns any XMLAttribute.
FirstItem
None
Object
Returns the first XMLAttribute.
XMLAttribute
Returns the xml attributes within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he xml attribute at the start of the range, or the index of the xml attribute at the start of the range.
To
Variant
he xml attribute at the end of the range, or the index of the xml attribute at the end of the range.
LastItem
None
Object
Returns the last XMLAttribute.
MiddleItem
None
Object
Returns the middle XMLAttribute.
Object
Returns the next XMLAttribute.
Object
Returns the previous XMLAttribute.
NextItem
PreviousItem
1808
Name:
Type:
Description:
Obj
Object
he XMLAttribute before the one desired.
Name:
Type:
Description:
Obj
Object
he XMLAttribute ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
XMLComment Properties Property:
Type:
Access:
Description:
Id
Long
read only
he XMLComment’s unique id
Index
Long
read only
Index of the XMLComment within its parent Document, XMLElement or XMLItem
Parent
Variant
read only
he XMLComment’s parent as Document, XMLElement or XMLItem
StoryOffset
Long
read only
he location of the object from the beginning of the story
Value
String
read/write
he comment’s value
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
XMLElement
Move element before/ater another element or text object, or to beginning/end.
Nothing
Select this XMLComment.
Move
Name: To
Select
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Location.
[Reference]
Variant
Before/ater this object as XMLItem or Text.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide Visual Basic Reference 1809
XMLComments Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of XMLComments
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method: Add
Parameters: Name:
Type:
Description:
StoryOffset
Variant
Offset within the story as InsertionPoint or Long.
[Value]
String
Value.
Return:
Description:
XMLComment
Create a new XML comment.
AnyItem
None
Object
Returns any XMLComment.
FirstItem
None
Object
Returns the first XMLComment.
Description:
Object
Returns the XMLComment with the specified ID.
XMLComment
Returns the xml comments within the specified range.
ItemByID
ItemByRange
Name:
Type:
Id
Long
Name:
Type:
Description:
From
Variant
he xml comment at the start of the range, or the index of the xml comment at the start of the range.
To
Variant
he xml comment at the end of the range, or the index of the xml comment at the end of the range.
LastItem
None
Object
Returns the last XMLComment.
MiddleItem
None
Object
Returns the middle XMLComment.
Object
Returns the next XMLComment.
Object
Returns the previous XMLComment.
NextItem
PreviousItem
1810
Name:
Type:
Description:
Obj
Object
he XMLComment before the one desired.
Name:
Type:
Description:
Obj
Object
he XMLComment ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
XMLElement Properties Property:
Type:
Access:
Characters
Characters
read only
Description: Characters
Contents
Variant
read/write
he text contents as String or idSpecialCharacters
DTDs
DTDs
read only
All DTDs
EPSs
EPSs
read only
EPSs
Id
Long
read only
he XMLElement’s unique id
Images
Images
read only
Images
Index
Long
read only
Index of the XMLElement within its parent Document, XMLElement or XMLItem
InsertionPoints
InsertionPoints
read only
Insertion Points
Lines
Lines
read only
Lines
MarkupTag
Variant
read/write
he markup tag object as XMLTag or String
PageItems
PageItems
read only
All page items
Paragraphs
Paragraphs
read only
Paragraphs
Parent
Variant
read only
he XMLElement’s parent as Document, XMLElement or XMLItem
ParentStory
Story
read only
he related story
PDFs
PDFs
read only
PDFs
PICTs
PICTs
read only
PICTs
Stories
Stories
read only
Stories
StoryOffset
Long
read only
he location of the object from the beginning of the story
TextColumns
TextColumns
read only
Text columns
Texts
Texts
read only
Texts
TextStyleRanges
TextStyleRanges
read only
Text Style Ranges
WMFs
WMFs
read only
WMFs
Words
Words
read only
Words
XMLAttributes
XMLAttributes
read only
All XML attributes
XMLComments
XMLComments
read only
All XML comments
XMLElements
XMLElements
read only
All XML elements
XMLInstructions
XMLInstructions
read only
All XML instructions
XMLItems
XMLItems
read only
All XML items
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
InDesign CS Scripting Guide Visual Basic Reference 1811
Method: Export
ImportXML
Markup
Move
Parameters: Name:
Type:
Description:
Format
String (name of the export format as it appears in the Export dialog box), or
he file type to export.
Decimal:
idExportFormat. idEPSType
1952400720
idExportFormat. idInCopy
1768842084
idExportFormat.idJPG
1246775072
idExportFormat. idPDFType
1952403524
idExportFormat.idRTF
1381254688
idExportFormat.idSVG
1398163232
idExportFormat. idSVGCompressed
1398163267
idExportFormat. idTaggedText
1416066168
idExportFormat. idTextType
1952412773
idExportFormat.idXML
1481460768
To
String
he file path to the exported file, including the file name.
[ShowingOptions]
Boolean
If true, display the export options dialog.
[Using]
Variant
he export preset to use.
Name:
Type:
Description:
From
String
he file name.
Name:
Type:
Description:
Using
Variant
he object to mark up as Text, Story or PageItem.
Name:
Type:
Description:
To
[Reference]
1812
Name:
Visual Basic Reference
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Variant
InDesign CS Scripting Guide
Location.
Before/ater this object as XMLItem or Text.
Return:
Description:
Nothing
Exports the object to a file.
Nothing
Import a XML file into an InDesign document.
Nothing
Markup layout content with XML preserving the existing content.
XMLElement
Move element before/ater another element or text object, or to beginning/end.
Method: PlaceXML
Select
Parameters: Name:
Type:
Description:
Using
Variant
he object to place into as Story or PageItem.
Name:
Type:
Description:
[ExistingSelection]
Untag Validate
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
Return:
Description:
Nothing
Places XML content in the specified object replacing the existing content.
Nothing
Select this XMLElement.
Nothing
Untag an element
Objects
Validate XML structure against a DTD.
How to handle the existing selection.
None Name:
Type:
Description:
[MaximumErrors]
Long
he maximum number of validation errors to generate.
InDesign CS Scripting Guide Visual Basic Reference 1813
XMLElements Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of XMLElements
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method: Add
Parameters: Name:
Type:
Description:
MarkupTag
Variant
he XML tag used to identify this element as String or XMLTag.
[XMLContent]
Variant
Content to be marked up as Text, Story or PageItem.
Return:
Description:
XMLElement
Create a new XML element.
AnyItem
None
Object
Returns any XMLElement.
FirstItem
None
Object
Returns the first XMLElement.
Object
Returns the XMLElement with the specified ID.
XMLElement
Returns the xml elements within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
Variant
he xml element at the start of the range, or the index of the xml element at the start of the range.
To
Variant
he xml element at the end of the range, or the index of the xml element at the end of the range.
LastItem
None
Object
Returns the last XMLElement.
MiddleItem
None
Object
Returns the middle XMLElement.
Object
Returns the next XMLElement.
Object
Returns the previous XMLElement.
NextItem
PreviousItem
1814
Name:
Type:
Description:
Obj
Object
he XMLElement before the one desired.
Name:
Type:
Description:
Obj
Object
he XMLElement ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
XMLExportMap Properties Property:
Type:
Access:
Description:
Index
Long
read only
Index of the XMLExportMap within its parent Application or Document
MappedStyle
Variant
read only
he style mapped to the XML tag as ParagraphStyle, CharacterStyle or String
MarkupTag
Variant
read/write
he markup tag object as XMLTag or String
Parent
Variant
read only
he XMLExportMap’s parent as Application or Document
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
InDesign CS Scripting Guide Visual Basic Reference 1815
XMLExportMaps Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of XMLExportMaps
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method: Add
Parameters: Name:
Type:
Description:
MappedStyle
Variant
he mapped style as ParagraphStyle, CharacterStyle or String.
MarkupTag
Variant
he tag to map as XMLTag or String.
Return:
Description:
XMLExportMap
Create a new mapping.
AnyItem
None
Object
Returns any XMLExportMap.
FirstItem
None
Object
Returns the first XMLExportMap.
XMLExportMap
Returns the xml export maps within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he xml export map at the start of the range, or the index of the xml export map at the start of the range.
To
Variant
he xml export map at the end of the range, or the index of the xml export map at the end of the range.
LastItem
None
Object
Returns the last XMLExportMap.
MiddleItem
None
Object
Returns the middle XMLExportMap.
Object
Returns the next XMLExportMap.
Object
Returns the previous XMLExportMap.
NextItem
PreviousItem
1816
Name:
Type:
Description:
Obj
Object
he XMLExportMap before the one desired.
Name:
Type:
Description:
Obj
Object
he XMLExportMap ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
XMLExportPreference Properties Property:
Type:
Access:
Description:
CopyFormattedImages
Boolean
read/write
Whether to copy formatted images to images sub folder
CopyOptimizedImages
Boolean
read/write
Whether to copy optimized images to images sub folder
CopyOriginalImages
Boolean
read/write
Whether to copy original images to images sub folder
ExcludeDtd
Boolean
read/write
Whether to exclude the DTD from the exported XML
ExportFromSelected
Boolean
read/write
Whether to export from a selected element (otherwise export the entire document)
read/write
File encoding to be used when exporting
read/write
Generate interlaced GIFs
read/write
Color palette to use for GIF conversion
read/write
Type of image to generate for optimized and formatted images
read/write
Format of converted JPEG image
read/write
Quality of converted JPEG image
Variant
read only
he XMLExportPreference’s parent as Application or Document
PreferredBrowser
String
read/write
he preferred browser for viewing XML
Ruby
Boolean
read/write
Whether to include Ruby in the exported XML
ViewAterExport
Boolean
read/write
Whether to view exported XML in a default viewer
FileEncoding
GIFOptionsInterlaced GIFOptionsPalette
ImageConversion
JPEGOptionsFormat
JPEGOptionsQuality
Parent
Name:
Decimal:
idXMLFileEncoding.idUTF8
1937134904
idXMLFileEncoding.idUTF16
1937125686
idXMLFileEncoding.idShitJIS
1249077875
Boolean Name:
Decimal:
idGIFOptionsPalette.idAdaptivePalette
1886151024
idGIFOptionsPalette.idMacintoshPalette
1886154096
idGIFOptionsPalette.idWebPalette
1886156656
idGIFOptionsPalette.idWindowsPalette
1886156644
Name:
Decimal:
idImageConversion.idAutomatic
1768059764
idImageConversion.idJPEG
1785751398
idImageConversion.idGIF
1734960742
Name:
Decimal:
idJPEGOptionsFormat.idBaselineEncoding
1785751394
idJPEGOptionsFormat.idProgressiveEncoding
1785751408
Name:
Decimal:
idJPEGOptionsQuality.idLow
1701727351
idJPEGOptionsQuality.idMedium
1701727588
idJPEGOptionsQuality.idHigh
1701726313
idJPEGOptionsQuality.idMaximum
1701727608
InDesign CS Scripting Guide Visual Basic Reference 1817
XMLImportMap Properties Property:
Type:
Access:
Description:
Index
Long
read only
Index of the XMLImportMap within its parent Application or Document
MappedStyle
Variant
read/write
he style mapped to the XML tag as ParagraphStyle, CharacterStyle or String
MarkupTag
Variant
read only
he markup tag object as XMLTag or String
Parent
Variant
read only
he XMLImportMap’s parent as Application or Document
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
1818
Visual Basic Reference
InDesign CS Scripting Guide
XMLImportMaps Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of XMLImportMaps
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method: Add
Parameters: Name:
Type:
Description:
MarkupTag
Variant
he tag to map as XMLTag or String.
MappedStyle
Variant
the mapped style as ParagraphStyle, CharacterStyle or String.
Return:
Description:
XMLImportMap
Create a new mapping.
AnyItem
None
Object
Returns any XMLImportMap.
FirstItem
None
Object
Returns the first XMLImportMap.
XMLImportMap
Returns the xml import maps within the specified range.
ItemByRange
Name:
Type:
Description:
From
Variant
he xml import map at the start of the range, or the index of the xml import map at the start of the range.
To
Variant
he xml import map at the end of the range, or the index of the xml import map at the end of the range.
LastItem
None
Object
Returns the last XMLImportMap.
MiddleItem
None
Object
Returns the middle XMLImportMap.
Object
Returns the next XMLImportMap.
Object
Returns the previous XMLImportMap.
NextItem
PreviousItem
Name:
Type:
Description:
Obj
Object
he XMLImportMap before the one desired.
Name:
Type:
Description:
Obj
Object
he XMLImportMap ater the one desired.
InDesign CS Scripting Guide Visual Basic Reference 1819
XMLImportPreference Properties Property: ImportStyle
Type: Name:
Decimal:
idXMLImportStyles.idAppendImport
1481466217
idXMLImportStyles.idMergeImport
1481469289
Access:
Description:
read/write
Whether to append or merge the incoming XML content
ImportToSelected
Boolean
read/write
Whether to import to a selected element (otherwise import at the root)
Parent
Variant
read only
he XMLImportPreference’s parent as Application or Document
1820
Visual Basic Reference
InDesign CS Scripting Guide
XMLInstruction Properties Property:
Type:
Access:
Description:
Data
String
read/write
he data of the PI
Id
Long
read only
he XMLInstruction’s unique id
Index
Long
read only
Index of the XMLInstruction within its parent Document, XMLElement or XMLItem
Parent
Variant
read only
he XMLInstruction’s parent as Document, XMLElement or XMLItem
StoryOffset
Long
read only
he location of the object from the beginning of the story
Target
String
read/write
he target of the PI
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
XMLElement
Move element before/ater another element or text object, or to beginning/end.
Nothing
Select this XMLInstruction.
Move
Name: To
Select
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Location.
[Reference]
Variant
Before/ater this object as XMLItem or Text.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide Visual Basic Reference 1821
XMLInstructions Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of XMLInstructions
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method: Add
Parameters: Name:
Type:
Description:
StoryOffset
Variant
Offset within the story as InsertionPoint or Long.
[Target]
String
Target.
[Data]
String
Data.
Return:
Description:
XMLInstruction
Create a new XML processing instruction.
AnyItem
None
Object
Returns any XMLInstruction.
FirstItem
None
Object
Returns the first XMLInstruction.
Object
Returns the XMLInstruction with the specified ID.
XMLInstruction
Returns the xml instructions within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
Variant
he xml instruction at the start of the range, or the index of the xml instruction at the start of the range.
To
Variant
he xml instruction at the end of the range, or the index of the xml instruction at the end of the range.
LastItem
None
Object
Returns the last XMLInstruction.
MiddleItem
None
Object
Returns the middle XMLInstruction.
Object
Returns the next XMLInstruction.
Object
Returns the previous XMLInstruction.
NextItem
PreviousItem
1822
Name:
Type:
Description:
Obj
Object
he XMLInstruction before the one desired.
Name:
Type:
Description:
Obj
Object
he XMLInstruction ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
XMLItem Properties Property:
Type:
Access:
Description:
DTDs
DTDs
read only
All DTDs
Id
Long
read only
he XMLItem’s unique id
Index
Long
read only
Index of the XMLItem within its parent Document, XMLElement or XMLItem
Parent
Variant
read only
he XMLItem’s parent as Document, XMLElement or XMLItem
XMLComments
XMLComments
read only
All XML comments
XMLElements
XMLElements
read only
All XML elements
XMLInstructions
XMLInstructions
read only
All XML instructions
XMLItems
XMLItems
read only
All XML items
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
Duplicate
None
Object
Duplicates the object.
XMLElement
Move element before/ater another element or text object, or to beginning/end.
Nothing
Select this XMLItem.
Move
Name: To
Select
Type:
Description:
Name:
Decimal:
idLocationOptions. idBefore
1650812527
idLocationOptions. idAter
1634104421
idLocationOptions. idAtEnd
1701733408
idLocationOptions. idAtBeginning
1650945639
idLocationOptions. idUnknown
1433299822
Location.
[Reference]
Variant
Before/ater this object as XMLItem or Text.
Name:
Type:
Description:
[ExistingSelection]
Name:
Decimal:
idSelectionOptions. idReplace
1701998700
idSelectionOptions. idAddTo
1633969202
idSelectionOptions. idRemoveFrom
1919249734
How to handle the existing selection.
InDesign CS Scripting Guide Visual Basic Reference 1823
XMLItems Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of XMLItems
Item
Object
read only
Returns the object with the specified index (as Long).
Methods Method:
Parameters:
Return:
Description:
AnyItem
None
Object
Returns any XMLItem.
FirstItem
None
Object
Returns the first XMLItem.
Object
Returns the XMLItem with the specified ID.
XMLItem
Returns the xml items within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
Variant
he xml item at the start of the range, or the index of the xml item at the start of the range.
To
Variant
he xml item at the end of the range, or the index of the xml item at the end of the range.
LastItem
None
Object
Returns the last XMLItem.
MiddleItem
None
Object
Returns the middle XMLItem.
Object
Returns the next XMLItem.
Object
Returns the previous XMLItem.
NextItem
PreviousItem
1824
Name:
Type:
Description:
Obj
Object
he XMLItem before the one desired.
Name:
Type:
Description:
Obj
Object
he XMLItem ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
XMLTag Properties Property:
Type:
Access:
Description:
Id
Long
read only
he XMLTag’s unique id
Index
Long
read only
Index of the XMLTag within its parent Application or Document
Label
String
read/write
A label that can be set to any string
Name
String
read/write
he name of the XMLTag
Parent
Variant
read only
he XMLTag’s parent as Application or Document
TagColor
Variant
read/write
he color of the tag as Array of 3 Doubles or idUIColors
Methods Method:
Parameters:
Return:
Description:
Delete
None
Nothing
Deletes the object.
String
Gets the label value associated with the given key (label name).
Nothing
Sets the string associated with the given key (label name).
ExtractLabel
InsertLabel
Name:
Type:
Description:
Key
String
he key.
Name:
Type:
Description:
Key
String
he key.
Value
String
he string to insert in the label.
InDesign CS Scripting Guide Visual Basic Reference 1825
XMLTags Properties Property:
Type:
Access:
Description:
Count
Long
read only
he number of XMLTags
Item
Object
read only
Returns the object with the specified index (as Long) or name (as String).
Methods Method: Add
Parameters: Name:
Type:
Description:
[Name]
Variant
he tag name as String.
[TagColor]
Variant
he color of the tag as Array of 3 Doubles or idUIColors.
Return:
Description:
XMLTag
Create a new tag.
AnyItem
None
Object
Returns any XMLTag.
FirstItem
None
Object
Returns the first XMLTag.
Object
Returns the XMLTag with the specified ID.
XMLTag
Returns the xml tags within the specified range.
ItemByID
ItemByRange
Name:
Type:
Description:
Id
Long
he ID of the object.
Name:
Type:
Description:
From
Variant
he xml tag at the start of the range, or the index of the xml tag at the start of the range.
To
Variant
he xml tag at the end of the range, or the index of the xml tag at the end of the range.
LastItem
None
Object
Returns the last XMLTag.
MiddleItem
None
Object
Returns the middle XMLTag.
Object
Returns the next XMLTag.
Object
Returns the previous XMLTag.
NextItem
PreviousItem
1826
Name:
Type:
Description:
Obj
Object
he XMLTag before the one desired.
Name:
Type:
Description:
Obj
Object
he XMLTag ater the one desired.
Visual Basic Reference
InDesign CS Scripting Guide
XMLViewPreference Properties Property:
Type:
Access:
Description:
Parent
Variant
read only
he XMLViewPreference’s parent as Application or Document.
ShowAttributes
Boolean
read/write
If true, show attributes as well as elements in the structure view.
ShowStructure
Boolean
read/write
If true, show the structure information for the document.
ShowTaggedFrames
Boolean
read/write
If true, highlight tagged frames in the document.
ShowTagMarkers
Boolean
read/write
If true, show tag markers for tagged text.
ShowTextSnippets
Boolean
read/write
If true, show text snippets of an element’s content in the Structure view.
InDesign CS Scripting Guide Visual Basic Reference 1827