Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

agregar codigo para archivo adjunto LOTUS

publicado

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

.body = "" & vbNewLine & vbNewLine & _
"**PASTE EXCEL CELLS HERE**" & vbNewLine & vbNewLine


.Save True, False
End With

'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

publicado

Prueba agregando

.Attachments.Add ActiveWorkbook.FullName

antes de .Send

Al menos así lo he hecho yo, ojalá te sirva.

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.