Thanks - The code stopped working since few users got migrated to office 2013 . most users are on office 2010 and they are also getting the same issue now. I tried ticking andf unticking the references as suggested but no joy.
Now I tried few things , amended the code as below and it works...