You've put your variable into a string and have NoVarsInStrings set to "ON". It should be...

Code:

$RO = loginfo("Y:\CompInfo_Ofc_@YEAR@MONTHNO.txt",@WKSTA+','+@DATE+','+@TIME+','+$OfcType+
','+$ExcVer+','+$WordVer+','+$PPVer+','$AccVer+','+$PubVer+','+$ProjVer+','+$VisVer+','+
','+$OutVer+','+$FPgVer+','+$InfoVer)