InsObj Method (Article)

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 17:07

Description

Inserts the object (picture, multi-media elements etc.) of the specified type and id in the article at the specified position.

Available in Ted and Fred.

Syntax

object.InsObj nIdx,strType,nId

object

Required. Object name. Returned by Ted.GetActiveArticle.

nIdx

Insert position of the object, ranging from 0 = before the first element in the article to NTxts = after the last element in the article.

If it is not possible to insert objects of the specified type at this position the function fails with an error message.

If this parameter is negative the user is prompted to select an insertion position amongst all the valid ones for an object of the specified type. To get the idx of the current element, use GetCurTxtIdx.

strType

A string identifying the type of object to insert.

nId

Id of object to insert.

Remarks

A new text referencing the object is automatically created and inserted in the article. If more that one element type support the specified object type (e.g. we are inserting a picture and two different element types in the article structure can reference a picture) the user is prompted to chose one.

Context

Article object

See also

InsChildNode, InsNewTxt, InsNodeAtCur, InsTxt, InsTxtDlg, GetRefObj, HasRefObj, InsObjDlg, CanInsObj