How can I restrict Auto_Open() macro on only one ppt document.
I created Auto_Open() macro in Presentation1.ppt to setup PointerArrow permanent - I saved document as ppt, ppa, I used add-ins..) and it's OK
Sub Auto_Open()
Dim objApp As PowerPoint.Application
Dim objPres As PowerPoint.Presentation
Set objApp = New PowerPoint.Application
objApp.Visible = msoTrue
Set objPres = objApp.Presentations.Open("C:\Presentation1.ppt")
With objPres.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowWithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
objPres.SlideShowWindow.View.PointerType = ppSlideShowPointerArrow_
SlideShowWindows(Index:=1).View.PointerType = ppSlideShowPointerArrow
End With
End Sub
But, when I start any OTHER DOCUMENT (Presentation2.ppt), Auto_Open() macro is executing again and start Presentation1.ppt. How can I restrict this macro to only Presentation1.ppt document? Tnx.
I created Auto_Open() macro in Presentation1.ppt to setup PointerArrow permanent - I saved document as ppt, ppa, I used add-ins..) and it's OK
Sub Auto_Open()
Dim objApp As PowerPoint.Application
Dim objPres As PowerPoint.Presentation
Set objApp = New PowerPoint.Application
objApp.Visible = msoTrue
Set objPres = objApp.Presentations.Open("C:\Presentation1.ppt")
With objPres.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowWithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
objPres.SlideShowWindow.View.PointerType = ppSlideShowPointerArrow_
SlideShowWindows(Index:=1).View.PointerType = ppSlideShowPointerArrow
End With
End Sub
But, when I start any OTHER DOCUMENT (Presentation2.ppt), Auto_Open() macro is executing again and start Presentation1.ppt. How can I restrict this macro to only Presentation1.ppt document? Tnx.