i using vsto powerpoint api automate creation of powerpoint files. have found using basic call create powerpoint file web application on windows 7 system causes out of memory error (other vsto calls manipulate open file fail):
powerpoint.presentation presentation = _pppresentations.add(office.msotristate.msotrue); string outputdirectory= getoutputdirectory(); presentation.saveas(outputdirectory+ "\\createslidetestoutput.pptx", powerpoint.ppsaveasfiletype.ppsaveasdefault, office.msotristate.msotrue);
the error receive "insufficient memory" @ whatever vsto api call being made manipulate file (for instance, saving or adding slide powerpoint).
however, found if run same code in unit test, or user executable (.exe), have no problems adding content, manipulating , saving powerpoint files.
but then, when tried create windows service automate same code used in user executable, receiving insufficient memory error again. can set breakpoint in service , see failing on exact same vsto api calls failed when called web application.
does have explanation why user executable thread can execute vsto api calls without issue ever (and no observable jump in memory) whereas app pool thread, or windows service thread runs insufficient memory errors?
http://support.microsoft.com/kb/257757
automating office documents (with interop .dlls) without user context isn't "stability" supported ms. advise use solution openxml sdk:
http://www.microsoft.com/en-us/download/details.aspx?id=5124
Comments
Post a Comment