Share via

Send Email via Macro

Anonymous
2013-06-18T16:48:37+00:00

We have Excel 2010 and Office 365

I have a spreadsheet where everyone uses and when they complete their entries they need to press the macro command button to send the file to an email address.  The email address is in the code.  The problem is the user still has to manually enter the email address before it gets sent.  Any help is appreciated.

Thank you

This is what I tried so far

Application.Dialogs(xlDialogSendMail).Show  ' sends the attachment

SendKeys ("myemailaddress")

or

***** The problem with this method is we get a warning message saying "A program is trying to send an e-mail message on your behalf.  If this is unexpected, click Deny and verify your antivirus software is up-to-date. ....... ***** 

If we can avoid this message that would be great.  We're not allowed to install 3rd party programs to avoid this message....

ActiveWorkbook.SendMail Recipients:="myemailaddress"), Subject:=MySubject

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2013-06-19T08:36:40+00:00

    Take a look at the following pages of fellow MVP Ron de Bruin's website:

    http://www.rondebruin.nl/win/section1.htm

    Was this answer helpful?

    0 comments No comments