besides mailto: another way to launch mail program and populate fields?

  • Thread starter Thread starter cj
  • Start date Start date
C

cj

Say I could say for a fact the program would work only with Outlook.
Does outlook make any methods or properties available that would allow
me to launch it and populate subject and body?

How does one find what methods and properties are available in software
packages?

Is there a way to tell what email program is a users default?
 
Thank you for posting.

As for launch email client(outlook), are you going to implement it for web
page based application or windows desktop application. Generally for web
page application, (accessed by client users over http), due to security
restriction, "mailto:" is the recommended approach. For desktop (like
winform) application, we can use code to programmatically automate the
Outlook client and send mail, here are some kb article describing how to
use .NET code to do the office/outlook automation:

#How to automate Outlook by using Visual Basic
http://support.microsoft.com/kb/220595/en-us

http://support.microsoft.com/kb/311452/en-us

http://support.microsoft.com/kb/819398/en-us

For example, here is a simple C# code snippet on creating outlook
application and mail object:

private void Test()
{
Outlook.Application olApp = new Outlook.ApplicationClass();
Outlook.MailItem mi = olApp.CreateItem(Outlook.OlItemType.olMailItem) as
Outlook.MailItem;
object o= System.Reflection.Missing.Value;
mi.To = "(e-mail address removed)";

mi.Display(o);


}

You can find the similiar VB/VB.NET code in the kb article.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top