help me please. need it badly..

FredJason

New Member
i have a problem about creating a word document. who here try it webspeed? i try this simple code in 4gl, its running smoothly..

DEFINE VARIABLE oWord AS COM-HANDLE NO-UNDO.
CREATE "Word.Application" oWord.
oWord:Documents:Open("C:\test1.doc").
oWord:Visible = TRUE.
oWord:ActiveDocument:SaveAs("c:\test2.doc").
oWord:Documents:close().
NO-RETURN-VALUE oWord:Quit ().
RELEASE OBJECT oWord.

but when i try it webspeed nothing happen?? what do you think is the problem?? please help me.
 
is webspeed running in the same environment (aka same computer as were you run the code that works smoothly)???

most probably not, at least is should be same OS (can't use COM unless webspeed is running in some Windows)... next check if source document (c:\test1.doc) exists and is readable and if the root drive (c:\) is writable by the webspeed process.
 
It's been a while, but doesn't WebSpeed code actually execute on the server, not the client? Therefore, is the document being created on the server?
 
I just checked, your code runs fine when run from a character client in batch mode (%DLC%\bin\_progres.exe -b -p word.p), so I see no reason for this not running in WebSpeed other than permissions. The WebSpeed agent is normally started with Local System Account privileges, which are a lot lower than your user privileges.

On Vista and higher writing to c:\ is considered something privileged. So first check if it runs when the files are in the temp folder.
 
The folder where the temporary files of a Progress session are put is configurable. If you don't configure anything it is the working directory that you have defined for your WebSpeed broker. To change that behavior you can use -T <path to my temp folder> start parameter for the WebSpeed agent.

Heavy Regards, RealHeavyDude.
 
Back
Top