473,473 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Gmail via CDO with clickable button

8 New Member
Hello!

I am able to send emails through GMAIL using this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Email_Invoice_Click()
  2. On Error GoTo errHandler
  3. DoCmd.SetWarnings False
  4. If IsNull(Forms![mainProcessEntry]![UserEmail]) Then
  5. MsgBox "Please enter your email address"
  6.  
  7. DoCmd.OpenForm "mainprocessentry"
  8.  
  9. Forms![mainProcessEntry]![UserEmail].SetFocus
  10.  
  11. Exit Sub
  12. End If
  13.  
  14.  
  15. Dim strpath As String
  16. Dim stDocName As String
  17. Dim mypath As String
  18. Dim objCDO As New CDO.Message
  19. Dim objBP As CDO.IBodyPart
  20.  
  21.  strpath = "C:\Invoices\"
  22.     mypath = strpath & "invoice.pdf"
  23.     Debug.Print mypath
  24.     Me.invoicepath = mypath
  25.  
  26.      MyFileName = mypath
  27.     emailfile = CStr(mypath & ".pdf")
  28.  
  29. stDocName = "rptinvoice"
  30. DoCmd.OutputTo acReport, stDocName, acFormatPDF, mypath, False
  31.  
  32.         Dim msg As Object
  33.         Set msg = CreateObject("CDO.Message")
  34.         msg.From = Forms![mainProcessEntry]![UserEmail]
  35.         msg.to = [Forms]![mainProcessEntry]![invoiceemail1]
  36.         Debug.Print msg.to
  37.  
  38.         msg.Subject = "Your Invoice is Attached"
  39.         msg.textbody = "Thank you!"
  40.         msg.CC = ""
  41.         msg.BCC = ""
  42.         msg.ReplyTo = strMailFrom
  43.         msg.AddAttachment "c:\invoices\invoice.pdf"
  44.  
  45.         msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
  46.         msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
  47.         msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  48.         msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = Forms![mainProcessEntry]![UserEmail]
  49.         msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = Forms![mainProcessEntry]![Password]
  50.         msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
  51.         msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
  52.         msg.Configuration.Fields.Update
  53.  
  54. msg.HTMLBody = msg.HTMLBody & "<font face=""arial"" size=""3"" color=""black""><b>Quantum Process, LLC</b></font><BR>"
  55. msg.HTMLBody = msg.HTMLBody & "<font face=""arial"" size=""2"" color=""blue"">"
  56. msg.HTMLBody = msg.HTMLBody & "<font face=""arial"" size=""2"" color=""black"">418 Pittman Rd.</font><BR>"
  57. msg.HTMLBody = msg.HTMLBody & "<font face=""arial"" size=""2"" color=""black"">Ellisville, MS 39437</font><BR>"
  58. msg.HTMLBody = msg.HTMLBody & "<font face=""arial"" size=""2"" color=""black"">(601) 319-2675 office</font><BR>"
  59. msg.HTMLBody = msg.HTMLBody & "<font face=""arial"" size=""2"" color=""black"">(877) 852-9532 fax</font><BR>"
  60. msg.HTMLBody = msg.HTMLBody & "<font face=""arial"" size=""2"" color=""blue""><b><BR>http://www.QuantumProcess.com</b></font><BR>"
  61. msg.HTMLBody = msg.HTMLBody & Forms![mainProcessEntry]![UserEmail]
  62. msg.HTMLBody = msg.HTMLBody & "<font face=""Arial"" size=""2"" color=""green""><u>" & SW & "</u></font><BR>"
  63. msg.HTMLBody = msg.HTMLBody & "<font face=""Arial"" size=""2"" color=""blue"">"
  64. msg.HTMLBody = msg.HTMLBody & "<img src='C:\Clients\Quantum Process Keith Investigations\paymentbutton.png' height=57 width=192><br>"
  65.  
  66.         msg.Send
  67.  
  68.          Exit Sub
  69.  
  70. errHandler:
  71.     MsgBox "Error " & Err.Number & ": " & Err.Description & " in " & _
  72.            VBE.ActiveCodePane.CodeModule, vbOKOnly, "Error"
  73.  
  74. End Sub
  75.  
I would like the payment button to be clickable to the web page that collects the users payment information. Any help will be greatly appreciated!
Aug 7 '16 #1
0 814

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Matt | last post by:
I want to understand the difference between submit button and regular button: <input type="submit"> and <input type="button">. My understanding is that submit button will send the entire HTML form...
1
by: Roedy Green | last post by:
..button /* clickable button */ { background-color : #f1f391; color : #7b3e00; border : 3px outset #d2d2d2; margin : 0px 2px 0px 2px; font-family :Arial,Helvetica,sans-serif; font-size : 120%;...
1
by: Nathan Sokalski | last post by:
I have navigation that is made out of a table. I did this so that I could dynamically create my "buttons" (the cells formatted using CSS) and avoid creating a new graphic every time I changed the...
24
by: Charles Law | last post by:
When I click a button I don't want the click event to fire. Is this possible? In fact, what I would really like is to be able to intercept the click event, perform some action, and then prevent...
4
by: Tombatore | last post by:
hello people, I've created an array of buttons by code to have an array : buttons(size, size) I am programming a version of mine sweeper, and one button is a clickable rectangle with an image...
1
by: Sharon | last post by:
I'm using the PropertyGrid control, and I want it to show a button. But I set the PropertyGrid.SelectedObject with a object that as a Button property, the PropertyGrid shows the buttons properties,...
0
by: kj | last post by:
The Gmail interface makes heavy use of "clickable elements" that are not of the kind one normally encounters (such as <button ...>, or <a ...>, or <input type=submit...>, etc.) For example, when...
3
by: crazychrisy54 | last post by:
Hi there I just wondered if there is any way using GD to insert a clickable button or some clickable text into a image? It is possible to create images for buttons but what if you want a...
3
by: zb42 | last post by:
I have a _mc that I've added to the stage. On it's layers first frame I have this code that spins the _mc around and has some great effects: import fl.transitions.*; import...
1
by: Alkdarf | last post by:
I monitor door cameras with a third party application that gives me multiple video windows for the various video inputs in the card. I want to create an application that will overlay the video...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.