mail attachment

V

vinodkus

dear sir/maadm

I have to send a mail attachment but my problem is that file name of
my attachment should be changed that i will write in a text box.
please suggest any solution

Thanks in Advance
 
A

Anthony Jones

dear sir/maadm

I have to send a mail attachment but my problem is that file name of
my attachment should be changed that i will write in a text box.
please suggest any solution

Are you using CDOSYS?

Having called AddAttachment you can modify the disposition field to the
correct name:-

Dim oPart : Set oPart = oMsg.AddAttachment(sPathToFile)
oPart.Fields("urn:schemas:mailheader:content-disposition").Value =
"attachment; file=""" & sFileName & """"
oPart.Fields.Update

Where oMsg is a CDOSYS Message object and sFileName is the name you want the
attachment to have in the email.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top