+ Reply to Thread
Results 1 to 9 of 9

Button to send an email via Gmail

  1. #1
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Button to send an email via Gmail

    This is.. probably not possible. If it's fine if not, but here's what I would like:

    Currently I have a button on a sheet that saves a single sheet to a specified folder. It would be my dream, however, that that button would also email that sheet to a specific person via gmail. Basically, these are time cards, and they need to be emailed to a specific person, and it would be nice if that button could not only create the sheet in the specified file, but then email that sheet to a person.

  2. #2
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Button to send an email via Gmail

    Anything on this? If the answer is 'this would be terribly difficult or impossible', that's fine. Just would like to know!

  3. #3
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Button to send an email via Gmail

    Hi Drayde,

    You can look at this link http://www.rondebruin.nl/win/s1/cdo.htm

    I used this a few months ago and adapted to do my own macro that I used to send files (Invoices in PDF format), through Gmail. You can start from there and adapt to your needs...
    Please Login or Register  to view this content.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Button to send an email via Gmail

    You could tie your gmail into your Outlook, and have it automatically send through Outlook (it would come from your email account still). This can be done - I use outlook to check my Gmail on my spare computer.

    Not 100% sure what the code is for this, but if you record yourself emailing a file from Excel, you should be able to modify and edit the code easily enough.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  5. #5
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Button to send an email via Gmail

    GC Excel,

    This is definitely progress. I was able to send myself an email, but I'd like to see if I can challenge you a little more and make this a little more difficult. There are two major points, I think, which if I can solve I would be -so- happy.

    So what I'm working with are time cards for operators. These people are very, very computer illiterate, and are not people I would trust playing with the VBA to change this to their liking. I -could- do it myself as they come in, but here's what I would like to see:

    First - Here's how this works. Currently, there is a button that saves the file to a specified folder in C:\Send to Laura\. It saves -Only- the sheet 'Time Cards' - not the other sheets, and saves it as an xlsx instead of xlsm. It picks the name of this save based on three cells - the date, the first operator name, and the job#, and then adds 'Time Card'. I've uploaded the sheet so you can see this. Basically, whether it actually uses this file or not, I want it to send this single sheet as an xlsx to the recipient. Does this make sense? I'm not sure how to do this with this code.

    Second - There are certain things that I'm required to insert into the fields in VBA. Because the operators are computer illiterate, I would love it if a msgbox would prompt them for some of these details. Mainly username, password, and their name. It would be lovely if it would then save this information for future use. The recipient is static - that's not going to change. The subject should always be based on cells in the time card 'G2 G5 B14 Time Card'

    Thank you all so much.
    Last edited by Drayde; 08-28-2014 at 08:17 AM.

  6. #6
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Button to send an email via Gmail

    Hi Drayde,

    To answer your questions:
    1) yes, it's possible to use the file it creates. Is it always in the same folder for all the operators?
    2) Instead of a msgbox, you could add a sheet where operators will enter their info (username, password, name) in specific cells. You can then refer to these cells in your code.

    I'll try to send you an example later today.

  7. #7
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Button to send an email via Gmail

    GC Excel,

    First of all, thank you so much. This is of tremendous help to me.

    1. Yes, it will always be C:\Send to Laura\(G2) (G5) (B14) Time Card.xlsx
    2. Secondly - that would work very well. R2-R5 would work well on this on the Reference sheet.

  8. #8
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Button to send an email via Gmail

    Hi Drayde,
    Try this file and let me know if it works.
    (Update the user info in the Reference sheet)
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Button to send an email via Gmail

    GC,

    Thank you so much, sir! You've been a huge help. A friend helped me with the need to prompt for email/password, but it all looks like it works! I'll have to do more testing, but I'll resolve this for now!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Send email through excel using gmail to multiple recipents
    By Neha3587 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-31-2014, 09:04 AM
  2. Send email via Excel button.
    By Novice_704 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2008, 01:20 PM
  3. Button - Send email
    By Wiets in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2008, 09:04 PM
  4. send email from button
    By andreww in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2005, 11:05 AM
  5. Use command button to send email
    By Slugger in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-28-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1