Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rights of a Word instance
Message
 
 
To
16/02/2011 05:53:30
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01500344
Message ID:
01500357
Views:
55
Are files on a network? Is user logged in?

>I have one of those doc-to-pdf apps, and in its latest incarnation it uses the Word2007's ability to export into pdf, without the need to run the usual "print to a .ps file, run GhostScript to convert it to pdf". That other route wouldn't work anyway, because Adobe's postscript driver wasn't updated since about '96 and it simply won't install on Server 2008R2, 64-bit.
>
>And this works nicely, when run manually. I only have to doubleclick the exe, and it goes its merry way, finds all the documents which weren't converted yet, and converts them. All is nice.
>
>But the goal is to have it automated, like on a computer. So it is regularly set to run as a scheduled task. And it runs there as well, except Word can't open any of the files. The error I'm getting is "Error OLE error code 0x80070005: Access is denied.". That is, that was the error until I set it to run with maximal privileges. After that, the error is "Error Member ACTIVEDOCUMENT does not evaluate to an object.".
>
>In the event log, there's not much of information, Office Session log only says that the user is N/A, which may mean that the COM object, i.e. instance of Word.Application didn't exactly inherit the identity of the caller. At least that's my suspicion.
>
>Any clues as to how to give the instance an identity, i.e. how to tell it to impersonate the user who runs my exe?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform