Thank you so much I will give it a go. I would like to save the output file in a specific path. Do you know if there is a way I can pass the path or folder name to the UDF from the journal file? I want to use the UDF in a number od different cases so I want it to output independent of the case.