473,624 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

office interop

Hi

I need to call methods from office apps from my vb.net app. Some of my
clients are still on office 2000 so to maintain compatibility I can not use
office 2003 PIA. Can I avoid the whole PIA route by using late binding?
Could someone please give me an example of using late binding for calling
office apps?

Thanks

Regards
Nov 21 '05 #1
5 3611

John,

You will still need the library from Office 2000. Yes they are backward
compatible. That is not true in all cases however. It is a pain but I
maintain all office installations on my machine in order to accommodate
these situations and for testing purposes because I want to be using the
bottom most library I know will be used by the client otherwise you run
the risk or writing incompatible code.

"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:Jo**@nospa m.infovis.co.uk :
Hi

I need to call methods from office apps from my vb.net app. Some of my
clients are still on office 2000 so to maintain compatibility I can not
use
office 2003 PIA. Can I avoid the whole PIA route by using late binding?
Could someone please give me an example of using late binding for calling

office apps?

Thanks

Regards


Nov 21 '05 #2
Hi John!

"John" schrieb
I need to call methods from office apps from my vb.net app. Some of my
clients are still on office 2000 so to maintain compatibility I can not
use office 2003 PIA. Can I avoid the whole PIA route by using late
binding? Could someone please give me an example of using late binding for
calling office apps?


Here is a small late-binding example:

How To Use Visual Basic .NET for Binding for Office Automation Servers
http://support.microsoft.com/kb/304661/EN-US/

Cheers

Arne Janning
Nov 21 '05 #3
I 've built a big project on .net excel interoperabilit y .. but i'm
struck bcoz i've to use that application with differenrt version of
applications. Can u Suggest any idea how can i change my excel com
wrapper on the runtime .. or with any other way which i can deploy the
system with respective excel com .

I'm having problem which compliing also as excel 2000 takes some less
arguments than excel 2002 , open and save functions ..
scorpion53061 wrote:

John,

You will still need the library from Office 2000. Yes they are backward
compatible. That is not true in all cases however. It is a pain but I
maintain all office installations on my machine in order to accommodate
these situations and for testing purposes because I want to be using the
bottom most library I know will be used by the client otherwise you run
the risk or writing incompatible code.

"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:Jo**@nospa m.infovis.co.uk :
Hi

I need to call methods from office apps from my vb.net app. Some of my
clients are still on office 2000 so to maintain compatibility I can not
use
office 2003 PIA. Can I avoid the whole PIA route by using late binding?
Could someone please give me an example of using late binding for calling

office apps?

Thanks

Regards


Nov 21 '05 #4
Hi Dhyan

I have not yet tried this but I was told to use late binding. This way you
do not need the interop dlls and hence no tying down to any particular
version at design time. Secondly at runtime call the function with one set
of arguments. If there is an error, trap the error and call the function
with the alternate arguments. Not elegant but it may work. If it does let us
all know.

Regards
"dhyan" <dh*******@gmai l.com> wrote in message
news:On******** ******@TK2MSFTN GP10.phx.gbl...
I 've built a big project on .net excel interoperabilit y .. but i'm struck
bcoz i've to use that application with differenrt version of applications.
Can u Suggest any idea how can i change my excel com wrapper on the
runtime .. or with any other way which i can deploy the system with
respective excel com .

I'm having problem which compliing also as excel 2000 takes some less
arguments than excel 2002 , open and save functions ..
scorpion53061 wrote:

John,

You will still need the library from Office 2000. Yes they are backward
compatible. That is not true in all cases however. It is a pain but I
maintain all office installations on my machine in order to accommodate
these situations and for testing purposes because I want to be using the
bottom most library I know will be used by the client otherwise you run
the risk or writing incompatible code.

"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:Jo**@nospa m.infovis.co.uk :
Hi

I need to call methods from office apps from my vb.net app. Some of my
clients are still on office 2000 so to maintain compatibility I can not
use
office 2003 PIA. Can I avoid the whole PIA route by using late binding?
Could someone please give me an example of using late binding for
calling

office apps?

Thanks

Regards


Nov 21 '05 #5

You can achieve multiple-version compatibility without resorting to late
binding.
It requires that you build an Interop assembly against the lowest version:
http://www.devcity.net/Articles/163/1/article.aspx

--scott

--

"John" wrote:
Hi Dhyan

