(no subject)

Jan 30, 2009 13:12


OpenPDF-file from any system:
1+ Create script openpdf.vbs

Set args = WScript.Arguments

If (args.Count >= 1) Then

If (args(0) <> "") Then
strPath = args(0)
Else
strPath = ""
End If

'WScript.Echo strPath
'WScript.Echo WScript.Path

Set App = CreateObject("AcroExch.App")
Set AVDoc = CreateObject("AcroExch.AVDoc")

If AVDoc.Open(strPath, "Code File") <> True Then
Call MsgBox("PDF cannot open", vbOKOnly)
End If
App.Show
End If

2. Now, we can call this file from any SCADA. For example: exec("cscript.exe", "openpdf.vbs c:\Docs\test.pdf")

Previous post Next post
Up