我已实现以下VBA代码以将PDF文件插入幻灯片中。
Sub PopAPDF()
Dim oSh As Shape
Dim oSl As Slide
Dim sFileName As String
sFileName = "PDF_File1.pdf"
Set oSl = ActivePresentation.Slides(1) ' or whatever you want
' Assuming it's a letter-sized/portrait PDF:
Set oSh = oSl.Shapes.AddOLEObject(Left:=0, _
Top:=0, _
Width:=8.5 * 72, _
Height:=11# * 72, _
FileName:=sFileName, _
Link:=msoFalse)
sFileName = "PDF_File2.pdf"
Set oSl = ActivePresentation.Slides(1) ' or whatever you want
' Assuming it's a letter-sized/portrait PDF:
Set oSh = oSl.Shapes.AddOLEObject(Left:=0, _
Top:=0, _
Width:=8.5 * 72, _
Height:=11# * 72, _
FileName:=sFileName, _
Link:=msoFalse)
sFileName = "PDF_File3.pdf"
Set oSl = ActivePresentation.Slides(1) ' or whatever you want
' Assuming it's a letter-sized/portrait PDF:
Set oSh = oSl.Shapes.AddOLEObject(Left:=0, _
Top:=0, _
Width:=8.5 * 72, _
Height:=11# * 72, _
FileName:=sFileName, _
Link:=msoFalse)
End Sub
我需要附加此代码来执行以下操作:
是否可以使用宏来完成它们?