Skip to Content
Former Member
Dec 09, 2012 at 04:55 PM

How to save report using buton (VBA+Excel)


Hi Comunity,

does anybody know if it's posible save report by VBA macro using standard button.

I tied record macro but unsuccessful.

If Not IsObject(application) Then   Set SapGuiAuto  = GetObject("SAPGUI")   Set application = SapGuiAuto.GetScriptingEngineEnd IfIf Not IsObject(connection) Then   Set connection = application.Children(0)End IfIf Not IsObject(session) Then   Set session    = connection.Children(0)End IfIf IsObject(WScript) Then   WScript.ConnectObject session,     "on"   WScript.ConnectObject application, "on"End Ifsession.findById("wnd[0]").maximizesession.findById("wnd[0]/tbar[1]/btn[43]").press

Recordered only press butoon