TPE
![]() |
![]() |
![]() |
|
|
Tavvafi@gmail.com |
|||
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
دراین روش:
- ابتدا تکه برنامه های زیر را به VBAی پاورپوینت اضافه می کنیم
- سپس یک ActionButton از نوع Next به اسلاید اضافه می کنیم
- با استفاده از پنجره Action Settings، رویداد Action onClick را بر روی Run Macro تنظیم می کنیم.
- و ماکروی GoToNextSlide را به آن متصل می کنیم.
به این ترتیب نمایش پرزنتیشن، ضمن اجرای کد مورد نظر به اسلاید بعد نیز هدایت خواهد شد.
Sub GoToNextSlide()
' Instead of a normal Next Slide action button
' have your Next Slide action = Run Macro and have it
' run this instead.
'
' This runs any additional code you like and then
' goes to the next slide
' add whatever code you like here or better yet,
' put it in a separate subroutine and call it from here
' for example:
Call ExampleCode
With ActivePresentation.SlideShowWindow
.View.GotoSlide (ActivePresentation.SlideShowWindow.View.Slide.SlideIndex + 1)
End With
' or add code here, after you've moved to the next slide
Call ExampleCode
End Sub
Sub ExampleCode()
MsgBox ActivePresentation.SlideShowWindow.View.Slide.SlideIndex
End Sub



































