Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
attachment - then email from excel!
Hi All! I have a macro runing outlook. it all works, but I want the file that is created as a variable - the one sheet of it as below , to be emailed as the attachment. So its first saved (user in puts the version number), then that file that is saved is emailed. CODE: Private Sub CommandButton1_Click() variable = InputBox("Please enter a version number", "Version") Sheets("SCHD").Select Sheets("SCHD").Copy ChDir "C:\Documents and Settings\eggenhuizenj\Desktop" ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\username\Desktop\Target Refit 2006 Schedule Ver " + variable + ".xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False attach = Windows("Target Refit 2006 Schedule Ver " + variable + ".xls").Activate ActiveWindow.Close 'Create a new Workbook Containing 1 Sheet _ and sends as attachment. With ActiveWorkbook attachment - created above .SendMail ", _ Subject:="Find attached blah " & Format(Date, "dd/mmm/yy") .Close SaveChanges:=False End With End Sub END CODE Any help would be greatly appreciated, thanks! Joel -- dj_siek ------------------------------------------------------------------------ dj_siek's Profile: http://www.excelforum.com/member.php...o&userid=31247 View this thread: http://www.excelforum.com/showthread...hreadid=512492 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Name and email address from web sites to excel sheet | Excel Discussion (Misc queries) | |||
Email hyperlink changes not showing in excel | Excel Worksheet Functions | |||
Excel Spreadsheet email attachment unable to open in Outlook Expr. | Excel Discussion (Misc queries) | |||
Hints And Tips For New Posters In The Excel Newsgroups | Excel Worksheet Functions | |||
body of email disappears when I send an email from Excel | Excel Discussion (Misc queries) |