HasCharW Method

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

Description

Returns true if the CharW property has a value.

Note: if there's no selection, the function always returns True. If there's selection, the function returns True only if the attribute has the same value in entire selection.

Syntax

object.HasCharW

object

Required. Object name, returned by Text.GetTextStatus, Text.GetParaTextStatus and Text.GetDefaultTextStatus functions

Remarks

    If objTS.HasCharH And objTS.HasCharW And objTDS.HasCharH Then ' size

      For t As Integer = 0 To UBound(aPreset) - 1

        minL = Units.ToVal(aPreset(t))

        minR = Units.ToVal(aPreset(t + 1))

        'msgbox ("t=" & t & " minL=" & minl & " minR=" & minr & " CharH=" & objTS.CharH)

        If objTS.CharH >= minL And objTS.CharH < minR Then

          If objTS.CharH >= minL Then

            retV = minR

            Exit For

          Else

            MsgBox("IncPreset couldn't find the next value, report this to the support desk!", vbExclamation, "IncPreset")

            Exit For

          End If

        ElseIf objTS.CharH < frsL Then

          retV = frsL

          Exit For

        ElseIf objTS.CharH >= lstR Then

          MsgBox("No bigger preset than " & aPreset(maxP) & "!", vbExclamation, "Increase Preset Range")

          Exit For

        Else

          'msgbox("Out of range")

        End If

      Next

    Else

      MsgBox("GN4 cannot determine the character type attributes, please reselect the text!", vbExclamation, "GN4")

    End If

See also

Other typeface, size and base properties and functions