getInsertionPoint

Syntax: getInsertionPoint(document)

Returns: A string in the format "page, x, y", or VOID if there is no insertion point.

The getInsertionPoint function returns the page number and coordinates at which the next append or appendFile command will insert new content into the document. This can be useful for deciding when to manually break pages, or allow you to place graphics in the margins of a document next to accompanying text.

Example:

The following code checks for an insertion point, and if there is one, places a graphic in the margin next to the insertion point:

set the itemDelimiter = ","
set insPt = getInsertionPoint(doc)
if stringP(insPt) then
   drawPicture member "dingbat", Point(-10, integer(item 3 of insPt))
end if