Have set up a job in Job Queue which is started by the NAS. Everything works well on the server if I start the job manually from the classic client. Correct Office version is installed and I have quadruppelchecked the DataTypes and Subtypes.
In CodeUnit 5054 (WordManagement) this line "wrdDoc := wrdApp.Documents.Open(MainFileName);" is giving me the following error: The type 'Automation' was not defined for the function.
Have changed the location of the file, tested with hardcoded paths, checked that the wrdDoc is created, ensured the NAS user can access the folders and files etc etc.
For me it seems like there is something with users and rights running the automation 'Microsoft Word 14.0 Object Library'.Application, but can't figure out what's wrong.
Anything to do with Office 2010?
Any hints?
Cheers
r.
0
Comments
Thomas
Also try running nas as an application rather than a service. What happens?
Hmm, can you point me in the right direction about running the NAS as an application and not as a service?
With the debug parameter and a developper's license, the debugger will be active and Break on Triggers will be activated. You can set breakpoints and let it run or just let it run to catch the code line that raises the error.
You don't have to use that parameter though, since the purpose of running nas ineractively here is that the automation server can show prompts and messages. MS Office is notorious for this. But since you run the code from the same user from the client, you should have caught these already. But checking it out does not hurt...
By running the NAS as an application in debug mode helped me fix a few problems about temp file paths.
At the end, it runs and everything is fine. Shut down the NAS application and started the service NAS, and the same error occurs: "..Automation is not defined for the function".
When I run the NAS as an application I'm logged on to the server with the same domain user as the service NAS uses.
Running code in debug mode can run smooth when it comes to code reading/writing from/to files, but running the same code in normal mode can generate some errors since the file wasn't properly saved before the next line of code was run. So i ran the NAS as an application without debug mode, and that also went fine
Under which user is the application NAS running? Can I set the user?
You can check in the task manager. User name column is shown by default.
Did you ever solved the problem? I do have the same problem (also on trying to use mailmerge in the NAS).
The cu works fine when running on a client, works fine when I start the NAS on the command prompt, but fails on opening an (previous saved) XML file when the NAS is started as a service.
More weird: it works perfectly in our development environment!, with the NAS started as a service?
The only difference between development and production is the server (2003 Server SP2 resp 2008 Server SP2)
Of cource, the solution works with the NAS run on the command prompt, but we donot like that solution
Benno
http://www.mibuso.com/forum/viewtopic.php?f=23&t=51723&hilit=word+active
...
Everybody on-line.
...
Looking good!