Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Print Sheet default PDF A3 size paper

Hi All,

I want to macro to  print a sheet such a way that default printer pdf should be selected,default a3 size should be printed and should close the pdf by default.

Please suggest some solution.

4 Replies
Not applicable
Author

I have the exact sanme problem. Please help.

Devang.

Not applicable
Author

Anyone who has managed to set default size to a4 yet?

chematos
Specialist II
Specialist II

Set xlobj = CreateObject("Excel.Application")

  Set wrkbook = xlobj.Workbooks.Open(varExcelFile)

  Set wrksht = xlobj.worksheets("Sheet1")



wrksht.PageSetup.PaperSize = 8         ' xlPaperA3 = 8

wrksht.PageSetup.PaperSize = 9         ' xlPaperA4 = 9

chematos
Specialist II
Specialist II

The printer is the user default printer or the local default printer, I don't know if there is a way to choose the printer without a prompt message, but if the macro would always be executed in frontend, there is no problem to setup a prompt message, if it should be executed in background.... I don't know.


Try this to select the printer:


xlObj.Dialogs(xlDialogPrinterSetup).Show


Use this to close the document:

xlobj.Close()

xlobj.Quit()