in reply to Re^2: Error opening ms word document
in thread Error opening ms word document

You have if(...) Maybe this is always false in your case?