lehighwiz
22nd April 2002, 18:53
I am trying to run a print session with a VB script. here is the beginning of my vb code:
Set baanobj = CreateObject("Baan4.Application")
baanobj.Timeout = 4000
SessionName = "tdsst9402m000"
FieldName = "cpcc.v"
FieldValue = "ST2"
baanobj.ParseExecFunction "ottstpapihand", "stpapi.put.field(" & Chr(34) & SessionName & Chr(34) & "," & Chr(34) & FieldName & Chr(34) & "," & Chr(34) & FieldValue & Chr(34) & ")"
SessionName = "tdsst9402m000"
FieldName = "yrno.f"
FieldValue = "2002"
baanobj.ParseExecFunction "ottstpapihand", "stpapi.put.field(" & Chr(34) & SessionName & Chr(34) & "," & Chr(34) & FieldName & Chr(34) & "," & Chr(34) & FieldValue & Chr(34) & ")"
SessionName = "tdsst9402m000"
FieldName = "yrno.t"
FieldValue = "2002"
baanobj.ParseExecFunction "ottstpapihand", "stpapi.put.field(" & Chr(34) & SessionName & Chr(34) & "," & Chr(34) & FieldName & Chr(34) & "," & Chr(34) & FieldValue & Chr(34) & ")"
When i attempt to do the sesond ParseExecFunction I get the following error in my background baan window. Unknown Message" . Please help.
Set baanobj = CreateObject("Baan4.Application")
baanobj.Timeout = 4000
SessionName = "tdsst9402m000"
FieldName = "cpcc.v"
FieldValue = "ST2"
baanobj.ParseExecFunction "ottstpapihand", "stpapi.put.field(" & Chr(34) & SessionName & Chr(34) & "," & Chr(34) & FieldName & Chr(34) & "," & Chr(34) & FieldValue & Chr(34) & ")"
SessionName = "tdsst9402m000"
FieldName = "yrno.f"
FieldValue = "2002"
baanobj.ParseExecFunction "ottstpapihand", "stpapi.put.field(" & Chr(34) & SessionName & Chr(34) & "," & Chr(34) & FieldName & Chr(34) & "," & Chr(34) & FieldValue & Chr(34) & ")"
SessionName = "tdsst9402m000"
FieldName = "yrno.t"
FieldValue = "2002"
baanobj.ParseExecFunction "ottstpapihand", "stpapi.put.field(" & Chr(34) & SessionName & Chr(34) & "," & Chr(34) & FieldName & Chr(34) & "," & Chr(34) & FieldValue & Chr(34) & ")"
When i attempt to do the sesond ParseExecFunction I get the following error in my background baan window. Unknown Message" . Please help.