If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > sending an email through google mail in Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-09-11, 04:39
LukeBrims LukeBrims is offline
Registered User
 
Join Date: May 2011
Posts: 7
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.
Reply With Quote
  #2 (permalink)  
Old 06-10-11, 08:26
christyxo christyxo is offline
Registered User
 
Join Date: Oct 2003
Location: London
Posts: 291
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
Reply With Quote
  #3 (permalink)  
Old 07-01-11, 05:16
creativeseo creativeseo is offline
Registered User
 
Join Date: Jul 2011
Posts: 2
thanks for ur suggestion
Reply With Quote
  #4 (permalink)  
Old 11-26-11, 09:53
akspat66 akspat66 is offline
Registered User
 
Join Date: Nov 2011
Posts: 1
Smile Web Designing Company Mumbai

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On