基于my last question我得到了正确的代码来更改形状的图像。
不幸的是,这不会更新活动的演示文稿。如果我关闭了演示文稿并重新启动,则图像会发生更改,但更改应直接显示。如何刷新幻灯片中的活动幻灯片?
这是我的代码来改变形象:
ActivePresentation.SlideShowWindow.View.Slide.Shapes("SolutionA_Image").Fill.UserPicture ("D:\User\SolutionWrong.jpg")
我找到了一种方法来更新演示文稿,但是这让演示闪烁。
ActivePresentation.SlideShowWindow.Height = ActivePresentation.SlideShowWindow.Height - 1
ActivePresentation.SlideShowWindow.Height = ActivePresentation.SlideShowWindow.Height + 1
编辑
我试图刷新幻灯片所提出here,但这并没有为我工作。
Dim lSlideIndex As Long
lSlideIndex = SlideShowWindows(1).View.CurrentShowPosition
SlideShowWindows(1).View.GotoSlide lSlideIndex
编辑2
我上传我的文件:Download
尝试改变'SlideShowWindows(1).View.GotoSlide lSlideIndex'到'SlideShowWindows(1).View.GotoSlide lSlideIndex,msoTrue' –
这不适用于 – Christopher
我只是测试了代码,它的工作原理。幻灯片放映过程中如何运行宏? –