I've written an application to watch a folder, and whenever a PowerPoint document is dropped into it, it goes through the slides within it and generates png images of each slide. This works fine in a windows forms application but I've put exactly the same code in a windows service, used the same test file and it fails to open it with the following error:
Error: PowerPoint could not open the file. at Microsoft.Office.Interop.PowerPoint.Presentations.Open(String FileName, MsoTriState ReadOnly, MsoTriState Untitled, MsoTriState WithWindow) -2147467259 Com Error
I've set the service to run with my own user account (with Administrator privileges) so I think that would rule out permissions problems but I can't think of anything else to try.
Any suggestions?