使用 vba 在 powerpoint 中导入 SVG
Importing SVG in powerpoint with vba
我正在尝试在下面给定的脚本的帮助下在我的演示文稿中导入 SVG 文件,但它是在所有幻灯片中导入,而不是仅在活动幻灯片中导入。
Sub InsertLogoOnEveryPage()
Dim Sld As Slide
Dim Shp As Shape
Dim sFontName As String
Dim oTop As Single
' font:
sFontName = "Times"
For Each Sld In ActivePresentation.Slides
Debug.Print Sld.Name
'Insert logo.
Sld.Shapes.AddPicture FileName:="C:\G-Tools\logo\GEP LOGO 2017-01.svg", _
LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, Left:=357, Top:=240
Next Sld
End Sub
谁能帮我解决这个问题。
提前致谢。
变化:
For Each Sld In ActivePresentation.Slides
至:
Set Sld = Application.ActiveWindow.View.Slide
并删除接近末尾的 Next Sld 语句。
我正在尝试在下面给定的脚本的帮助下在我的演示文稿中导入 SVG 文件,但它是在所有幻灯片中导入,而不是仅在活动幻灯片中导入。
Sub InsertLogoOnEveryPage()
Dim Sld As Slide
Dim Shp As Shape
Dim sFontName As String
Dim oTop As Single
' font:
sFontName = "Times"
For Each Sld In ActivePresentation.Slides
Debug.Print Sld.Name
'Insert logo.
Sld.Shapes.AddPicture FileName:="C:\G-Tools\logo\GEP LOGO 2017-01.svg", _
LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, Left:=357, Top:=240
Next Sld
End Sub
谁能帮我解决这个问题。
提前致谢。
变化:
For Each Sld In ActivePresentation.Slides
至:
Set Sld = Application.ActiveWindow.View.Slide
并删除接近末尾的 Next Sld 语句。