vieirasoft 12/5/2011, 13:41
POde faze-lo utilizando o VBA
1- Abra um módulo novo na aba módulo e de-lhe o nome de móduloemail
Cole o código
Option Compare Database
Option Explicit
Public Matriz() As Propiedad
Public Declare Function SHGetSpecialFolderPath Lib "shell32.dll" Alias "SHGetSpecialFolderPathA" (ByVal hwnd As Long, ByVal pszPath As String, ByVal csidl As Long, ByVal fCreate As Long) As Long
Public 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
Public Const SW_SHOWNORMAL = 1
Public Type Propiedad
nombre As String
valor As String
End Type
Public Function Temporal() As String
Dim strRuta As String * 256
SHGetSpecialFolderPath 1, strRuta, &H28, 0&
Temporal = Left$(strRuta, InStr(1, strRuta, Chr$(0)) - 1) & "\Temp\"
End Function
2-no evento click do botão
'Email será o nome do campo
On Error Resume Next
Dim msg, Style, Title
msg = "Por favor preencha um email válido..."
Style = "vbInformation"
Title = "Erro"
If IsNull(Me.Email) Then
msg = MsgBox(msg, vbInformation, Title)
Else
Const SW_SHOW = 3
ShellExecute Me.hwnd, "open", "mailto:" & Email, vbNullString, vbNullString, SW_SHOW
End If