I am having a problem on VBA using SAP and Outlook libraries together.
Basically I was succesfully working on a SAP-VBA sheet. Then I tried getting Outlook together with it. The problem is that when I use the Outlook 15.0 Library on "References", SAP stops working.
It seems "session" on SAP codes interferes with "Applications.Session" on Outlook codes.
Peter came up with a solution on this thread adding Outlook library to access VBA prevents SAP createsession from working
But when I add the "Dim Session As SAPFEWSELib.GuiSession" it states the error "User defined type not defined"
Initial code below to start the interaction VBA-SAP
Sub Importar_ZTPP()
Dim Session As SAPFEWSELib.GuiSession
On Error Resume Next
If IsEmpty(Session) Then
Set Session = GetObject("SAPGUI").GetScriptingEngine.Children(0).Children(0)
End If