Working with Excel in Powershell triggers Outlook to open - by JesseG7134

Status : 

 


5
0
Sign in
to vote
ID 841516 Comments
Status Active Workarounds
Type Bug Repros 2
Opened 3/26/2014 8:49:29 PM
Access Restriction Public

Description

For example, the following code triggers the Outlook Startup Wizard to appear:
$excel = New-Object -ComObject excel.application
$workbook = $excel.workbooks.Open("C:\Users\example\Documents\someexcelfile.xls")
$worksheets = $workbook.Worksheets
$worksheets[0]

Also, please note the following links which report the same problem:
http://stackoverflow.com/questions/19703380/powershell-com-object-excel-opens-outlook
http://social.technet.microsoft.com/Forums/scriptcenter/en-US/5ec05dd7-983a-4457-88fa-09c2ea42701a/adding-a-workbook-to-excel-with-powershell-is-trying-to-open-outlook?forum=ITCG
Sign in to post a comment.