I have not yet tried this but I was told to use late binding. This way you
do not need the interop dlls and hence no tying down to any particular
version at design time. Secondly at runtime call the function with one set
of arguments. If there is an error, trap the error and call the function
with the alternate arguments. Not elegant but it may work. If it does let us
all know.

Regards
"dhyan" <dh*******@gmai l.com> wrote in message
news:On******** ******@TK2MSFTN GP10.phx.gbl...
I 've built a big project on .net excel interoperabilit y .. but i'm struck
bcoz i've to use that application with differenrt version of applications.
Can u Suggest any idea how can i change my excel com wrapper on the
runtime .. or with any other way which i can deploy the system with
respective excel com .

I'm having problem which compliing also as excel 2000 takes some less
arguments than excel 2002 , open and save functions ..
scorpion53061 wrote:

John,

You will still need the library from Office 2000. Yes they are backward
compatible. That is not true in all cases however. It is a pain but I
maintain all office installations on my machine in order to accommodate
these situations and for testing purposes because I want to be using the
bottom most library I know will be used by the client otherwise you run
the risk or writing incompatible code.

"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:Jo**@nospa m.infovis.co.uk :

Hi

I need to call methods from office apps from my vb.net app. Some of my
clients are still on office 2000 so to maintain compatibility I can not
use
office 2003 PIA. Can I avoid the whole PIA route by using late binding?
Could someone please give me an example of using late binding for
calling

office apps?

Thanks

Regards


Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2578
by: Bob N5 | last post by:
I am working on an application that uses interop to do some simple operations with both Excel and Word. I have most of functionality working, but ran into issues on making things work with both versions of office. My questions are: 1. What is the 'best' practice for building an application that will work with both versions of office? Do I need to have a separate build with different references for each? 2. Can I install interop...
0
5560
by: AllenF | last post by:
I have a library (named DSG) created in C# which other programs use to build Excel spreadsheeets. This library uses the office PIAs "Microsoft.Office.Interop.Excel.dll" and also references the Microsoft Office v10 library using ActiveX. Recently I loaded Microsoft's Project 2003 (v11) to my programming computer for tracking purposes, which loaded the Microsoft Office v11 library. Now, when I run my programs (in VS C#) I get two errors:...
4
4062
by: J-T | last post by:
I'm trying to read an excell file in my .Net application using Office XP Primary Interop Assemblies (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_oxppias.asp). I have installed Office 2003 on my developemnt box.Will my application be able to read all kinds of Excell file (97-2000-2003)? Dose the wrapper that .Net framework generates backward copatiable? Do I have to have the same version of Office...
1
6927
by: Stephen Noronha | last post by:
Hi, I am trying a sample app to send an email from my app I am getting a "type not defined error" I have added "Office and Outlook" COM component but still I am getting this error... Please advice, Stephen
2
11452
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability, where, after adding a reference to Microsoft.Office.Core and a reference to Microsoft Word I declare objects as follows: Dim oWordApp As New Microsoft.Office.Interop.Word.Application, . Everything works fine on the development computer...
1
5501
by: BK | last post by:
I have a .NET Solution (currently in 2003, FW 1.1) that uses Office automation for a few things (generates a Word document, dumps datagrids to Excel, etc.). One of my programmers works on the project from time to time. We always have problems when he loads up the latest version of the Solution however, and it appears to be a compatibility issue with difference in Office versions. My development platform is Xp Professional running...
2
7290
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a "Array index out of bounds". Microsoft.Office.Interop.Outlook._Application olApp = new Microsoft.Office.Interop.Outlook.ApplicationClass(); Microsoft.Office.Interop.Outlook._NameSpace olNs = olApp.GetNamespace("MAPI");
1
3216
by: =?Utf-8?B?cm9i?= | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox and server (Exchange server mail box) to connect and then save the mailitems(from Inbox or any other folder) based on a filter to a*.msg file. I want to achieve this using only one Interop dll if this is possible. Tried so far:
1
2862
by: allbelonging | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox and server (Exchange server mail box) to connect and then save the mailitems(from Inbox or any other folder) based on a filter to a*.msg file. I want to achieve this using only one Interop dll if this is possible. Tried so far:
3
11626
OuTCasT
by: OuTCasT | last post by:
Hi I have created an asp.net project that exports items from datagridview to and outlook calendar This is the code that i have used.. Dim body As String Dim ends As String Dim location As String Dim start As String Dim subject As String
0
8685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8348
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.