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 para configurar impresora e imprimir

publicado

buenas noches,

Necesito una macro que me imprima la hoja activa pero debido a que el pc donde va a funcionar la macro tiene varias impresoras asociadas, me gustaría que la macro me escoja una de esas impresoras(que no es la que esta predeterminada) y luego imprima.

gracias!!!! por su valiosA AYUDA!!!

Featured Replies

publicado

Espero te sirva:

Sub SeleccionarImpresora()

'Retrieve and set information about the current default printer

Dim FPS As FilePrintSetup

GetCurValues FPS

'Set the default Printer

DefaultPrinter$ = FPS.Printer

FilePrintSetup .Printer = "HP LaserJet IIISi on LPT1:"

'Send the document to the currently selected printer

FilePrint

'Reset to the original default printer

FilePrintSetup .Printer = DefaultPrinter$

End Sub

Comentas si te funciono

- - - - - Mensaje combinado - - - - -

Y adapta esta otra yo lo usaba hace ratos:

Sub SwitchPrinter()

Dim strActivePrinter As String

' Get active printer.

strActivePrinter = Application.ActivePrinter

' Change to the Microsoft Fax printer driver.

Application.ActivePrinter = "Microsoft Fax"

' Print the active document to Fax.

ActiveDocument.PrintOut

' Change back to the default printer.

Application.ActivePrinter = strActivePrinter

End Sub

- - - - - Mensaje combinado - - - - -

Esta macro te permite ver todas las impresoras intaladas, INSERTA UN USERFORM y UN LISTBOX y pega esta macro:

Option Explicit

Private Sub ListBox1_Click()

Dim WshNetwork

Set WshNetwork = CreateObject("WScript.Network")

Dim paso

MsgBox Application.ActivePrinter

paso = ListBox1.Text

WshNetwork.SetDefaultPrinter paso

MsgBox Application.ActivePrinter

End Sub

Private Sub UserForm_Initialize()

Dim WshNetwork, Printers, i

Set WshNetwork = CreateObject("WScript.Network")

Set Printers = WshNetwork.EnumPrinterConnections

For i = 0 To Printers.Count - 1 Step 2

ListBox1.AddItem Printers.Item(i + 1)

Next

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.