VBA

Updated: 24 October 2023

Const

Use constants as a replacement for literal values. A constant is a named item that retains a constant value throughout program execution. Use constants anywhere, in place of actual values.

Public Const TEXT_HEIGHT As Long = 50

Miscellaneous

VarType Function

Debug Word Shapes

Updated: 02 April 2023

Sub DebugShapes()
    Dim story_range As Range
    Dim my_shape As Shape

    For Each story_range In ActiveDocument.StoryRanges
        For Each my_shape In story_range.ShapeRange
            Debug.Print my_shape.Type & "; " & my_shape.ID & "; " & my_shape.Name
        Next my_shape
    Next story_range

End Sub