Solved

Using Outlook to send mail

Posted on 1998-09-18
5
143 Views
Last Modified: 2010-04-30
I have figured out how to send an email with an attachment, but I have a problem handling an invalid address. Is there a way to trap the invalid address error from Outlook and open the Outlook Global Address book for the user to select another address??
0
Comment
Question by:jcorbin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:wj7ster
ID: 1435616
I do not have an answer to your question but is there any way you can post the code for sending an attachment?  I have been trying to do that, with no luck.

I will even give you points if it works!  I don't have much points, but will give you what I've got.

Thank you.


Regards


Willem Sevenster
0
 
LVL 3

Expert Comment

by:vmano
ID: 1435617
are you using MAPI controls by any chance??
vmano
0
 

Author Comment

by:jcorbin
ID: 1435618
Well I havent tried using the MAPI controls. I am using the Outlook 98 type library to get the Outlook objects. Only because it is a little faster and you dont have to distro the extra controls. But at this point I am open to just about any suggestion.


0
 
LVL 3

Accepted Solution

by:
vmano earned 300 total points
ID: 1435619
the following code works for me.give it a try with MAPI controls

'MSes is the MapiSession control and
'MMes is the MAPIMessages Control.

MSes.SignOn
MMes.SessionID = MSes.SessionID
With MMes
     .MsgIndex = -1
     Do While .RecipCount > 0
         .RecipIndex = 0
         .Delete 1
     Loop
     .RecipIndex = 0
     .RecipAddress = "J"
     .AddressResolveUI = True
     .ResolveName
     .MsgType = "IPM.Note.VersionControl"
     .MsgSubject = " resolving ambiguous names "
     .MsgNoteText = " test message "
     .Send True
End With
MSes.SignOff

let me know if this helps,
vmano
0
 

Author Comment

by:jcorbin
ID: 1435620
Thanks, worked great
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question