Hi There
I am trying to port a macro from windows to mac vba.
The macro opens an excel workbook, opens a ppt template, and copies values from one to the other.
Both files are opened successfully by file dialog prompt.
However, when the (excel) script tries to interact with the (open) powerpoint file, the excel script just dies:
//this script is run in excel workbook
Sub TestPpt() 'Step 1: Declare your variables Dim DestinationPPT As String Dim PP As PowerPoint.Application Dim myPres As PowerPoint.Presentation Dim mySlide As PowerPoint.Slide Dim mySlides() As Variant Set PP = CreateObject("PowerPoint.Application") If PP Is Nothing Then Set PP = CreateObject(class:="PowerPoint.Application") DestinationPPT = "/Users/sysadministrator/Documents/End of Qstream Report/testpres.pptx" Set myPres = PP.Presentations.Open(DestinationPPT) Set myPres = PP.ActivePresentation //but dies on this line Set mySlide = myPres.Slides(1) mySlide.Shapes("insights_title").TextFrame.TextRange.Text = qsTitle End Sub
Does anyone know if cross-app interaction like this is possible on a mac?
Thanks!



Reply With Quote
