fiz um formulário onde consigo enviar email com código em Vba funciona bem, porém preciso enviar a planilha 1 como anexo"somente a planilha 1"agradeço atenção dos colegas que colabora com este aprendizado, fico grato , segue abaixo o código que peguei em outro site e modifiquei .
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 Declare Function mailto 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 Sub CommandButton3_Click()
Dim Success As Long
Dim Endereços
Endereços = ""
Endereços = Text1
Endereços = Left(Endereços, Len(Endereços) - 1)
'On Error Resume Next
Success = ShellExecute(0&, vbNullString, "mailto:" & Endereços & "?subject=" & Me.TextBox1 & "&body=" & Me.TextBox2 & "Anexo=" & Me.TextBox3, vbNullString, vbNullString, vbNormalFocus)
End Sub
desde já agradeço
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 Declare Function mailto 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 Sub CommandButton3_Click()
Dim Success As Long
Dim Endereços
Endereços = ""
Endereços = Text1
Endereços = Left(Endereços, Len(Endereços) - 1)
'On Error Resume Next
Success = ShellExecute(0&, vbNullString, "mailto:" & Endereços & "?subject=" & Me.TextBox1 & "&body=" & Me.TextBox2 & "Anexo=" & Me.TextBox3, vbNullString, vbNullString, vbNormalFocus)
End Sub
desde já agradeço