OpenFileDialog details?

zezu10

Member
Joined
Dec 12, 2006
Messages
5
Programming Experience
Beginner
I am currently trying to design a form which will allow my users to email details to a web daemon, but I am wanting to also allow them to send attachments on this form. Having never done this I searched around and found an example which is asking me to do the following;

Change OpenFileDialog Name OFD
DefaultExt *.*
InitialDirectory c:\
Multiselect True

How abouts do I go about this? My form for the attachments contains a listbox and two buttons (add attachment, remove attachment)

any help would be very much appreciated.
 
So you're not wanting to put a link in as such, you actually want to attach the file that you select with the OpenFileDialog?

EDIT - I may be told otherwise, but I don't think you can use the OFD to "attach" a file. I think it's used to record the file path instead....
 
yes I want to actually attach the file to the actual message...if there is another way to do this that would be fine.
 
right...so does your form actually open a new mail message (Outlook, Outlook Express etc), or are you trying to create this new "message" as the form?

If it's the former then I kind of know how, if it's the latter I don't know how you would attach a proper document to a form!!
 
no, what the form does is you fill in the textboxes on the form, press send, and it sends an email through the SMTP server.
 
I didn't think you could use that way as it couldn't map attachments? Or does it work so that the OFD takes the link, passes that link to the .mail which in turn attaches that link as the full file?

If so then I actually knew how to do it :D

On my app I do emails with attachments, but I do it with an Outlook email which is hidden to the user and automatically sends to a given address...
 
Back
Top