PDA

View Full Version : Capturing a list of files (for email attachments)



fluffy
08-02-2007, 07:21 PM
Hello World!

I'm using Excel 2003 in Windows XP to send emails of RFQs (Requests For Quotation). I can save each different RFQ, and then attach it to an email and send it. That works fine.

Now, I need to be able to add drawing files (1 or more) to the attachment list. The drawing/s are in PDF format.

If possible, I want to use "Application.FindFile" to open up the file search window. My thought is to use that window to select the file/s to add to the attachment list, but then (instead of opening them) to capture the list of selected files and transfer them to my attachments list.

Is there a way to do this?
Am I totally off-base here?
Is there a better answer?

Thanks in advance for any help you can provide.

fluffy

Bob Phillips
08-03-2007, 01:24 AM
I would use GetOpenFilename not Findfile because it gives you the same file dialog, but opens nothing, but just returns the file(s) name to your app, which you can then use to pass to the mailer as attachment names.

fluffy
08-03-2007, 07:35 PM
Hello World!

Many thanks for the tip on GetOpenFilename.
It took a little work to figure out how to deal with the Variant array of filenames (it's not intuitive), but after that everything just flowed.
Woohoo!

fluffy