Quote:

isee the output in the command window ...



Then the function obviously is not working or else you would not see the output.

There are FAQs that explain the proper use of RedirectOutput and the purpose of the var.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.