Solved

Using Outlook to send mail

Posted on 1998-09-18
5
139 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 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

777 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