Syntax
GetDocumentVar$(VariableName$)
Remarks
Returns the string associated with VariableName$, which was previously set for the active document with the SetDocumentVar statement. If the insertion point is not in a document — for example, if the macro-editing window is active — an error occurs.
Example
This AutoOpen macro determines whether there is a reminder note and, if so, displays it:
Sub MAIN
worknote$ = GetDocumentVar$("reminder")
If worknote$ <> "" Then
MsgBox worknote$, "Note from last time"
End If
End Sub
For an example that prompts for a reminder note to store with a document before closing it, see SetDocumentVar.
See Also
SetDocumentVar