我正在尝试将许多ppt幻灯片(来自同一个ppt)复制到现有的发布者文档中。我一直试图将代码拼凑在一起,但由于缺乏经验,我无法弄明白。
我最好只想复制每张ppt幻灯片上的形状,并且如果对ppt进行了任何更改,则能够更新发布者文档。复杂的是,有什么方法可以在将所有幻灯片复制到发布者文档中时将其放在行和列中?
这是我到目前为止所做的。
Sub PPTSlidesToPublisher()
'Copy/Paste Power Point slides Into an existing Publisher document
'Copy Range from PPT
Set rng = ActivePresentation.Slides.Range
Dim appPub As New Publisher.Application
appPub.Open FileName:="filename.pub", _
ReadOnly:=False, AddToRecentFiles:=False, _
SaveChanges:=pbPromptToSaveChanges
appPub.ActiveWindow.Visible = True
Dim myDocument As Object
Dim myPage As Object
Dim myShape As Object
'Add a page to the Documenet
Dim shpSlide As Shape
Set rng = OLEObject
Set shpSlide = ActiveDocument.Pages(3).Shapes.AddOLEObject _
(Left:=2, Top:=5, ClassName:="Publisher.Application")
shpSlide.OLEFormat.Activate
End Sub