locked
Launch GMail Email Template from MS Access RRS feed

  • Question

  • I'm currently using MS Access - Office 365 Pro+.  I'd like to know how to script a command button to open up a blank email from GMail rather than Outlook.  We've recently moved to GMail and can no longer use Outlook.  The Access template I'm using has an E-mail command button at the top of the form with an Embedded Macro. By default, it launches a blank Outlook email, how do i change that using VBA or a property setting in MS Access itself to I.D. a default email program..  It seems to me most MS products with a share or email option automatically opens up MS Outlook...  Any help would be appreciated.
    Friday, November 22, 2019 7:33 PM

Answers

  • Access can automate most local applications, but Gmail isn't a local application, it is a web application.  You have two options:

    • Automate Internet Explorer, login, click buttons, ...
    • Use Google's APIs to interact with Gmail to send emails (you won't preview then, simply send them)

    Daniel Pineault, 2010-2019 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    • Marked as answer by Minion5 Monday, November 25, 2019 3:22 PM
    Saturday, November 23, 2019 12:17 AM

All replies

  • Access can automate most local applications, but Gmail isn't a local application, it is a web application.  You have two options:

    • Automate Internet Explorer, login, click buttons, ...
    • Use Google's APIs to interact with Gmail to send emails (you won't preview then, simply send them)

    Daniel Pineault, 2010-2019 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    • Marked as answer by Minion5 Monday, November 25, 2019 3:22 PM
    Saturday, November 23, 2019 12:17 AM
  • Thanks Daniel!
    Monday, November 25, 2019 3:23 PM
  • You could always use the FollowHyperlink VBA command to launch google gmail.

    Application.FollowHyperlink "https://mail.google.com/mail/u/0/#inbox"

    Monday, November 25, 2019 3:46 PM