Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using Outlook to send mail

Posted on 1998-09-18
5
Medium Priority
?
145 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
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 1200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

885 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