Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


write message to printer

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1298
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> write message to printer
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 write message to printer - 8/27/2004 3:15:04 PM   
  johnny

 

Posts: 1
Score: 0
Joined: 8/27/2004
From:
Status: offline
hi,

i am newbit, i want to send "hello" to printer,
how to do it?

Thank you

johnny
 
 
Post #: 1
 
 Re: write message to printer - 11/2/2004 5:25:12 PM   
  OverAtTheBar

 

Posts: 12
Score: 0
Joined: 11/2/2004
From:
Status: offline
Personally I don't know if VBscript has the ability to send directly to a printer. But as a way around that method, you can create a text file and use the VBscript to open the text file in someting like notepad with the /p switch to trigger a print.

filetoprint = "c:\test.txt"
Set WshShell = WScript.CreateObject( "WScript.Shell" )
WshShell.run "c:\winnt\notepad.exe /p " & filetoprint

You know where to find me,
Corey F.

(in reply to johnny)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> write message to printer Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts