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.
For Office 2000 there’re no official PIAs. Meanwhile, Microsoft says: Microsoft does not guarantee that the Office PIA will be backwardly compatible or that the Office XP PIA and the Office 2003 PIA can be run side-by-side in the same instance of an Office application. Office XP managed code add-ins must be built against the Office XP PIAs.
And an Office PIA is an imported MS Office type library. For more details, please see the links below. I will just say that they are very easy to use. All in all, I recommend. However, there’s one problem here. There are official PIAs for Office XP and Office 2003 published by Microsoft. For Office 2000 there’re no official PIAs.
Office XP managed code add-ins must be built against the Office XP PIAs. The Office 2003 managed code add-ins must be built against the Office 2003 PIAs.
And the SaveAs2 method is added to the Document object that contains the properties introduced in Office 2010. To use the new features of Office 2010 and later, replace the Document.SaveAs method with the Document.SaveAs2 Method (Word). The Assistant and AnswerWizard features have been hidden in Word.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With