473,385 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Outlook Express again!

Hi,

I am not sure if we can call Outlook Express in the C# windows form project.
However, my boss he thinks that it should be able to open, since the VSC#
and Outlook Express are all MS's product,
but I'm not so sure.
In my C# Windows Form project, I would like to have a button which will
initiate the client's Outlook Express.
In the mean time, it needs to attach a particular document in the OE.
Would some one give me some advice?
Thanks for help.
Jason
Apr 14 '06 #1
4 2603
Can't help you with attaching an attachment, as I don't believe OE can be
automated that easily without a third party tool. However, if the amount of
data is small and is text based, why not think about something like this:

string commandText = @"mailto:ta****@donaim.name?" +
"cc************@another.domain.name&" +
"subject=Test email&" +
"body=Error located at <address>%0AOther stuff we need to
know%0A";

Process.Start(commandText);

You'll need to have a "using System.Diagnostics" to make this work. The body
of the message would be used to include any text you need to have sent. Just
remember to use "%0A" for newlines.

It might get you started. On my system, this opens the default mailer with
the to and cc fields filled in, a subject and the body completed. You can
see more amount the syntax of mailto: at
http://www.ianr.unl.edu/internet/mailto.html

Steve

"Jason Huang" <Ja************@hotmail.com> wrote in message
news:up**************@TK2MSFTNGP05.phx.gbl...
Hi,

I am not sure if we can call Outlook Express in the C# windows form
project.
However, my boss he thinks that it should be able to open, since the VSC#
and Outlook Express are all MS's product,
but I'm not so sure.
In my C# Windows Form project, I would like to have a button which will
initiate the client's Outlook Express.
In the mean time, it needs to attach a particular document in the OE.
Would some one give me some advice?
Thanks for help.
Jason

Apr 14 '06 #2
Just start the OE? Start an external process from C# is an easy task...
Then check the OE docs if there is a parameter that allows you to send
some arguments at process start.
For example

System.Diagnostics.Process.Start"C:\Program\Outloo k Express\msimn.exe",
"(/mailto:go**@hell.no /attachment:C:\temp\myattachment.doc ");

or something...

/Magnus (Check the msdn documentation for "Process Class")

Apr 14 '06 #3
"Magnus" <su*****@hotmail.com> a écrit dans le message de news:
11**********************@g10g2000cwb.googlegroups. com...

| Just start the OE? Start an external process from C# is an easy task...
| Then check the OE docs if there is a parameter that allows you to send
| some arguments at process start.
| For example
|
| System.Diagnostics.Process.Start"C:\Program\Outloo k Express\msimn.exe",
| "(/mailto:go**@hell.no /attachment:C:\temp\myattachment.doc ");

If I remember rightly, if OE is your default mail client, then all you have
to do is call Process.Start with the "mailto" command parameters including
the attachment.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Apr 14 '06 #4
unfortunately, OE is not part of the suite of Office products - its just a
free utility shipped with IE - so you don't have the freedom to automate it
using traditional means such as VSTO. However, OE is simply a COM server
with a well-defined API so you can use regular COM automation to explore the
internals.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Professional VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"Jason Huang" <Ja************@hotmail.com> wrote in message
news:up**************@TK2MSFTNGP05.phx.gbl...
Hi,

I am not sure if we can call Outlook Express in the C# windows form
project.
However, my boss he thinks that it should be able to open, since the VSC#
and Outlook Express are all MS's product,
but I'm not so sure.
In my C# Windows Form project, I would like to have a button which will
initiate the client's Outlook Express.
In the mean time, it needs to attach a particular document in the OE.
Would some one give me some advice?
Thanks for help.
Jason

Apr 14 '06 #5

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

Similar topics

5
by: M. Laymon | last post by:
I just installed Python 2.3.3 under Windows XP professional. After I did, my wife tried to access her email using Outlook Express and got the error messages: Your server has unexpectedly...
40
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the...
2
by: MaxH | last post by:
I need to perform programmatically from a C# .net application the following tasks: _ open an outlook (or default e-mail client) compose message window; _ attach a document to the new message; _...
4
by: MLH | last post by:
I would like to configure OutLook Express so that it does not attempt to resend eMails in the Outbox folder whenever new sends are made From Access. The ISP's server rejects some eMail address...
12
by: Arno R | last post by:
Hi all, This is a repost of a message posted at october 6. The answer I got was about MapiMessages.AttachmentIndex. I think I need the MSMAPI32.OCX to use this. (I don't have this file on my PC)...
6
by: Adam Clauss | last post by:
I would like to create a plugin for Outlook Express using C# (could also use C++ if it is not available in C#). Any ideas on how I would go about starting this? Thanks!
26
by: Tom Becker | last post by:
Is there a way, from Access, to programmatically click the Send and Receive button in Outlook?
5
by: =?Utf-8?B?TWFya1NraQ==?= | last post by:
For about a month now, I have had trouble with Outlook Express. When logging in to Outlook Express, I get an error message stating that the connection to server has failed. My internet connection...
4
by: PW | last post by:
Hi, A client of ours is having problems using our email interface. Our application is written in Access 2003 and the client is using Microosft Outlook Express version 6. We use the DoCmd...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.