In the past I used following script to make a PDF from a sheet in a
protected excel file.
--------------------------------------------------------------------------------
set vbs=%temp%\ExcelPrint.vbs
:: Build VBScript file
findstr "'%skip%VBS" "%~f0" > "%vbs%"
::set /p Pass=Enter Password to edit excel file:
set pass=nottherealpassw
cscript //nologo "%vbs%" "D:\M\Desktop\myfile.xls" "mysheet"
"C:\Program Files\PDFCreator\PDFCreator.exe" 1 %Pass%
:: Open File.xls with "YourPassword" and print 1 copy of Sheet named Chart
:: to PDFCreator printer driver.
Del %vbs%
goto :eof
'Create this VBScript on the fly 'VBS
Set ObjArgs = wscript.arguments 'VBS
strFileName = objargs(0) 'VBS
strWorkSheetName = objargs(1) 'VBS
strPrinter = objargs(2) 'VBS
intCopies = objargs(3) 'VBS
strPassword = objargs(4) 'VBS
Set XLApp= CreateObject("Excel.Application") 'VBS
XLApp.Visible = False 'VBS
Set XLWkbk = XLApp.Workbooks.Open(strFileName,,,,,strPassword) 'VBS
XLWkbk.sheets(strWorkSheetName).PrintOut , , intCopies, , strPrinter
'VBS
XLWkbk.Close False 'VBS
XLApp.Quit 'VBS
Set XLWkbk = Nothing 'VBS
Set XLApp = Nothing 'VBS
Set ObjArgs = Nothing 'VBS
--------------------------------------------------------------------------------
This worked well.
Now, with a newer version of PDFcreator and a new computer with
Windows7. I can't get it to work.
I don't know what I do wrong.
The newest version of PDFcreator has a built in FTP feature that I can
use to upload the created PDF file to the server I want so this would
cover all my problems.
Anyone an idea?
I really don't know what profile settings I have to use for PDFcreator
to get this working..
:(
--- news://
freenews.netfront.net/ - complaints:
ne...@netfront.net ---