I have the following error in a VBA function.
It says this is an invalid syntax here:
Set SapGuiAuto = GetObject("SAPGUI")
Do I need any reference for this? I have SAP GUI 7.30.
I have the following error in a VBA function.
It says this is an invalid syntax here:
Set SapGuiAuto = GetObject("SAPGUI")
Do I need any reference for this? I have SAP GUI 7.30.
I had the same problem. What is happening is that it is trying to get a handle on an existing COM object (GetObject
) instead of creating one (CreateObject
).
The solution was as simple as having a running SAP GUI instance before launching the script.
I believe SAPGUI scripting should work with Office 2013 - I assume you've reviewed the sample applications in note 1441550? Scripting reference documentation is available from SDN.
Note: Don't forget - for scripting to work, you need to enable the sapgui/user_scripting
or user_scripting_per_user
profile parameters (this will be done by your system administrator, using transactions RZ10
or RZ11
) as well as enable it in your SAPGUI settings (Accessibility & Scripting > Scripting)