MS Office PIAs “backward compatibility”

2020-07-11 04:57发布

问题:

I've successfully completed a Windows Forms application with MS Word integration - the application writes to mergefields in a Word Template. I did the template using MS Word 2007, but saved it in compatible mode as a 97-2003 '.dot' file. Due to the fact that I have Office 2007 installed, I'm using version 12.0 of the MS Word Object Library PIA. If I were to deploy this application, would another person using Office XP or 2003 be able to use it, hence my asking about compatibility?

I have copied the PIA DLLs to the output directory of the application.

回答1:

You can use apps compiled with older PIAs to automate Word 2007, but you cannot use apps compiled with the Office 2007 PIAs to automate earlier versions of Word.

Some things may work, but in general it is not supported.

The issue is, the newer versions of Word have new features, and the newer PIAs support those new features. You can easily build an app that exploits the new features in the newer PIAs. When you run that app against an older version of Word - who knows what wll happen.

It isn't only new "external" features you need to worry about. There could be new implementations in the PIAs that are compatible only with the newer versions of the Office apps.

So, what you are proposing to do is not safe, and not recommended.

You can download other versions of the PIAs.