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...
Sincerely,
Romel Gomez
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