Sub
sheet1()
Dim
pptPres
As
Presentation
Dim
strPfad
As
String
Dim
strPPTX
As
String
Dim
pptApp
As
Object
strPfad = "C:\Users\DE116832\Desktop\"
strPPTX =
"test.pptx"
pptVorLage = strPfad & strPPTX
Set
pptApp =
New
PowerPoint.Application
pptApp.Presentations.Open Filename:=pptVorLage, untitled:=msoTrue
Set
pptPres = pptApp.ActivePresentation
pptPres.Slides(1).
Select
With
pptPres.Slides(2).Shapes(
"text1"
).TextFrame.TextRange
Call
Range(
"text1"
).Copy
Call
.Paste
If
Range(
"text1"
).Font.Size
Then
.Font.Size = Range(
"size1"
)
End
If
End
With
With
pptPres.Slides(2).Shapes(
"text2"
).TextFrame.TextRange
Call
Range(
"text2"
).Copy
Call
.Paste
If
Range(
"text2"
).Font.Size
Then
.Font.Size = Range(
"size2"
)
End
If
End
With
pptPres.SaveAs strPfad & Range(
"text1"
) &
".pptx"
pptPres.Close
pptApp.Quit
Set
pptPres =
Nothing
Set
pptApp =
Nothing
End
Sub