![]() WScript.echo "**Finished formatting extracts. Wscript.Echo extractName & ": Setting default view to Page break view." 'Set current worksheet view to Page Break Preview = "$A$1:$N$" & rowcntĮlseif InStr(extractName,"WCIS") = 1 then Wscript.echo extractName & ": Setting print area." Set xlApp = CreateObject("Excel.Application") Highlight the print area you want, then select 'Set Print. Choose 'Set Print Area.' Hit 'Enter' or 'Return' on your keyboard to set the print area. 'Wscript.Echo "Extract Name: " & extractName Click on the 'Print Area' button in the top menu. 'Wscript.Echo "File path and Name: " & AbsolutePathName It looks like one has to highlight the print area and then go to 'Page Layout / Print Area. In Excel of Office 365 the Print Area in the 'Page Setup/ Sheet / Print Area' is grayed out. If UCase(objFSO.GetExtensionName(objFile.name)) = "XLS" ThenĪbsolutePathName = objFSO.GetAbsolutePathName(objFile)ĮxtractName = objFSO.GetFileName(objFile) In earlier versions of Excel, one could set the print area via 'Page Setup/ Sheet / Print Area' and one could put in a string like 'A1:K63'. Set objFSO = CreateObject("Scripting.FileSystemObject") Wscript.echo "Current Directory: " & CurDir Set args = WScript.Arguments CurDir = args.Item(0) Set current worksheet view to Page Break Preview
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |