LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default can't print excel sheet using wsh script


Hi,

I'm trying to print a pdf by using a wsh script. Problem is Excel
complains that printing is not possible because the file is already in
use or locked, which is complete nonsense.

Set objXl = wscript.createobject ("Excel.Application")

objXl.DisplayAlerts = False
objXl.visible = true

Set objwb = objxl.workbooks.open("c:\temp\test.xls")
Set objwb = objXl.activeworkbook.worksheets("Tabelle1")

objXl.ActiveSheet.PrintOut ,,,,,,,"my.pdf"


Any ideas ?

TIA


--
onedollar
------------------------------------------------------------------------
onedollar's Profile: http://www.excelforum.com/member.php...o&userid=31407
View this thread: http://www.excelforum.com/showthread...hreadid=511028

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to Print Range of Cells Lisa Excel Discussion (Misc queries) 3 January 22nd 09 04:45 PM
How to mention a particular sheet name while opening excel with VB script. refina New Users to Excel 1 June 17th 08 02:32 AM
How to mention a particular sheet name while opening excel with VB script. refina New Users to Excel 2 June 16th 08 10:50 AM
Excel macro script to copy only formulas and not values from one sheet to another Kate[_4_] Excel Programming 5 August 13th 04 12:45 AM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM


All times are GMT +1. The time now is 03:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"