Workbook.PrintOut
Use this function to print either the current item in the workbook or the entire workbook.
SVB Example
Printing an item from a workbook
Option Base 1 Option Explicit Sub Main Dim wb As Workbook 'assigns the new workbook to the object wb Set wb = Workbooks.New("WB Example") 'inserts the file adstudy.sta into the root folder 'of the workbook as the first child wb.InsertFile(Path & _ "\examples\datasets\adstudy.sta",wb.Root,scWorkbookFirstChild) 'sets the workbook to visible wb.Visible = True 'prints the current item in the workbook 'print only selected and doesn't show the print dialog wb.PrintOut(True,False) End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.