Prompt to enter (custom) document property in Microsoft Word

I created a template with a custom document property called "myproperty". I can access this using fields with the DOCPROPERTY "myproperty" command. I want to make Word prompt the user for a value and set it as a value for myproperty. I know I can prompt using the FILLIN command, but I don't know how to pass the value to myproperty. The SET command seems to work only with bookmarks.

Any ideas how to achieve this?

Regards, naroslife


I managed to achieve my goal using this skeleton code:

Private Sub Document_New()
Dim strValue As String
strValue = InputBox("Enter a value for 'myproperty':", "myproperty", " ")

' the value will be an empty string, "", if the user cancels
' or deletes the default space; fix that
If strValue = "" Then strValue = " "

ActiveDocument.CustomDocumentProperties("myproperty").Value = strValue

ActiveDocument.Fields.Update
End Sub