Word through Progress

B.Dauvissat

New Member
Hi all,

For my job, I'm developping softwares using Progress.

A few days ago, we had a challenge : create a word document with datas and merging automatically knowing the path to a model.

Someone found a procedure using Com-Handle to make the interface with word.

We did it but some problems still :
- When word isn't opened, we open it but it stills minimized and the merging is paused. So we have to maximize it in order to continue.

Our clients are using many versions of word (97, 2000, XP).
We find the path to the winword.exe using a registry key but the key is different from one version to another. Is there a unique one ?

Thanks for your answers and sorry for my English, it's not my native language.

Ben
 

cybvek

New Member
CREATE "Word.Application" chAppl CONNECT NO-ERROR.
IF NOT VALID-HANDLE(chAppl) THEN
CREATE "Word.Application" chAppl.
chAppl:Windowstate = 1. /* Maximize */

Regards,
Viktor

Originally posted by B.Dauvissat
Hi all,

For my job, I'm developping softwares using Progress.

A few days ago, we had a challenge : create a word document with datas and merging automatically knowing the path to a model.

Someone found a procedure using Com-Handle to make the interface with word.

We did it but some problems still :
- When word isn't opened, we open it but it stills minimized and the merging is paused. So we have to maximize it in order to continue.

Our clients are using many versions of word (97, 2000, XP).
We find the path to the winword.exe using a registry key but the key is different from one version to another. Is there a unique one ?

Thanks for your answers and sorry for my English, it's not my native language.

Ben
 

cybvek

New Member
I think there are many way to find, here's one:

1 step:
Get this key
[HKEY_CLASSES_ROOT\Word.Application\CLSID]
@="{000209FF-0000-0000-C000-000000000046}"

2 step (Use the step 1 CLSID in this key)
[HKEY_CLASSES_ROOT\CLSID\{000209FF-0000-0000-C000-000000000046}\LocalServer32]
@="C:\\PROGRA~1\\MICROS~1\\Office\\WINWORD.EXE /Automation"

From the LocalServer32 you can cut the path of the winword

Regards,
Viktor


Originally posted by B.Dauvissat
It works !
Thanks a lot !!!!

Does anybody has an answer about the registry key ?

Ben.
 
Top