Hi
There are some issues when using office components in VB.net, that I
have discovered over the last week or so. Check out the M$ MSDN website
for articles on PIA's (search for PIA).
1. If you are using Office XP and the final location where the app will
be deployed is using office XP (excel XP) then M$ recommends using there
Primary Interop Assemblies, which can be downloaded from there web site
(search for PIA). These have been written by M$ and are registered in
the Global Assembly Cache(GAC).
2. If you are not using Office XP (or excel XP), say Office 2000, then
vb.net will create Interop Assemblies for your, when this happens the
first time it might ask whether you want to make these the primary
interop assemblies and you should reply No to this, it will still make
Interop Assemblies but will create the in the app's bin directory which
you will need to ship with your app, these interops are NOT registered
in the GAC. M$ recommend not to register these in the GAC as there could
be version conflicts.
I have been speaking to M$ tech support on this issue and have been told
that M$ are looking to write Primary Interop Assemblies for Office 2000
but probably not for Office 97(no surprise there).
I will admit I had a bit of trouble with this to start with, mainly
because I had both Office 2000 & Office XP on the same PC, Other than
Outlook XP I had to revert back to Office 2000 which has cleared the
issuse's I was having.
Duncan
-->-----Original Message-----
-->From: Carlos Magalhaes [mailto:CarlosM@t...]
-->Sent: 20 February 2003 19:41
-->To: pro_VB_dotnet
-->Subject: [pro_vb_dotnet] RE: Office components
-->
-->
-->Go to your add ref and select Microsoft Office Excel Type
-->Library 10 (or 9 depending on which ver you have installed)
-->this is under the COM tab.
-->
-->
-->
-->HTH
-->
-->
-->
-->Best ADSI and DirectoryServices advice :
-->http://groups.yahoo.com/group/ADSIANDDirectoryServices
--><http://groups.yahoo.com/group/ADSIANDDirectoryServices>
-->
-->Best WMI programming advice :
-->http://groups.yahoo.com/group/WMIPROGRAMMING
--><http://groups.yahoo.com/group/WMIPROGRAMMING>
-->
-->Carlos Magalhaes
-->
-->
-->
-->-----Original Message-----
-->From: Dwaine Casmey [mailto:dcasmey@f...]
-->Sent: Thursday, February 20, 2003 8:59 PM
-->To: pro_VB_dotnet
-->Subject: [pro_vb_dotnet] Office components
-->
-->
-->
-->Which reference dll/tlb do I need or which namespace do I use for MS
-->
-->Excel programming in a VB.NET app? I've done it many times in VB6
-->
-->but...
-->
-->---
-->
-->VB.NET Handbooks Library Special Offer
-->
-->
-->
-->Get a massive 40% off this complete library
-->
-->of books (US residents only at the moment).
-->
-->Free ground shipping on this 10 book bundle!
-->
-->
-->
-->http://www.wroxdirect.com/proddescription.asp?Bookselect=BUN10E004
-->
-->---
-->
-->
-->
-->
-->
-->
-->
-->
-->---
-->VB.NET Handbooks Library Special Offer
-->
-->Get a massive 40% off this complete library
-->of books (US residents only at the moment).
-->Free ground shipping on this 10 book bundle!
-->
-->http://www.wroxdirect.com/proddescription.asp?Bookselect=BUN10E004
-->---
-->
-->
-->
-->