SetName Method

Build 1501 on 14/Nov/2017  This topic last edited on: 10/Oct/2016, at 13:11

Description

Sets the tag name of the style associated with the object, so you can interrogate other style properties.

Note that the use of a name that does not correspond to a valid style will cause a run-time error.

Bug fixing: this command didn't do anything in versions prior to 2.1.2529.

Syntax

object.SetName (strName)

object

Required. Object name, returned by Text.GetTextStyle and GetParaStyle.

strName

Required. Tag name of the style.

Example

  Public Overridable Sub EditResizeHeadDecr()

    Dim objStyle = Text.GetParaStyle

    If objStyle.GetName = "" Then

      objStyle.SetName("head3")

      objStyle.SetPar(0, Units.ToVal("36pt"))

      Text.SetParaStyle(objStyle)

    End If

    HeadSize(objStyle, 1004, -1, 2000, 96000)

    objStyle.Dispose()

  End Sub