This is a short preview of a Knowledge Base article. The full article is available to logged-in Continuous Community members.
Summary
Explains why a script that automates Microsoft Office, such as an Excel macro or PowerShell script that saves a workbook, can fail with a COM exception when it runs under a system account through OpCon. The cause is that Office expects a Desktop folder in the system profile, and the article describes the folders to create so the command works.
Applies to
OpCon Windows jobs ยท PowerShell scripts automating Excel and other Office products
Topics covered
- Recognizing the "Unable to get the SaveAs property of the Workbook class" error
- Why Office fails when started by a system user
- Creating the missing Desktop folders for 32-bit and 64-bit processes
Keywords
Excel automation, Office automation, Unable to get the SaveAs property of the Workbook class, COMException, PowerShell, SaveAs, systemprofile, Desktop folder, SysWOW64, MSLSAM, Windows job
