Is it possible to email a file attached to an access form?

F

fifi

Help please
I created a form in which I can choose a file that I want to attach when
clicking the "attach a file button". Now I would like to be able to submit
it when I click the "submit button". Can somebody please help me with this?

Thank you
 
D

David Lloyd

The following KB article shows one alternative for sending an attachment
with an Outlook email.

http://support.microsoft.com/default.aspx?scid=kb;en-us;209948

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Help please
I created a form in which I can choose a file that I want to attach when
clicking the "attach a file button". Now I would like to be able to submit
it when I click the "submit button". Can somebody please help me with this?

Thank you
 
F

fifi

Thank Mr. Lloyd, I copied the module, but my problem is that I have Microsoft
Outlook 11.0 not 9.0. And also, in which window do I type sendMessage?
tx
 
D

David Lloyd

Although I have not tested it, I believe the KB code can be used with
Outlook 2003 also. You could call the SendMessage subroutine from the Click
event of your "Submit" button. For example

SendMessage "C:\MyAttachment.xls"

or

SendMessage txtAttachmentName

where txtAttachmentName is the name of a form textbox which holds the name
of the file (including path) you want to attach.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Help please
I created a form in which I can choose a file that I want to attach when
clicking the "attach a file button". Now I would like to be able to submit
it when I click the "submit button". Can somebody please help me with this?

Thank you
 
F

fifi

Thank you for your response. Either it doesn't work with Outlook2003 or I am
doing something wrong. I need more help please
 
D

David Lloyd

I tested the KB article code in Outlook 2003 and it works as designed. You
encounter the Outlook security warning several times (expected), however,
the code runs without error. Can you be more specific about what difficulty
you are encountering?

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Thank you for your response. Either it doesn't work with Outlook2003 or I
am
doing something wrong. I need more help please
 
F

fifi

Thanks for your response,

My question is when create the module sendMessage, did you click Microsoft
Outlook 11.0 because I don't have 9.0?
 
D

David Lloyd

Yes, I used the Outlook 11.0 Object Library when I ran my test, and the
sendMessage code ran without error. Are you able to tell me more about the
difficulties you are encountering?

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Thanks for your response,

My question is when create the module sendMessage, did you click Microsoft
Outlook 11.0 because I don't have 9.0?
 
F

fifi

Thank you for your help. I am now able to send an a file. Now the
difficulties that I am encountering is that my submit was already using
SendObject and I see that adding the senMessage code in its click event (VB)
is not working. I want the same submit button to send the table and any
other file at the same time. Do you know how I can combine those two on the
same button.
Also, is there a way, I can tell just send the file that is attached instead
having to make all my users use the same file name. Thank you
 
Top