0

看到powershell有一个奇怪的问题,代码如下:

[Reflection.Assembly]::LoadWithPartialname("Microsoft.Office.Interop.PowerPoint")
$ppt = New-Object Microsoft.Office.Interop.PowerPoint.ApplicationClass
Register-ObjectEvent -InputObject $ppt -EventName "PresentationBeforeSave" -SourceIdentifier "LBPPTBeforeSave" -Action { Write-Host "here" }

我迷上PresentationBeforeSave了 PowerPoint。这很好,但是当我在 Powerpoint 中点击保存时,ISE 完全崩溃了。在事件查看器中,我看到了不好的东西、退出代码801315060xc0000005.

SlideSelectionChanged不过,我可以很好地钩住。所以我想知道这是否与暴露的Cancelout 变量有关?PresentationBeforeSave任何意见,将不胜感激。

4

0 回答 0