Connecting Tech Pros Worldwide Forums | Help | Site Map

Programming with Outlook

henrycortezwu@gmail.com
Guest
 
Posts: n/a
#1: Nov 21 '05
Hi All,
I'm thinking of including this method of sending attachments using
the code in the link below, it uses Outlook Objects.

How to send attachments in an e-mail message by using Visual Basic .NET
http://support.microsoft.com/default...b;en-us;313803

Several Questions,
1) When I create the Setup Program for my application is it legally
right to include the Outlook dll?

2) If a client w/o MS Outlook uses my app, will the applicaton fail to
"launch" from the start, or just the "form" that uses the outlook dll?

3) I plan to use Outlook Object 10 instead of 11, will version 10 work
with clients with Outlook 2003?

4) Is it possible to "catch" clients w/o Outlook installed?

5) Is it possible to "catch" clients w/ incompatible versions of
Outlook, say Outlook 98, if I decided to use Outlook XP dll or version
10?

Thanks so much!!
Henry :)


Cor Ligthert [MVP]
Guest
 
Posts: n/a
#2: Nov 21 '05

re: Programming with Outlook


> Hi All,[color=blue]
> I'm thinking of including this method of sending attachments using
> the code in the link below, it uses Outlook Objects.
>
> How to send attachments in an e-mail message by using Visual Basic .NET
> http://support.microsoft.com/default...b;en-us;313803
>
> Several Questions,
> 1) When I create the Setup Program for my application is it legally
> right to include the Outlook dll?
>[/color]

No it is illegal

Does this than answer the rest of your questions as well.

Cor


Stefan De Schepper
Guest
 
Posts: n/a
#3: Nov 21 '05

re: Programming with Outlook


Hi Henry,

You might consider using the MailMessage class instead:
http://msdn.microsoft.com/library/de...classtopic.asp

Hope this helps,
Stefan


<henrycortezwu@gmail.com> wrote in message
news:1122176962.052514.289650@f14g2000cwb.googlegr oups.com...[color=blue]
> Hi All,
> I'm thinking of including this method of sending attachments using
> the code in the link below, it uses Outlook Objects.
>
> How to send attachments in an e-mail message by using Visual Basic .NET
> http://support.microsoft.com/default...b;en-us;313803
>
> Several Questions,
> 1) When I create the Setup Program for my application is it legally
> right to include the Outlook dll?
>
> 2) If a client w/o MS Outlook uses my app, will the applicaton fail to
> "launch" from the start, or just the "form" that uses the outlook dll?
>
> 3) I plan to use Outlook Object 10 instead of 11, will version 10 work
> with clients with Outlook 2003?
>
> 4) Is it possible to "catch" clients w/o Outlook installed?
>
> 5) Is it possible to "catch" clients w/ incompatible versions of
> Outlook, say Outlook 98, if I decided to use Outlook XP dll or version
> 10?
>
> Thanks so much!!
> Henry :)
>[/color]


henrycortezwu@gmail.com
Guest
 
Posts: n/a
#4: Nov 21 '05

re: Programming with Outlook


Thanks for the quick reply,
I guess I'll have to do a late bind of the Outlook object instead.

Thanks again!!
Henry :)

Cor Ligthert [MVP] wrote:[color=blue][color=green]
> > Hi All,
> > I'm thinking of including this method of sending attachments using
> > the code in the link below, it uses Outlook Objects.
> >
> > How to send attachments in an e-mail message by using Visual Basic .NET
> > http://support.microsoft.com/default...b;en-us;313803
> >
> > Several Questions,
> > 1) When I create the Setup Program for my application is it legally
> > right to include the Outlook dll?
> >[/color]
>
> No it is illegal
>
> Does this than answer the rest of your questions as well.
>
> Cor[/color]

Paul Clement
Guest
 
Posts: n/a
#5: Nov 21 '05

re: Programming with Outlook


On 23 Jul 2005 20:49:22 -0700, henrycortezwu@gmail.com wrote:

¤ Hi All,
¤ I'm thinking of including this method of sending attachments using
¤ the code in the link below, it uses Outlook Objects.
¤
¤ How to send attachments in an e-mail message by using Visual Basic .NET
¤ http://support.microsoft.com/default...b;en-us;313803
¤
¤ Several Questions,
¤ 1) When I create the Setup Program for my application is it legally
¤ right to include the Outlook dll?
¤

No.

¤ 2) If a client w/o MS Outlook uses my app, will the applicaton fail to
¤ "launch" from the start, or just the "form" that uses the outlook dll?
¤

Not if you use late binding, which you should use if you're supporting multiple versions of Outlook.

¤ 3) I plan to use Outlook Object 10 instead of 11, will version 10 work
¤ with clients with Outlook 2003?
¤

Probably, but you should always develop for the oldest version supported.

¤ 4) Is it possible to "catch" clients w/o Outlook installed?
¤

Yes. You can check if Outlook has been installed using API function calls, such as FindExecutable,
or trap the error that occurs when you attempt to create the Outlook object.

¤ 5) Is it possible to "catch" clients w/ incompatible versions of
¤ Outlook, say Outlook 98, if I decided to use Outlook XP dll or version
¤ 10?

Probably. The most reliable method would be to find the Outlook executable (using FindExecutable)
and then retrieve the version info. Below is an example:

Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As
String, _
ByVal lpDirectory As
String, _
ByVal lpResult As
System.Text.StringBuilder) As Int32

Function IsOutlookInstalled(ByRef FileVersionMajor As String) As Boolean

Dim DummyFile As String
Dim FileDir As String

Dim FilePath As New System.Text.StringBuilder(255)
DummyFile = "e:\My Documents\dummy.fav"

If FindExecutable(DummyFile, FileDir, FilePath) > 32 Then
Console.WriteLine(FilePath)
IsOutlookInstalled = True
FileVersionMajor =
System.Diagnostics.FileVersionInfo.GetVersionInfo( FilePath.ToString).FileMajorPart
End If

End Function


IsOutlookInstalled(FileVersionMajor)



Paul
~~~~
Microsoft MVP (Visual Basic)
Closed Thread