shreyasfifa
New Member
- Joined
- Aug 9, 2016
- Messages
- 2
Hello All,
I have Powershell script that calls an Excel VBA script and saves the file. I'm running into an issue while saving the workbook as I get a dialog box "Would you like to merge your changes with the latest updates on the Server?" and PS waits for user confirmation. How do I suppress this notification? I have enabled displayAlerts = $false but that doesn't seems to be working
The file sits on a shared onedrive folder location which is prompting Excel to ask this question
$file="test - Copy v4.xlsm"
$x1 = New-Object -ComObject "Excel.Application"
$x1.displayAlerts = $false # don't prompt the user
$x1.Visible = $false
$wb = $x1.workbooks.Open($file)
$x1.Run('MACRO_NAME')
$wb.Save()
$wb.Close()
$x1.Quit()
Remove-Variable wb,x1
I have Powershell script that calls an Excel VBA script and saves the file. I'm running into an issue while saving the workbook as I get a dialog box "Would you like to merge your changes with the latest updates on the Server?" and PS waits for user confirmation. How do I suppress this notification? I have enabled displayAlerts = $false but that doesn't seems to be working
The file sits on a shared onedrive folder location which is prompting Excel to ask this question
$file="test - Copy v4.xlsm"
$x1 = New-Object -ComObject "Excel.Application"
$x1.displayAlerts = $false # don't prompt the user
$x1.Visible = $false
$wb = $x1.workbooks.Open($file)
$x1.Run('MACRO_NAME')
$wb.Save()
$wb.Close()
$x1.Quit()
Remove-Variable wb,x1