Solved

Using Outlook to send mail

Posted on 1998-09-18
5
137 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
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:wj7ster
Comment Utility
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
Comment Utility
are you using MAPI controls by any chance??
vmano
0
 

Author Comment

by:jcorbin
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks, worked great
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now