Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express
Sending messages with outlook/outlook express Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
Go Back  Xtreme Visual Basic Talk > > > Sending messages with outlook/outlook express


Reply
 
Thread Tools Display Modes
  #1  
Old 01-03-2005, 10:45 AM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Question Sending messages with outlook/outlook express


Hi all. I'm trying to figure out how to send a message using outlook and/or outlook express. I'd assume that since outlook at least is a part of Microsoft Office, it should be something you can automate, though I could be wrong.
This question is going to be vague because presently my computer (with vb.net and office 2003) is undergoing repairs and I can't try anything out. I was asked to make a program though and I'm tring to see how to go about it.

First question: Is this something I can do via automation?

Second Question: Is there somewhere I could look for more info (I don't have time to do research on this computer) such as a thread on this site?

That should get me started for now I guess. Thanks for any help in advance.
__________________
170 10101010 410 J31^170
Reply With Quote
  #2  
Old 01-03-2005, 01:09 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

For Automating Outlook, there's not a lot around here on that. I am personally useless in Outlook, but one or two around here are pretty good with it, so when you have a particular question on this you might have half a chance...

One link with a lot of other Links related to Outlook and .Net Autmation is tho following:

Programming Microsoft Outlook with Visual Studio .NET

As for more general information about Automation MS Office, these two should help get you started:

(1) VB.Net Office Automation FAQ
(2) Automating Office Programs with VB.Net / COM Interop

Hope this helps...
Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb

Last edited by Mike Rosenblum; 01-03-2005 at 04:37 PM.
Reply With Quote
  #3  
Old 01-03-2005, 07:50 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

Alright then thanks Mike, that does help me. I guess I'll have to play around a bit when I get my computer back to figure out the details but now I know that it's at least possible as well as have some resources to go to.
And for any who may know, is it possible to automate or otherwise send messages with outlook express?
__________________
170 10101010 410 J31^170
Reply With Quote
  #4  
Old 01-03-2005, 08:01 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

I think the answer to that is "no".

But I'll pass this on and see if this can be confirmed...
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #5  
Old 01-04-2005, 04:18 AM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

Some nice "automate Outlook" links :
Ah, MSDN
Outlook code

You can't automate Outlook Express, but you can send (automatically) mails with it.
Reply With Quote
  #6  
Old 01-04-2005, 07:50 AM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

Thanks for those links italkid, just what I needed, any chance you would know how to send messages via outlook express? or maybe know of some resources?
__________________
170 10101010 410 J31^170
Reply With Quote
  #7  
Old 01-04-2005, 07:06 PM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

Quote:
Originally Posted by by_m
Thanks for those links italkid, just what I needed, any chance you would know how to send messages via outlook express? or maybe know of some resources?
Hmm, except from Google not really...
Creating the mail (Outlook express) will not be a problem, but sending it will be much more difficult though.
Not to mention the trouble you might have to add an attachement etc...
I would use Outlook
Reply With Quote
  #8  
Old 01-05-2005, 01:32 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

Well actually, I need to make a program that could use either of the two. I suppose that it would be a very complicated process to use outlook express though. How would I go about even accessing outlook express enough to write out a letter? Maybe I could figure from there, but I wouldn't be too sure as I am pretty close to newbie. Thanks for your help so far.
__________________
170 10101010 410 J31^170
Reply With Quote
  #9  
Old 01-05-2005, 02:54 PM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

A nice VB example can be found HERE
But remember, there will no other way to actually send the mail and close O.Express then
by use of send keys
A Google search for "outlook express"+VB should result in more examples,
but I haven't found examples which made use of .Net
Reply With Quote
  #10  
Old 01-05-2005, 04:38 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

Thanks a lot for that link, it was very interesting. Also though, I haven't tried it yet, nor will I be able to untilI get my computer back, but wouldn't it be possible to send the keys "Alt+S" to send the message? And "Alt+F4" to close it? Or is there some reason those won't work?
__________________
170 10101010 410 J31^170
Reply With Quote
  #11  
Old 01-06-2005, 12:53 PM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

Those combinations are sure possible...
Reply With Quote
  #12  
Old 01-06-2005, 03:52 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

I'll get back to this as soon as I try it on my computer to confirm whether or not it works then.
__________________
170 10101010 410 J31^170
Reply With Quote
  #13  
Old 01-06-2005, 05:17 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

Alright my computer is back up and runing, short of an internet connection. I tried the code in the link with the keysending method, but it doesn't work. I expeced some problems though. I know OF shell programming, but I have done next to nothing with it. What little I did was in a vbscript file. My problem is that I don't know how to get it to work in my program. I made a button and copy pasted the code into it, it didn't recognize ShellExecute, app.path, and a whole buch of other stuff. Do I have to import something or what? Thanks again for all your help with this, I'm learning more than I have in a while.
__________________
170 10101010 410 J31^170
Reply With Quote
  #14  
Old 01-07-2005, 05:00 AM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

I pointed you to a VB examlpe, but you are using .Net remember...
MSDN shows it all.
Ps, I don't have .Net nor Outlook Express installed but I know "Google"
Reply With Quote
  #15  
Old 01-07-2005, 05:23 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

Alright then, thanks for that link. I guess I can figure sendkeys from there. But what about starting oulook express? I didn't understand how it went about opening that in the link you gave before. Did it even open Outlook Express or was the comment that said "Start Outlook Express email." mean that the user was supposed to start it? If it didn't actually open outlook express I guess I'd just use process.start right?
Also, do you use linux or another operating system or did you uninstall outlook express? Because windows comes with outlook express
__________________
170 10101010 410 J31^170

Last edited by by_m; 01-07-2005 at 05:28 PM.
Reply With Quote
  #16  
Old 01-09-2005, 08:53 AM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

The ShellExecute line fires O.E and yes I removed O.E from my system (use Outlook instead).
Reply With Quote
  #17  
Old 01-09-2005, 02:00 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

OK thanks then. I guess ShellExecute isn't supported anymore in .Net though. I'll figure it out with process.start then. Thanks again for all your help.
__________________
170 10101010 410 J31^170
Reply With Quote
  #18  
Old 01-09-2005, 02:25 PM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

In .Net seems System.Diagnostics.Process.Start() to be the alternative for ShellExecute...
Reply With Quote
  #19  
Old 01-09-2005, 02:35 PM
italkid's Avatar
italkid italkid is offline
Down...

Retired Moderator
* Expert *
 
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
Default

And a THREAD I just found in our Xtreme . Net talk forum you might want to read...

The one who search, will find...
Reply With Quote
  #20  
Old 01-09-2005, 03:40 PM
by_m's Avatar
by_m by_m is offline
Contributor
 
Join Date: Jul 2004
Location: Texas
Posts: 661
Default

Oh I get it, thanks a lot. If it's your default mail program you can just type that in and it works. Now it makes sense.
Another problem I ran into while working on Outlook (Not express) is that it says the .send command is ambiguous. I looked it up and it turns out it was. But what can I do? I tried looking in the help files and found something on fixing ambiguity problems but I couldn't make heads or tails of it...Any ideas? I'd try to do one of those magic searches you do but I have limited time on this computer. Thanks again for all your help with this.
__________________
170 10101010 410 J31^170
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
 
Sending messages with outlook/outlook express
Sending messages with outlook/outlook express
 
-->