Help! Macro to send email from Excel and add other attachments
"Rafael_SP" wrote in message
...
Hi everybody!
I'm trying to create a button on an Excel worksheet that attaches my
active
worksheet to an outlook email. It is ok so far. But what I'm trying to do
now
is to allow the user to add other files besides the active worksheet.
I'll try to make it clear. What I want to implement is: the user hits the
button, the browser pops up allowing the selection of a file, after the
file
is chosen a dialog box appears asking if the user would like to select
another file and then all these files are attached to the email, along
with
the active workbook.
Maby this way?
1. Copy active sheets to new workbook: Sheets("Sheet1").Copy
2. Delete button.
3. Save as file to C:\ for example.
4. Active sheet close.
5. Get another attachment by getfile: fileToOpen =
Application.GetOpenFilename("Text Files (*.txt), *.txt")
6. Prepare and send mail with two attachments: attachment.add - saved by
code and choose by filetoopen.
Regards. S!@w.
|