I have an application which uses the Word and Excel interop references. I have a copy of MS Office 2003 and the client machines use Office 2007, and I get this prompt when clients try to install/run the application.
There are a few articles on this however the solutions either seemed specific to the particular issue or were just unresolved. How can I resolve this?
The referenced Office PIA must be installed and is therefor a requirement to this particular program.
This would happen if running any version of Office, say 2007, if the correctly versioned PIA was not installed. In any case, if the development machine has Office 2003 and the Office 14 PIAs this error would not occur because the “version 14” PIAs can be found in the development environment — even if Office 2010 itself was not installed.
See the Office 2010 PIA redistributables. I think the “version 14” PIAs might be installed automatically with Office 2010, but I am not certain.
Keep in mind that using PIA methods/properties which are not supported by the wrapped COM for the particular Office version will throw a
COMExceptionat runtime. That is, even if the Office 2003 environment has the 2010 PIAs installed, using 2007+ features might cause other runtime issues.Happy coding.