Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.
Sub SendDailyFxByEmailToServer() Application.ScreenUpdating = False ActiveWorkbook.Save ' Select the range of cells on the active worksheet and copy paste values Sheets("email").Select Range("FxData").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False ' Show the envelope on the ActiveWorkbook. ActiveWorkbook.EnvelopeVisible = True ' Set the To and Subject lines and send out msg With ActiveSheet.MailEnvelope .Item.To = "email@example.com" .Item.Cc = "firstname.lastname@example.org" .Item.Subject = " Daily Fx Feed" .Item.Send End With ' closes the active workbook without saving any changes, exit application ActiveWorkbook.Close False Application.ScreenUpdating = True Application.Quit End Sub
Join the community of 500,000 technology professionals and ask your questions.