When using Environment:VARNAME as the PDF file name, strange things happen:
(1) When VARNAME is not existing at time of profile creation but is created by the printing EXE file, the variable will always resolve to an empty string at print time.
(2) When VARNAME exists at time of profile creation, but is modified by the printing EXE file, the variable will always resolve to the content at profile creation.
Hence it seems as if either the resolution happens at profile creation. Is this correct?