Jump to content
Fórum Script Brasil
  • 0

Macro no Excel que trabalha com a macro no Power Point


erlancls
 Share

Question

Prezados, Boa Tarde!


Preciso de uma ajuda para se comunicar Macro Excel com Power Point, no arquivo em anexo detalho minha dúvida.

Resumindo essa macro roda legal, mas só que o arquivo do power point abre em modo de apresentação só no slide 3. gostaria que no excel na célula G8 o valor que tivesse nessa célula abrisse o slide.

MACRO NO EXCEL.
O procedimento Sub a seguir pressupõe que a apresentação PPTAutomation.ppt contém uma macro chamada "AutomationTest".

Sub PPTTest()
Dim PPT as Object

Set PPT = CreateObject("PowerPoint.Application")

PPT.Presentations.Open "C:\My Documents\PPTAutomation.ppt", , ,False

' Note that the file name and the module
' name are required to path the macro correctly.
PPT.Run "PPTAutomation.ppt!Module1.AutomationTest"

End Sub


MACRO NO POWER POINT

Sub AutomationTest()
With ActivePresentation.SlideShowSettings.Run.View
End With
Call gotoSlide
End Sub


Sub gotoSlide()
Application.SlideShowWindows(1).View.gotoSlide Index:=3
End Sub

Slide1.JPG

Slide2.JPG

Slide3.JPG

Slide3.JPG

Slide4.JPG

Slide5.JPG

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.2k
×
×
  • Create New...