?
Solved

I am using MAPI controls to send emails with attachments.Getting "Attachment not found error" when file exists.

Posted on 2003-03-19
4
Medium Priority
?
185 Views
Last Modified: 2013-12-26
Hi
I have a form with the 2 mapi controls and I am trying to send attachments
across.It works fine for messages with text but does not work when I try
to send attachments(unspecified error 32002).I've tried whatever the Microsoft
support base said I shud do and all the tips listed on this site.I know the file
exists because its created by a function just prior to the MAPI call.
I can see it on the system and access it.I tried App.path and the file name
too(just in case I was giving a wrong path)but that didnt work.What do I do??
Also I need a receipt that the file has been receieved so I used the .msgreceiptrequested
property.Is there any other way this can be done?And yes can I please please get
those irritating Outlook boxes that pop up at ResolveName and Send to disappear?

Waiting for expert help.
Ta.
0
Comment
Question by:VBee
[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
4 Comments
 
LVL 1

Accepted Solution

by:
rafsalman earned 210 total points
ID: 8172753
If you are talking about the outlook box that comes up which says that "another application is trying to send an email", Send/Don't Send, then that is a setting in the mail options of Outlook (usually a security setting - e.g. warn me if other applications try and send mail as me).  If you must get rid of it then either manually turn this off, or switch the registry setting which controls this.

Other pop-ups - depends on what you mean.


For attaching a file should use something like

MAPIMessages.AttachmentPathName = DatabaseToSend

where

DatabaseToSend = mstrDatabasePath & "Filename.mdb"

and

mstrDatabasePath = "c:\raf\raf_app\Databases\"

or if in app path

mstrDatabasePath = CurDir & "\Databases\"


MAPIMessages.Send ShowMessageDialog

Where ShowMessageDialog is boolean variable indicating whether you want to allow user to set email properties.


Finally, make sure file being opened is not being accessed when you want to attach it - i.e. it is not open, and connection to it if database is also closed.

Raf

0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 8191634
check out this component.Its easy to use and free

http://www.freevbcode.com/ShowCode.Asp?ID=109
0
 

Author Comment

by:VBee
ID: 8242709
Thanks,that seemed to work!!!Was shifted to some other job so could not update everyone on this.Sorry for that and thanks again!
0
 
LVL 1

Expert Comment

by:rafsalman
ID: 8244144
Great glad to help ;)

Raf
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
Suggested Courses

719 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