Display object properties in a msgbox

Build 1501 on 14/Nov/2017  This topic last edited on: 5/Aug/2014, at 15:09

To display an object properties in a message box, use the syntax as shown on the following code: msgbox (objectname.propertyname). This applies on all properties that can be displayed. In case that Strict On is turned on (in all system add-ins it is turned on), you might need to convert the result in a string, by means of Cstr(...).

    Dim omaster = Page.GetMasterObj

    MsgBox(omaster.colWAttr)

 

On the following screenshot, we run the code from the Script editor window, while a page was open: the displayed value is the master column width in mpt:

Click to toggle graphic size

 

To display the list of object properties, after written the object name, type a full stop and then look at the list of properties:

Click to toggle graphic size