我使用相同的流程打开了几个Powerpoint演示文稿,但是有多个实例:
Imports Microsoft.Office.Core
Imports Microsoft.Office.Interop
然后使用此代码:
Private Sub OpenSlideShow(FullPath As String)
Dim powerpointApp = New Microsoft.Office.Interop.PowerPoint.Application()
powerpointApp.Visible = MsoTriState.msoTrue
Dim presentaions = powerpointApp.Presentations
Dim myPresentation = presentaions.Open(FullPath, MsoTriState.msoTrue, MsoTriState.msoFalse,MsoTriState.msoFalse)
Dim slideShowSettings = myPresentation.SlideShowSettings
slideShowSettings.Run()
End Sub
我的问题: 当焦点打开但没有焦点时,如何将焦点设置到任何一个powerpoint演示文稿?
我尝试过AppActivate,但没有。我尝试过SetForegroundWindow,但似乎都没有用。
有没有人有线索?