我正在尝试从PowerPoint运行一些PowerShell宏。我已经非常擅长在Powershell中运行Excel宏。我总是会犯这样的错误:type must not be ByRef代码:Add-type -AssemblyName office
$PowerPoint = New-Object -comobject Pow
在下面的代码片段中,使用win32com.client和Application.Presentations.Open(ppt1, ReadOnly=0)将打开并激活powerpoint演示文稿。使用Application.Presentations.Open(ppt2, ReadOnly=0)将打开并激活另一个powerpoint演示文稿。# The following requires two existing presentations
# ppt1.pptx and ppt2.pptx in a directory named C:\
但是,我想使用一个相对路径来运行它,但是它会抛出以下错误Dim PowerPointApp As PowerPoint.ApplicationDim myPresentation As PowerPoint.PresentationDim myShapeRange As PowerPoint.ShapeDim Template As String
&