Ya realice un codigo en donde ya manda el correo y manda un rango de celdas pero necesito que ese mismo archivo de donde saco el rango de celdas se adjunte en el correo.
Espero me puedan ayudar ya que llevo casi 2 dias intentandolo.
rivate Sub Si_Click()
Dim NSession As Object
Dim NDatabase As Object
Dim NUIWorkSpace As Object
Dim NDoc As Object
Dim NUIdoc As Object
Dim quienes(0) As Variant
Set NSession = CreateObject("Notes.NotesSession")
Set NUIWorkSpace = CreateObject("Notes.NotesUIWorkspace")
Set NDatabase = NSession.GetDatabase("", "")
If Not NDatabase.IsOpen Then
NDatabase.OPENMAIL
End If
'Create a new document
Set NDoc = NDatabase.CreateDocument
With NDoc
.SendTo = Sheets("Tablas").Range("A1").Value 'CHANGE THIS
.CopyTo = CC
.Subject = "REPORTE DE LOS SOLVENTES " & Now
'Email body text, including marker text which will be replaced by the Excel cells
'Edit the just-created document to copy and paste the Excel cells into it
Set NUIdoc = NUIWorkSpace.EDITDocument(True, NDoc)
With NUIdoc
'Find the marker text in the Body item
.GotoField ("Body")
.FINDSTRING "**PASTE EXCEL CELLS HERE**"
'.DESELECTALL 'Uncomment to leave the marker text in place (cells are inserted immediately before)
'Replace it with the Excel cells
Sheets("ACTUALIZACIONDESOLVENTES").Range("A1:J71").Copy 'CHANGE THIS
.Paste
Application.CutCopyMode = False
.Send
.Close
End With
Set NSession = Nothing
Unload Me
End Sub
[/CODE]
Featured Replies
Archivado
Este tema está ahora archivado y está cerrado a más respuestas.
Ya realice un codigo en donde ya manda el correo y manda un rango de celdas pero necesito que ese mismo archivo de donde saco el rango de celdas se adjunte en el correo.
Espero me puedan ayudar ya que llevo casi 2 dias intentandolo.