Results 1 to 4 of 4
  1. #1
    Join Date
    May 2011
    Posts
    7

    Unanswered: sending an email through google mail in Excel

    Hi,

    Thanks to various peoples help I have used the code below:

    "Sub eMailActiveWorkbook()

    Dim OL As Object
    Dim EmailItem As Object
    Dim Wb As Workbook
    x = MsgBox("Are all the fields filled in?", vbYesNo)

    If x = vbYes Then
    Application.ScreenUpdating = False
    ActiveSheet.Calculate
    Set OL = CreateObject("Outlook.Application")
    Set EmailItem = OL.CreateItem(olMailItem)
    Set Wb = ActiveWorkbook
    Wb.Save
    With EmailItem
    .Subject = "JLR Work Request" & Now()
    .Body = "Please find attached a JLR Work Request Form" & vbCrLf & _
    "" & vbCrLf & _
    ""
    .To = "CampaignIntegrationTeam@****.co.uk"
    .Importance = olImportanceHigh 'Or olImprotanceHigh Or olImprotanceLow
    .Attachments.Add Wb.FullName
    .Send
    End With

    Application.ScreenUpdating = True

    Set Wb = Nothing
    Set OL = Nothing
    Set EmailItem = Nothing
    Else
    End If
    End Sub"


    This has made it so that I can send an email using a button. However I now need to do something similar but to send from google mail.

    Is this possible and if so can you please explain simply as I am still learning?

    Thanks in advance.

  2. #2
    Join Date
    Oct 2003
    Location
    London
    Posts
    341
    I wouldn't have a clue whether it would be possible to do this via the web client but if you use either Windows Mail, or Outlook, you can configure your account settings to send and recieve Gmail emails using standard pop and smtp configurations (I've done it).

    It's also possible using various other clients but I've never tried. If you wanted to do it this way, all the answers you need are here;

    Configuring other mail clients - Gmail Help

    Christy

  3. #3
    Join Date
    Jul 2011
    Posts
    2
    thanks for ur suggestion

  4. #4
    Join Date
    Nov 2011
    Posts
    1

    Smile Web Designing Company Mumbai


Posting Permissions

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