On 23 Jul 2005 20:49:22 -0700,
he***********@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)