GetMode Method

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:23

Description

Returns the value of the second parameter of the >rem...< GNML tag.

The possible values are:

0        Normal text

1        Notes mode - the ModeData function will return the notes mode code

2        Text specific to a certain region - the ModeData function will return the region database id

3        Text to be excluded from a certain region - the ModeData function will return the region database id

4        Inserted text - the ModeData function will return the version number

5        Deleted text - the ModeData function will return the version number

Syntax

object.GetMode

object

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

To change mode use the SetMode function

Example

  <ShellCommand(CanExecute:="Ena_IsEditingText")> _

  Public Sub EditFontStyleWebOnly()

    If Not Text.TestTextSelection Then

      If Text.TestCursorInPreview Then

        MsgBox("To type web-only text, please switch to the source pane.")

      Else

     '   ToggleRem(9419, 2)

      End If

    Else  ' something is selected

      Text.EditBlockNoCmd()  ' added on 18-Mar-03

      Dim objTS As TextStatus

      objTS = Text.GetTextStatus()

      If objTS.GetMode = 0 Then

        objTS.SetMode(2, 9419)

      Else

        objTS.SetMode(0, 0)

      End If

      Text.SetTextStatus(objTS)

    End If

  End Sub

See also

Other hidden text properties and functions