?
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
?
206 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
  • 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

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 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

601 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