472,801 Members | 1,135 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,801 software developers and data experts.

References to different versions of MS Outlook in a VB.NET application

I am writing an application that utilizes a reference to Microsoft
Outlook. (Added a reference to the MS Outlook COM interface to my
project). I then write code such as:

dim olApp as new Outlook.Applicaiton
dim olNamespace as OutlOok.Namespace = olApp.....

I am deploying my application via the "publish" feature that makes it
downloadable and installable via the web.

The problem I'm running into is that I need the application to work with
various versions of Outlook (2003 & 2007, currently), or to not
utilize outlook at all. I can write error handling codes inside the
program to check for what version they have installed, but am running
into two problems.

1. Compiling: I am developing the application on a computer with OL 2007
(v.12), and can therefore not add a reference for the OL 2003 (v.11) COM
reference. I tried copying the project to another computer with OL 2003
and adding the reference there, but then it complains about not having
OL 2007. I've thought about just using late binding ("dim olApp as
object = createobject("Outlook.Application")") but really don't want to
go that route if I can avoid it.

2. Deploying: If I do compile the program using OL 2007 references and
they try to deploy / install to a computer without Outlook or with
Outlook 2003, it will not install because it needs the office 12.0
libraries installed in the GAC beforehand.

Is there a workaround for these two issues to make my application not
quite so dependent upon the references to specific versions of outlook,
yet still be able to do early binding throughout my code?
Nov 26 '07 #1
3 2894
On Nov 26, 8:30 am, Chet wrote:
I am writing an application that utilizes a reference to Microsoft
Outlook. (Added a reference to the MS Outlook COM interface to my
project). I then write code such as:

dim olApp as new Outlook.Applicaiton
dim olNamespace as OutlOok.Namespace = olApp.....

I am deploying my application via the "publish" feature that makes it
downloadable and installable via the web.

The problem I'm running into is that I need the application to work with
various versions of Outlook (2003 & 2007, currently), or to not
utilize outlook at all. I can write error handling codes inside the
program to check for what version they have installed, but am running
into two problems.

1. Compiling: I am developing the application on a computer with OL 2007
(v.12), and can therefore not add a reference for the OL 2003 (v.11) COM
reference. I tried copying the project to another computer with OL 2003
and adding the reference there, but then it complains about not having
OL 2007. I've thought about just using late binding ("dim olApp as
object = createobject("Outlook.Application")") but really don't want to
go that route if I can avoid it.

2. Deploying: If I do compile the program using OL 2007 references and
they try to deploy / install to a computer without Outlook or with
Outlook 2003, it will not install because it needs the office 12.0
libraries installed in the GAC beforehand.

Is there a workaround for these two issues to make my application not
quite so dependent upon the references to specific versions of outlook,
yet still be able to do early binding throughout my code?
A company I worked for had the exact same problem. The way they
solved it for years was to compile the program on a machine with the
older outlook on it since they are backwards compatible.

They ended up solving it by writing a web service that would do all
the e-mailing this way they didn't have to recompile for anything and
the only computer that needed the outlook reference was the one with
the web service.
Nov 26 '07 #2

I think I've tried this (compiled on the computer with older version)
and that would probably work, kind of. However, I want the program to
also run if the user doesn't have Outlook installed *at all* (it's kind
of an optional "feature") and so far haven't gotten anywhere with this.

Nov 26 '07 #3
Chet wrote:
>
I think I've tried this (compiled on the computer with older version)
and that would probably work, kind of. However, I want the program to
also run if the user doesn't have Outlook installed *at all* (it's kind
of an optional "feature") and so far haven't gotten anywhere with this.
I think I got this to work, or at least am making some progress. I went
to my references and changed it to "copy local" intead of "required" for
the outlook; it then installs fine. ... and the weird thing is, I am
using the OL 2007 reference on my develop / build computer and OL 2003
on my test computer, and it works just fine!
Nov 26 '07 #4

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

Similar topics

1
by: steve | last post by:
We have an application where a number of features are optional. These features are contained within separate dll assemblies. We don't want to distribute the optional dll assemblies if the user...
0
by: TEK | last post by:
Hello We have a quite huge project. To limit the solution size, rebuild time and so on we have divided the project in two different solution. One solution that holds the buiness entities, or...
3
by: deko | last post by:
If I create an MDE from an Access 2002 MDB, will the references "stick" when the MDE is installed on other workstations? For example: I've created an MDB that requires certain References to be...
6
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
0
by: Adam J. Schaff | last post by:
Hello all. I am part of a team about to start work on a large enterprise application. There will be a main application and a bunch of smaller applications that are all related and use the same...
8
by: Dan | last post by:
Hi - can anyone tell me how much different VB.net is different from VB6? I'm thinking of transitioning but would like to know more about its capabilities, ease of transition, etc. Any opinions...
3
by: wizzbangca | last post by:
Hi everyone. Having problems with a utility I am writing for work. The previous IT Director thoughtfully allowed 3 (2000, xp, 2003) versions of outlook to be installed rather than 1. Now I need...
0
by: Leif Beaton | last post by:
Hello All, I am outlining a new project, and I have come to the conclusion that I will need to access functionality offered by Outlook. The challenge arises when I need the application (windows...
46
by: Phil Reynolds | last post by:
I have Access 2000 and 2003 on my development machine. My client only has Access 2000. When I develop for this client, I run Access 2000. However, my code requires that I have the Microsoft Word...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.