前面既然可以打开 piw文件,现在要打开pdi文件也就不是难事了
对象换成pdi
Private Sub CommandButton2_Click()
Set appX = GetObject(, "piprocessbook.application.2")
If appX Is Nothing Then
Set appX = CreateObject("piprocessbook.application.2")
End If
AppActivate ("PI ProcessBook")
Set disY = appX.ProcBooks.Open("E:\test.pdi")
End Sub