Skip to main content

Posts

Showing posts with the label printing

Powershell print pdf to a specific printer

How to print multiple pdf files in a folder?

How to send pdf printing to a selected or specified printer other than the default printer?

PowerShell code snippet below will  print all pdf files on a specified path or folder.

Change the variable or specify the printer in which the PDF files will be printed.

The script will get first whatever is the default printer and save the printer name to a variable.

After printing, you can either set the previous default printer.  Or set a new printer default. You can also set any specific printer of your choice.

This script works fine in Windows 10.

#===================================
#Get the default printer and save to a variable
$DefPrinter=Get-WmiObject -Query " SELECT * FROM Win32_Printer WHERE Default=$true"
Write-Output $DefPrinter

#List all printers if you don't know the printer name
$xgetPrinters=Get-WmiObject -Query " SELECT * FROM Win32_Printer" | Select Name
Write-Output $xgetPrinters

#Set the default printer f…

Combine photos for printing

How to print double sided in Excel

VBA Duplex Printing in Excel 2010

In my previous post I have shown how to manually print duplex using Excel 2010.

Using VBA we can set the printer settings in duplex mode and print.

Microsoft engineers are kind enough to show some code on how we can achieve it.

The code sample on the links provided below is for Microsoft Word but it also works on Excel as well.

Here's the link: Set Duplex Printing via VBA

In the link above, there is an instruction on how to use the code.

Open Excel and click on Developer Tab. If Developer tab is not yet enable on your Excel.

The quick way to enter code is to right click on the name of the worksheet (like right click on "Sheet 1") and you will see "View Code".

Click on "View Code" and it will open up the Visual Basic editor.

The instruction on the Microsoft link above is to "Insert a Module".

Create or Insert a Module, then copy the code on the link above that starts with "Option Explicit

Public Type P…

How to print duplex on Excel 2010

To print two sided or duplex printing can be done on this steps below.

This will apply only if your printer supports duplex printing.

I tried printing only two worksheets in one A4 size paper.

It requires some few clicks to do duplex printing in Excel 2010.

There might be VBA tricks on how to do this automatically.

Here's what I have done.
Click on File select PrintUnder settings  choose "Print Entire Workbook"Under same settings click on "Print on Both Sides" (Flip Pages on long edge)If at this stage you click on  "Print", printout will be two pages.  So click on the right arrow below the print settings to select the other worksheet.Do same settings click on "Print on Both Sides" (Flip Pages on long edge)Now you can click on "Print" and the printout will be two sided on one paper. I never tried printing more than two worksheets, but I guess if you want to print multiple worksheets it has to been done manually using the same settin…