Office 2003 PIA

P

ppp01

Hi all,

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 ?

Thanks
 
C

Cindy M -WordMVP-

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top