Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rights of a Word instance
Message
De
16/02/2011 05:53:30
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Rights of a Word instance
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01500344
Message ID:
01500344
Vues:
124
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?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform