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.

Imprimir hoja en PDF y enviar por outlook

publicado

Bueno antes que todo agradecer por la ayuda que brindan a los que no sabemos tanto de excel , ahora manos a la obra :

Lo que necesito es saber si existe una macro para que imprima una hoja en PDF , adjunte y luego se envie a un correo por outlook , a una direccion ya definida , que el asunto sea lo que se escriba en la celda E1 , de ante mano muchas gracias

agosto1.xls

Featured Replies

publicado

puedes implementar este codigo en una macro que la mandes llamar desde un boton:

With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With


Worksheets("BD").Select
Ruta = "C:\Reporte\"
End If
fichero = Ruta & "NOMBRE DEL ARCHIVO .pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=fichero, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True

Dim objOutlook As Object
Dim obItem As Object
Dim obkNamespace As Object
Dim ADJUNTO As Variant
Set objOutlook = CreateObject("Outlook.Application")
Set ObjNamespace = objOutlook.getnamespace("MAPI")
Set ObjItem = objOutlook.Createitem(olMailItemn)
ObjNamespace.logon "EXCELSPACE", , True, True
ADJUNTO = fichero
With ObjItem
.Attachments.Add (ADJUNTO)
.Display
.TO = ""
.CC = ""
.BCC = ""
.Subject = ' "ASUNTO"
.Body = "El ARCHIVO esta listo para enviarse."
.Display
End With
ObjNamespace.Logoff
Set objOutlook = Nothing
Set ObjItem = Nothing
Set ObjNamespace = Nothing
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With
End Sub
[/CODE]

publicado
  • Autor

vale lo pruebo cuando llegue al trabajo y comento , se agradece su respuesta

  • 6 months later...
publicado

Estimado aronava, he tratado de usar parcialmente tu código, ya que la parte de salvar el documento en PDF que presento a continuación me funciona de maravillas, sin embargo no he logrado materializar la parte del envio por mail en outlook, que estoy haciendo mal?

Sub Imprimir_PDF()

Application.ScreenUpdating = False

Dim texto As String, titulo As String

texto = "INGRESE NOMBRE ARCHIVO"

titulo = "CREAR ARCHIVO PDF"

archivo = InputBox(texto, titulo)

Sheets("FAX SIM").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _

"Macintosh HD:Users:rboke:Desktop:PSC:" & archivo & ".pdf", Quality:=xlQualityStandard, _

IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

Dim objOutlook As Object

Dim obItem As Object

Dim obkNamespace As Object

Dim ADJUNTO As Variant

Set objOutlook = CreateObject("Outlook.Application")

Set ObjNamespace = objOutlook.getnamespace("MAPI")

Set ObjItem = objOutlook.Createitem(olMailItemn)

ObjNamespace.logon "EXCELSPACE", , True, True

ADJUNTO = archivo

With ObjItem

.Attachments.Add (ADJUNTO)

.Display

.TO = ""

.CC = ""

.Subject = "ASUNTO"

.Body = "El ARCHIVO esta listo para enviarse."

.Display

End With

ObjNamespace.Logoff

Set objOutlook = Nothing

Set ObjItem = Nothing

Set ObjNamespace = Nothing

With Application

.ScreenUpdating = True

.Calculation = xlCalculationAutomatic

End With

End Sub

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.