Constants
Constants are set values that can be referenced without having to enter a variable into the content of a document.
Syntax:
!{[CONSTANT_NAME]}
Built-in Constants
TODAY
: The current date.
CURRENT_YEAR
: The current year.
USER_NAME
: Name of the current user.
USER_EMAIL
: Email of the current user.
DOC_TITLE
: Title of the current Google Doc.
DOC_OWNER_NAME
: Name of the owner of the current Google Doc.
DOC_URL
: Url of the current Google Doc.
LAST_MODIFIED
: Modified date of the current Google Doc.
LAST_MODIFIED_MDY
: Modified date of the current Google Doc in the format MM-DD-YYYY.
LAST_MODIFIED_DMY
: Modified date of the current Google Doc in the format DD-MM-YYYY.
LAST_MODIFIED_YMD
: Modified date of the current Google Doc in the format YYYY-MM-DD.
Custom Constants
Custom constants can be generated to use in the current document and other documents.
How to Add New Constants:
- Navigate to
Extensions
. - Choose
Doc Variables
. - Go to
Settings
. - Select
Constants
.