Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sunanda
Contributor
Contributor

VB Script to save pdf file for SAP Invoice pdf

If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").modifyCheckbox 0,"PROCDOC",true
session.findById("wnd[0]/tbar[1]/btn[7]").press
session.findById("wnd[1]/tbar[0]/btn[8]").press
session.findById("wnd[0]/tbar[0]/okcd").text = "pdf!"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[1]").close
session.findById("wnd[0]/tbar[0]/btn[3]").press

0 Replies