Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

Uniface 9: Problem using Call-out COM with WORD

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

11 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:29 AM UTC

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

hi

Did you define the OPEN operation on your own or by "generate signatue"?

We do have much more parameter then "FILENAME" :-)

Try to define an extra first parameter "DOCUMENT" ,

  • type = BASIC and  "handle"
  • classification = "DOCUMENT"   (The name of the "word-document" signature)
  • direction =OUT
  • On mask "Operation parameter" check  "Return value in first parameter"

Compile, create URR and try this one:

$DOCUMENTS$->OPEN($DOCUMENT$,FILENAME)

 

Ingo


Author: istiller (i2stiller@gmx.de)