I am developing a .NET 2003 app that reviews Word and Excel documents via a
third party component that does NOT require Word or Excel to be loaded on
the target system. However, we need to be able to retreive document
properties, such as Author, from the Word/Excel file that this third party
component knows nothing about. Therefore, if Word/Excel is loaded on the
system, the user can select an option to retreive document properties.
In developing the code to facilitate the above feature, I have a refernce to
both Word and Excel in my project. How do I handle the situation where the
app is loaded on a PC without Word/Excel?
Clear as mud, I'm sure.
Thanks,
Michael
Uday Takbhate [MSFT] - 22 Sep 2005 03:35 GMT
Application would not work. As simple as that.
Uday Takbhate
--------------------
>From: "Michael Jackson" <michaeldjackson@cox.net>
>Newsgroups: microsoft.public.dotnet.framework.interop
[quoted text clipped - 10 lines]
>X-Complaints-To: abuse@cox.net
>X-Trace: okepread02 1127334808 24.250.191.197 (Wed, 21 Sep 2005 16:33:28
EDT)
>NNTP-Posting-Date: Wed, 21 Sep 2005 16:33:28 EDT
>Organization: Cox Communications
>Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
ne.de!news.glorb.com!cox.net!news-xfer.cox.net!p01!okepread02.POSTED!53ab275
0!not-for-mail
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.interop:9750
>X-Tomcat-NG: microsoft.public.dotnet.framework.interop
[quoted text clipped - 14 lines]
>Thanks,
>Michael
Michael Jackson - 22 Sep 2005 16:12 GMT
Well, I answered my own question and implemented it.
What I was looking for was late binding. In other words, if Word/Excel is
loaded on the target machine (as determined by registry entries), then use
CreateObject to get a Word.Application or Excel.Application object,
otherwise, disable the feature altogether.
> I am developing a .NET 2003 app that reviews Word and Excel documents via
> a third party component that does NOT require Word or Excel to be loaded
[quoted text clipped - 11 lines]
> Thanks,
> Michael