Created
May 1, 2013 00:39
-
-
Save tomoyamkung/5492974 to your computer and use it in GitHub Desktop.
[vbs]Excel を印刷するスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Dim obj | |
Dim objWkBk | |
Set obj = CreateObject("Excel.Application") | |
Set objWkBk = obj.Workbooks.Open(WScript.Arguments(0)) | |
obj.ActiveWindow.SelectedSheets.PrintOut() | |
objWkBk.Save | |
objWkBk.Close | |
Set objWkBk = Nothing | |
obj.Quit | |
Set obj = Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
スクリプトの実行はこんな感じ。
cd $PROJECT_ROOT
cmd /c .\scripts\XlsPrint.VBS EXCEL_FILE_PATH