The first requirement is to make the
userform respond to pressing the ESC key on the keyboard, to close the
form without inserting the date. To do this, add a command button to
the userform with its cancel property set to true. This button doesn't
need to be on view, so it can be located behind the calendar. It will be
located behind the calendar by default, though its outline can be seen
when selected - as in the illustration below.


Double
click the 'hidden' button and the associated code dialog will open
Add the
code associated with that button thus:
Private Sub CommandButton1_Click()
Unload Me
End Sub
You could
have first renamed the command button to give it a more meaningful name,
but we only have one button on this form and the default will do the
job.
All that
remains is to add the code to insert the selected date into the
document. In the following example, the code inserts the date at the
cursor, This is the type of code you would use if the calling macro (at
the top of this page) was run from a toolbar button or keyboard
shortcut with the current date shown selected.

Private Sub Calendar1_Click()
With
Selection
.Text = Format(Calendar1.Value, "dd mmmm yyyy")
.MoveRight Unit:=wdCharacter, Count:=1
End With
Unload Me
End Sub
Private Sub UserForm_Initialize()
Calendar1.Value = Date
End Sub
The next
example is the type of code you might employ in a protected form. Here
the calling macro is run on entry to a form field with the default name
Text2. This calendar has an initial display with 30 days added to the
current date and inserts the selected date into the form field.

Private Sub
Calendar1_Click()
Dim oFld As FormFields
Set oFld = ActiveDocument.FormFields
oFld("Text2").Result = Format(Calendar1.Value, "dd mmmm yyyy")
Unload Me
End Sub
Private Sub UserForm_Initialize()
Calendar1.Value = Date + 30
End Sub