windows - How can Word 2013 be automated from a C# Interop/COM program using Task Scheduler with a user logged on and the desktop locked? -
i have inherited c# program used automate creation of daily report on windows xp pro sp3 using pdfcreator 1.2.3, mapinfo professional 11, word 2003, , excel 2003. win xp machine in active directory domain , c# program ran domain user (with administrative permissions) user logged in , desktop locked. word 2003 automated open template, create document template, , save document--all from/on network share. excel 2003 used open spreadsheet table linked odbc datasource , refresh table, pulling new data spreadsheet. mapinfo used generate map images odbc datasource. pdfcreator used take spreadsheet, word document, , images , put them daily report.
as xp has reached end-of-life have moved program win 8.1 ee virtual machine (in same domain) , have installed office 365 products (word 2013 , excel 2013) along pdfcreator 1.7.1 , mapinfo professional 12 use in automating creation of daily report. program works when run manually on new vm, fails when run same user scheduled task. scheduled task set run highest permissions , run if user not logged in.
i realize there many variables @ play here; o/s had change , don't use old version of office anymore, couldn't older versions of pdfcreator or mapinfo. therefore, focus question on things can control. aware of the problems face in doing not clear on whether or not possible given new o/s , applications (namely word 2013 , excel 2013) have been asked try make work with.
so, question is: how can word 2013 automated c# interop/com program using task scheduler run program user logged on , desktop locked?
from microsoft docs - considerations server-side automation of office:
all current versions of microsoft office designed, tested, , configured run end-user products on client workstation. assume interactive desktop , user profile. not provide level of reentrancy or security necessary meet needs of server-side components designed run unattended.
microsoft not recommend, , not support, automation of microsoft office applications unattended, non-interactive client application or component (including asp, asp.net, dcom, , nt services), because office may exhibit unstable behavior and/or deadlock when office run in environment.
i know doesn't answer question office 365, think close going get. found article: howto: configure office applications run under interactive user account.
Comments
Post a Comment