darkjmf1
Structural
- Dec 17, 2012
- 49
Hello,
I know how to access a SAP file through the OAPI from VBA, e.g.:
My question is simple: How could I access the information included in the SAP file without opening such file or even opening the program?
My first approach would be something like:
Unfortunately it is not working.
Am I asking for something impossible? If not, could somebody help me in the right direction?
Thanks in advance.
I know how to access a SAP file through the OAPI from VBA, e.g.:
Set ObjetoSap = New SAP2000v16.SapObject
Set ModeloSap = ObjetoSap.SapModel
ObjetoSap.ApplicationStart
ret = ModeloSap.InitializeNewModel
ret = ModeloSap.File.OpenFile(txt_fichero.Text)
Set ModeloSap = Nothing
Set ObjetoSap = Nothing
Set ModeloSap = ObjetoSap.SapModel
ObjetoSap.ApplicationStart
ret = ModeloSap.InitializeNewModel
ret = ModeloSap.File.OpenFile(txt_fichero.Text)
Here I include the code needed to read whatever I need from the SAP file
ObjetoSap.ApplicationExit (True)Set ModeloSap = Nothing
Set ObjetoSap = Nothing
My question is simple: How could I access the information included in the SAP file without opening such file or even opening the program?
My first approach would be something like:
Set ObjetoSap = New SAP2000v16.SapObject
Set ModeloSap = ObjetoSap.SapModel
ret = ModeloSap.File.OpenFile(txt_fichero.Text)
Set ObjetoSap = Nothing
Set ModeloSap = ObjetoSap.SapModel
ret = ModeloSap.File.OpenFile(txt_fichero.Text)
Here I include the code needed to read whatever I need from the SAP file
Set ModeloSap = NothingSet ObjetoSap = Nothing
Unfortunately it is not working.
Am I asking for something impossible? If not, could somebody help me in the right direction?
Thanks in advance.