Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching files to an email

Status
Not open for further replies.

SgtPepps

IS-IT--Management
May 1, 2002
109
GB
I don't have a licence for outlook so I have to try and use outlook express. This Is the code I'm trying to use:

Workbooks.Open "c:\path\filename1.xls"
Workbooks.Open "c:\path\filename2.xls"
Application.Dialogs(xlDialogSendMail).Show

It only attaches the second file opened, does anybody know why?

Sarge
 
Hello Sarge,

The Application.Dialogs(xlDialogSendMail).Show Method appears to only attach the most recently opened file.

If you use the following code:
Public Sub Test()
Workbooks.Open "C:\File1.xls"
Application.Dialogs(xlDialogSendMail).Show

Workbooks.Open "C:\File2.xls"
Application.Dialogs(xlDialogSendMail).Show
End Sub

You can send both files, but not in a single email.
Is sending both files in a single email important?
Hope this helps,
Pete
 
Unfortunately both files do need to be attached to the same email, thanks anyway.

Regards

Sarge
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top