You can also dynamically declare a variable by creating a new property on an object, for example:
ActiveDocument.MyName = "Dan"
These variables are similar to global variables but they can be seen only within the scope of the object with which they are associated, and they exist only as long as the object exists. To access this variable you need to include the object name as well as the variable name, for example:
Console.Writeln(ActiveDocument.MyName)