Examples:
The following VBA example checks for open documents. If a document is open, text is added and if there is no open document, a message displays in a message box.
Sub ApplicationDocument()
If Documents.Count > 0 Then
ActiveLayer.CreateArtisticText 0, 0, "Text"
Else
MsgBox " There is no document open."
End If
End Sub