Can you post your sample document. There is nothing wrong with your code. What is calling your code?