Como generar un libro nuevo con los datos de la seleecion y que este se envie como archivo adjunto en outlook con una macro
Sub EnviarCorreo()
'Por.Dante Amor
Application.ScreenUpdating = False
f = 5
u = Range("A" & Rows.Count).End(xlUp).Row
Do While Cells(f, "B") <> ""
If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData
Range("E2") = Cells(f, "B")
Range("A84:R" & u).AdvancedFilter Action:=xlFilterInPlace, _
CriteriaRange:=Range("E1:E2")
u2 = Range("A" & Rows.Count).End(xlUp).Row
If u2 > 84 And Cells(f, "C") <> "" And Cells(2, "G") <> "" Then
Range("A83:R" & u2).Copy
Set dam = CreateObject("Outlook.Application").CreateItem(0)
dam.to = Cells(f, "C")
dam.Subject = Cells(2, "G")
dam.Display
Application.Wait Now + TimeValue("00:00:06")
SendKeys "^v", True
dam.Display
dam.Send
End If
f = f + 1
Loop
MsgBox " se mandaron los correos verificar informacion"
End Sub
Me gustaria poder modificar esta macro que me reestructuro dante pues en office 2010 me sigue sin pegar la tabla en el cuerpo del mensaje . Lo que necesito como opcion es que la seleccion del filtro se genere un nuevo archivo y que este se nombre igual al subject y al mismo lo tiempo se adjunte el archivo