Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Built-in Functions > TextBoxes

Native Textbox Formatting

Scroll Prev Up Next More

Requires InDesign or QuarkXPress 2016-2026.

 

Q++Studio represents textbox formatting as a string of comma-separated attribute settings from the list below. These settings are used internally to communicate with QuarkXPress and InDesign and can also be supplied through the sFormat parameter of FormatText.

 

The macro function FormatText accepts text, paragraph and textbox attributes, as well as cell and table styles when using InDesign. However, some attributes listed here are used internally by Q++Studio but are not available through FormatText. Attributes marked “Internal use only” generate message 187785 when supplied to FormatText.

 

Textbox Frame

 

Keyword

Example use

Attribute Description

 

frmPTSIZE

 

frmPTSIZE 0.5

 

The frame thickness in points.

frmSTYLE
Internal use only

frmSTYLE 128

The frame style (values from 127 to 136).

frmSH

frmSH 50

The frame shade in percent (integer values only).

frmOP

frmOP 10

The frame opacity in percent (integer values only).

frmCOLOR

frmCOLOR(Pantone 231U)

The frame color name as specified in QuarkXPress or InDesign.        Important remark

 

Textbox Background

 

Keyword

Example use

Attribute Description

 

boxSH

 

boxSH 50

 

The textbox background shade in percent (integer values only).

boxOP

boxOP 10

The textbox background opacity in percent (integer values only).

boxCOLOR

boxCOLOR(Pantone 231U)

The textbox background color name as specified in QuarkXPress or InDesign.        Important remark

 

Textbox Replaced by a PictureBox

 

Keyword

Example use

Attribute Description

 

picNAME

 

picNAME(c:\qpp\image.jpg)

 

File name of the image being used in the picturebox that replaces the current textbox.

picAL

picAL 0

The picture alignment to use to display the file specified by picNAME:

 

•0: center no stretch

•1: scale to fit

•2: full stretch

•3: top left

•4: specific values

•5: scale to fill*

•6: use item style**

 

*Requires QuarkXPress 2019-2026 or InDesign.

**Requires QuarkXPress 2017-2026 or InDesign.

picPageNum

picPageNum 12

The page number to display in the picturebox that replaces the current textbox (only applies when picNAME is a PDF or an InDesign file).

picPdfBoundingBox

picPdfBoundingBox 0

The PDF bounding box to use when displaying the PDF file specified by picNAME:

 

•0: media box

•1: crop box (QuarkXPress only)

•2: bleed box

•3: trim box

•4: visible content (InDesign only)

•5: art (InDesign only)

•6: page (InDesign only)

•7: content all layers (InDesign only)

 

Apart from the specific restrictions mentioned in the list above, the importation of PDF files as images requires QuarkXPress 2016-2026 or InDesign.

picInddCropOptions

picInddCropOptions 0

The INDD cropping options to use when displaying the InDesign file specified by picNAME:

 

•0: crop to page

•1: crop to bleed

•2: crop to slug

 

The importation of INDD files as images requires InDesign.

picTRANS
Internal use only

picTRANS 0

Picture transparency (0: false, 1=true).

picSizeBox
Internal use only

picSizeBox 1

Fit box/frame to picture (0: false, 1=true).

picScroX
Internal use only

picScroX 1.25

Picture x-scroll position in mm. (requires picAL=4)

picScroY
Internal use only

picScroY 1.25

Picture y-scroll position in mm. (requires picAL=4)

picScaX
Internal use only

picScaX 100

Picture x-scale in percent (integer values only).

(requires picAL=4)

picScaY
Internal use only

picScaY 100

Picture y-scale in percent (integer values only).

(requires picAL=4)

 

Text Positioning in Textbox

 

Keyword

Example use

Attribute Description

 

txtVALIGN
Internal use only

 

txtVALIGN 1

 

The textbox's text vertical alignment (top 0, center 1, bottom 2).

txtVJUST
Internal use only

txtVJUST 1.4

The textbox's text vertical alignment in mm.

txtCOL
Internal use only

txtCOL 2

The number of columns in the textbox.

•Add 1000 to increase the number of columns (ie. use 1001 to add 1 column).

•Add 2000 to decrease the number of columns (ie. use 2002 to remove 2 columns).

txtCOLGUT
Internal use only

txtCOLGUT 0.25

Size of the gutter between columns in mm.

txtINSALL
Internal use only

txtINSALL 1.5

Text Inset for all sides in points.

txtINSTOP
Internal use only

txtINSTOP 5.2

Text Inset for the top side in points.

txtINSLEF
Internal use only

txtINSLEF 5.2

Text Inset for the left side in points.

txtINSBOT
Internal use only

txtINSBOT 5.2

Text Inset for the bottom side in points.

txtINSRIG
Internal use only

txtINSRIG 5.2

Text Inset for the right side in points.

txtFBCAPHEI
Internal use only

txtFBCAPHEI 1.35

Caps height in mm.

txtFBCAPACC
Internal use only

txtFBCAPACC 1.35

Accented caps mm.

txtFBCAPASC
Internal use only

txtFBCAPASC 1.35

First baseline mm.

 

Textbox Deletion

 

Keyword

Example use

Attribute Description

 

boxDEL

 

boxDEL 1

 

Deletes the current text box and more depending on the parameter (1=box, 2=group, 3=layer, 4=page).

 

Using boxDEL inside an InDesign Table

 

If the macro token which calls FormatText with the boxDEL keyword is located inside an InDesign table, its effect is as follows:

 

•boxDEL 1: deletes the entire table object in which the macro token is located.

•boxDEL 2: deletes the parent textbox of the table in which that macro token is located.

 

 

Apply a Style to Textboxes, Cells and Tables

 

The automated application of box, cell, or table styles requires InDesign

IMPORTANT: if you are trying to apply a box, table or cell style to a template that is not the main grid of the script (or if your script is not using the use main grid as seed generation option) then you should make sure that that template contains at least one object that uses the style you plan to use (you can then set that object to be automatically deleted by the use of a zap token such as [1Zd>0] for example). Failing to do this will most often cause message 187330 to be generated.

Keyword

Example use

Attribute Description

 

STYBOX

 

STYBOX(aBoxStyleName)

 

Applies the textbox style or style sheet of aBoxStyleName to the current textbox.

 

STYCELL

 

STYCELL(aCellStyleName)

 

Applies the cell style or style sheet of aCellStyleName to the current table cell.

 

STYTABLE

 

STYTABLE(aTableStyleName)

 

Applies the table style or style sheet of aTableStyleName to the current table.

 

Apply a Master Page

 

The automated application of a master page requires InDesign

IMPORTANT: to use this feature your script must use the use main grid as seed generation option.

Keyword

Example use

Attribute Description

 

APPLYMASTER

 

APPLYMASTER(aMasterName)

 

Applies the master page with name aMasterName to the page containing the current textbox.

 

See also: differences between QuarkXPress and InDesign.

 


Topic 183095, last updated on 10-Oct-2026