You can access currently edited object through EditedObject macro - {%EditedObject.FieldName%}
.
Edit:
It seems that a custom macro method is needed to do this for documents. I was able to do this by following code: 1) Create custom macro method (for how to do it see the documentation
MacroMethod method = new MacroMethod("MyEditedDoc", parameters => CMSContext.EditedDocument)
{
Type = typeof(TreeNode),
Comment = "Returns currently edited document.",
MinimumParameters = 0
};
MacroMethods.RegisterMethod(method);
2) Then in field editor of a document type you can use {%MyEditedDoc().DocumentName#%}
and it gets resolved on the Form tab.