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.

Macro vista preliminar seleccion excel 2

publicado

Buenas tardes, perfecto la macro que me ha ayudado Riddle :

Sub Imprimir_Vistaprevia_seleccion()

'preparar la hoja para la impresión

With ActiveSheet.PageSetup

.Orientation = xlLandscape 'xlPortrait es vertical xlLandscape es horizontal

.PaperSize = xlPaperA5 'formato A5

.BlackAndWhite = False 'incluir colores o no

.FitToPagesWide = 1 'reduce el tamaño de la hoja (ancho)

.FitToPagesTall = 1 'reduce el tamaño de la hoja (alto)

.CenterHorizontally = 1 'centrar horizontalmente

.CenterVertically = 1 'centrar verticalmente

End With

Selection.PrintPreview

End Sub

una vez configurada en tamaño, doy a imprimir y perfecto.

Pero necesito la alternativa de guardarlo en Pdf. para mandarlo por correo esa misma seleccion:

en = G:\Factura\Pedidos\Wakonda

con el nombre = Range("B333").Select

Featured Replies

publicado

Hola prueba así:

Sub pdf()
ruta = "G:\Factura\Pedidos\Wakonda\"
Nom = [G333].Value
Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ruta & Nom & ".pdf", Quality:=xlQualityStandard _
, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub
[/CODE]

Salu2

publicado
  • Autor

Hola pero me sale

Sub ImpPDF_Wakonda()

ruta = "G:\Factura\Pedidos\Wakonda\"

Nom = [G333].Value

Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ruta & Nom & ".pdf", Quality:=xlQualityStandard _

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

End Sub

me dice depurar

publicado
  • Autor

hola y si lo hago asi me sale tambien depurar

Sub ImpPDF_Wakonda()

'preparar la hoja para la impresión

With ActiveSheet.PageSetup

.Orientation = xlLandscape 'xlPortrait es vertical xlLandscape es horizontal

.PaperSize = xlPaperA5 'formato A5

.BlackAndWhite = False 'incluir colores o no

.FitToPagesWide = 1 'reduce el tamaño de la hoja (ancho)

.FitToPagesTall = 1 'reduce el tamaño de la hoja (alto)

.CenterHorizontally = 1 'centrar horizontalmente

.CenterVertically = 1 'centrar verticalmente

End With

ruta = "G:\Factura\Pedidos\Wakonda\"

Nom = [G333].Value

Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ruta & Nom & ".pdf", Quality:=xlQualityStandard _

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

End Sub

publicado
  • Autor

Hola Riddle, es el Nitro PDF Creator, el que tengo instalado

perdona por el color, como me sale en amarillo

publicado

Ok mira enciende la grabadora de macros y guarda el archivo como PDF desde el menu exportar > Crear Documento PDF, guardalo con cualquier nombre, apaga la grabadora de macros y subes el código que obtuviste, recuerda que cuando vas a insertar un código en algún mensaje utiliza la etiqueta "Codigo" que encuentras el editor de texto, la 5º opción de derecha a izquierda.

Salu2

publicado
  • Autor

Uso excel 2003 y no tengo la opcion de exportar

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.