Hello,
I use following code in Windows, works perfectly fine. But when I try to run this code in MAC OS , I get error on this line:
I use following code in Windows, works perfectly fine. But when I try to run this code in MAC OS , I get error on this line:
VBA Code:
Set pPres = pptApp.Presentations.Open(currentPath & Application.PathSeparator & pptname, msoFalse, msoCTrue, msoCTrue)
Code:
Dim pptApp As Object
Dim pPres As Object
Dim xl As Excel.Workbooks
Dim ws As Worksheet
Dim sldrange As Object
Dim sld As Object
Dim pattrenSlide As Object
Dim WorkSheetRange As Range
Sub Export()
'both file names and path
Dim wkname, pptname, currentPath As String
'Other Values
pptname = "Template.pptx"
currentPath = ThisWorkbook.Path
'Ópening Powerpoint
Set ppApp = CreateObject("Powerpoint.Application")
Set pPres = ppApp.Presentations.Open(currentPath & Application.PathSeparator & pptname, msoFalse, msoCTrue, msoCTrue)
'Opening Excel
Set wk = ThisWorkbook