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.

Enviar un rango a un mail que está en una celda

publicado

Hola, tengo una macro que envía directamente un rango a "prueba@prueba.com" pero me gustaría que lo enviara al mail que hay en una celda en concreto (B7)

Sub Send_Range()

' Select the range of cells on the active worksheet.

ActiveSheet.Range("D2:J22").Select

' Show the envelope on the ActiveWorkbook.

ActiveWorkbook.EnvelopeVisible = True

' Set the optional introduction field thats adds

' some header text to the email body. It also sets

' the To and Subject lines. Finally the message

' is sent.

With ActiveSheet.MailEnvelope

.Introduction = "Buenas tardes, adjuntamos última proforma."

.Item.To = "prueba@prueba.com"

.Item.Subject = "Asunto prueba"

.Item.Send

End With

End Sub

Del mismo modo, también me gustaría que el asunto (Item.subject) estuviese vinculado a la celda B8.

Muchas gracias con antelación. Entiendo que este tema ya ha ha sido planteado, pero no he encontrado exactamente lo que buscaba y mis conocimientos en VBA son nulos.

Saludos y gracias de nuevo.

Featured Replies

publicado
  • Autor

Hola, ya he conseguido resolver el asunto:

Sub Send_Range()

' Select the range of cells on the active worksheet.

ActiveSheet.Range("D2:J22").Select

' Show the envelope on the ActiveWorkbook.

ActiveWorkbook.EnvelopeVisible = True

' Set the optional introduction field thats adds

' some header text to the email body. It also sets

' the To and Subject lines. Finally the message

' is sent.

With ActiveSheet.MailEnvelope

.Introduction = Range("O12").Value

.Item.To = Range("O3").Value

.Item.CC = Range("O6").Value

.Item.BCC = Range("O8").Value

.Item.Subject = Range("O10").Value

.Item.Send

End With

End Sub

Un saludo.

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.