Unable to run procedure with component handle on web...

rcgomez11

Member
Progress Version : 9.1E
Platform: Windows 7 Ultimate 32Bit

Good day ProgressTalkers,

I have a module that converts word to pdf file, when I tried to run this module using "F2" on keyboard this module goes well as it is expected but when I tried to run this module inside html then run inside web browser, nothing happens, it just keep my agents busy.
Below is the codes that I use...

Code:
PROCEDURE docToPDF:
    DEFINE INPUT  PARAMETER pFileName AS CHARACTER  NO-UNDO.
    DEFINE VARIABLE WORD AS COM-HANDLE NO-UNDO.

    CREATE "Word.Application" WORD NO-ERROR.

    ASSIGN WORD:VISIBLE = FALSE.

    WORD:Documents:OPEN("C:\eGaps_Web\attachment\" + pFileName).
    WORD:activedocument:saveas("C:\eGaps_Web\attachment\" + REPLACE(pFileName, ".doc", ".pdf"),17). /* 17 means PDF */
    WORD:Documents:CLOSE().
    WORD:QUIT().

    RELEASE OBJECT WORD.
    RETURN.
END PROCEDURE.

run docToPDF("a20120001.doc").

Sincerely,
Romel Gomez
 

RealHeavyDude

Well-Known Member
I am not 100% positive but as far as I understand the OLE automation only works with the prowin32.exe - that's the GUI executable. It does not work with the ChUI executable or the AppServer/WebSpeed agent as this is basically a subset of the ChUI executable.

Heavy Regards, RealHeavyDude.
 

RealHeavyDude

Well-Known Member
That is very interesting. One can learn something new every day - and as always, don't tell something that you've been told until you've challenged the statement and found out that it holds water ...

Heavy Regards, RealHeavyDude.
 

RealHeavyDude

Well-Known Member
Do you see anything in the log file of the WebSpeed agent?
Does the WebSpeed Broker run on Windows platform too?

Heavy Regards, RealHeavyDude.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
More detailed agent logging could help figure it out. When were log manager / log entry types added? Was that in 10.x? If that's not available, then using %DLC%\bin\prostack on a busy agent might help show what it's up to, assuming that command is available. It is in my Linux 9.1D installation.
 
Top