Re: Office 2003 PIA

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi =?Utf-8?B?cHBwMDE=?=,

It's not clear what you mean by "not using" the PIAs. It is possible to use
Late-binding, then you can definitely automate an Office application with no
PIAs present.

But the code lines you show indicate you ARE using some kind of Interop
Assembly. If you're not using the PIAs, that means VS is generating IAs and
putting them into your project's folder.

You're allowed to do this, although some functionality might not be optimally
supported. You'd need to distribute these with your solution. You want to be
sure to program against the EARLIEST version of the application your solution is
meant to support.

Note that Microsoft doesn't "approve" of this approach. But it can work.

> I am writing automation for office 2003 using PIA, but I find that
> with using PIA or not just differ in the directives in the code,
>
> 1. with PIA
> using Microsoft.Office.Interop.Outlook;
>
> 2. without PIA
> using Microsoft.Office.Core;
> using Outlook;
>
>
> and the PIA is office version dependent, so it seems it is
> trouble to use the PIA, then why should we use PIA since we can just program
> automation without it ?
>

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

.



Relevant Pages

  • RE: Problems with Word 2000 automation
    ... if we wants to automation a COM object(word ... While in managed code, i.e. .NET, we need to use a interop assembly which ... Also office 2003 has its PIA but it is different from the Office XP one, ... Primary Interop Assemblies ...
    (microsoft.public.dotnet.framework.interop)
  • RE: Office Assembly shared usage
    ... deploy an Office solution based on Office PIA ... solution only wants to support Office XP and above. ... to use the Office 2003 Update: Redistributable Primary Interop Assemblies ...
    (microsoft.public.vsnet.general)
  • RE: EventHandler for late-bound COM object
    ... object does not expose its events in late binding and how to resolve it. ... we need Office Primary Interop Assembly (PIA) to automate ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Excel 2003 + 2007 on dev machine - deployment problems on Exce
    ... Looks like you've installed Office 2007's PIA. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Excel 2003 + 2007 on dev machine - deployment problems on Excel 2003 machine
    ... Are they the the ".NET Programmability Support" which is a per-application option which describes itself as "Primary interop assembly that allows Microsoft Office programmability with .NET Framework version 1.1 or greater". ... Looks like you've installed Office 2007's PIA. ... Please uninstall Office 2007's PIA and install Office 2003 PIA from here: ...
    (microsoft.public.dotnet.framework.interop)