http://www.perlmonks.org?node_id=411256


in reply to "type mismatch" in Word

The previous two responses were helpful and led to some further experimentation. The hash reference is definitely needed but it did not get rid of the "type mismatch" error. It is the FileFormat parameter that is causing the error msg. The SaveAs works without the error message if I omit the FileFormat parameter entirely but the file that is saved is saved in text format even though it may have the .doc extension. In short, the formatting settings are lost. The WordBasic FileSaveAs also does that. So while there is progress there is still something that prevents the FileFormat parameter from being accepted.