+ Reply to Thread
Results 1 to 5 of 5

Sending to gmail through VBA

  1. #1
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Sending to gmail through VBA

    Hi,

    Quite similar thread was closed too days ago (link).

    TMS's code works smoothly (see below).

    Problem: when I'm trying to take the red fields' (from TMS code) values from cells (rather than direct quote in "") the macro isn't working (without any error message).

    Any idea why?

    P.S. I've tried both .value and .text as suffixes. For example:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please * if you like the answer

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Sending to gmail through VBA

    Using Range.Value is the way Ron shows on his website.
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: Sending to gmail through VBA

    @Tinbendr, I've followed Ron's advice and added twice ACTIVATE the relevant worksheet. This is still not working..

    Please Login or Register  to view this content.
    Last edited by GIS2013; 07-23-2014 at 04:40 PM.

  4. #4
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: Sending to gmail through VBA

    Ok an annoying mistake. I've been expecting to get the email in the gmail account that I defined as sender.. so all I've done is just to switch values in the .To and .From fields. Thanks also from here to Tinbendr who provided useful resource.

    Just for future readers: In the to/from/cc/bcc you can:
    A. Write the values as string: .To = [email protected]
    B. Range("A1").value = [email protected], and then .To = Range("A1").value
    Last edited by GIS2013; 07-23-2014 at 05:14 PM.

  5. #5
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Sending to gmail through VBA

    Glad you got it sorted.

+ 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. [SOLVED] Sending to gmail through VBA
    By GIS2013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2014, 09:46 AM
  2. Sending Gmail works perfectly but i want different attachments to differnt people
    By catchnanan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-02-2014, 01:14 PM
  3. Sending mail with range as body using GMAIL
    By vssoma in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2014, 05:40 AM
  4. Sending email using Gmail and attaching workbook.
    By vitt4300 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-16-2012, 02:28 AM
  5. Free GMail Invites!
    By agarwaldvk in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-22-2005, 11:57 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