Greetings I want to print a pdf file through indusoft but it seems that it only has option of printing text Files. I have tried VB script but in vain. i am trying this for a while.Can any one help me out please .any link or hint will also do
[code]
Samples:
The subroutine is called to print a report on demand or using scheduler.
Sub PDFPrint()
Dim oShell
Set oShell = CreateObject( "WScript.Shell" )
oShell.Run("D:\Daily\pdftoprinter.exe D:\Daily\DailyReport_"&$LastDay&".pdf")
Set oShell = Nothing
End Sub
The subroutine below is called to kill a running service. In this case an instance of open office. Be sure when copying/pasting any script code that quotes ("), braces, and brackets, slashes, etc are a text version and not from a stylized font cache or else a VBScript error will result.
Sub KillooService()
Dim objWMIService, objProcess, colProcessa, colProcessb,strProcessKillb,strProcessKilla
strProcessKilla = "'soffice.exe'"
strProcessKillb = "'soffice.bin'"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessa = objWMIService.ExecQuery("Select * from Win32_Process Where Name = " & strProcessKilla )
Set colProcessb = objWMIService.ExecQuery("Select * from Win32_Process Where Name = " & strProcessKillb )
For Each objProcess In colProcessa
objProcess.Terminate()
Next
For Each objProcess In colProcessb
objProcess.Terminate()
Next
Set objWMIService = Nothing
End Sub
[/code]
[code]
Samples:
The subroutine is called to print a report on demand or using scheduler.
Sub PDFPrint()
Dim oShell
Set oShell = CreateObject( "WScript.Shell" )
oShell.Run("D:\Daily\pdftoprinter.exe D:\Daily\DailyReport_"&$LastDay&".pdf")
Set oShell = Nothing
End Sub
The subroutine below is called to kill a running service. In this case an instance of open office. Be sure when copying/pasting any script code that quotes ("), braces, and brackets, slashes, etc are a text version and not from a stylized font cache or else a VBScript error will result.
Sub KillooService()
Dim objWMIService, objProcess, colProcessa, colProcessb,strProcessKillb,strProcessKilla
strProcessKilla = "'soffice.exe'"
strProcessKillb = "'soffice.bin'"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessa = objWMIService.ExecQuery("Select * from Win32_Process Where Name = " & strProcessKilla )
Set colProcessb = objWMIService.ExecQuery("Select * from Win32_Process Where Name = " & strProcessKillb )
For Each objProcess In colProcessa
objProcess.Terminate()
Next
For Each objProcess In colProcessb
objProcess.Terminate()
Next
Set objWMIService = Nothing
End Sub
[/code]