|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
can i email report?
i hav a database in access, and i want to email the report (instead of print) at the click of a button.
is this possible?? |
|
#2
|
|||
|
|||
|
U can use Outlook(a Ms mail client) to send mail...
Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Private Const SW_NORMAL = 1 Sub SendMail(ByVal strAddress As String, _ Optional ByVal strCC As String, _ Optional ByVal strBCC As String, _ Optional ByVal strSubject As String, _ Optional ByVal strBodyText As String) Dim strTemp As String If Trim(Len(strCC)) Then strTemp = "&CC=" & strCC End If If Trim(Len(strBCC)) Then strTemp = strTemp & "&BCC=" & strBCC End If If Trim(Len(strSubject)) Then strTemp = strTemp & "&Subject=" & strSubject End If If Trim(Len(strBodyText)) Then strTemp = strTemp & "&Body=" & strBodyText End If If Len(strTemp) Then Mid(strTemp, 1, 1) = "?" End If strTemp = "mailto:" & strAddress & strTemp ShellExecute 0, "open", strTemp, 0, 0, SW_NORMAL End Sub Private Sub Command1_Click() SendMail "CCC@123.com" End Sub |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > can i email report? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|