如何刷新幻灯片中的活动幻灯片? [英] How to refresh the active Slide in a slide show?

查看:120
本文介绍了如何刷新幻灯片中的活动幻灯片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于我的最后一个问题我得到了正确的代码更改形状的图像.
不幸的是,这不会更新活动的演示文稿.如果我关闭演示文稿并重新启动它,图像会更改,但更改应该直接可见.

Based on my last question I got the right code to change the image of an shape.
Unfortunatly, this does not update the active Presentation. If I close the presentation and restart it, the image is changed, but the change should be directly visible.

这是我更改图像的代码:

This is my code to change the image:

ActivePresentation.SlideShowWindow.View.Slide.Shapes("SolutionA_Image").Fill.UserPicture ("D:\User\SolutionWrong.jpg")

我找到了更新演示文稿的方法,但这会使演示文稿闪烁.

I found a way to update the presentation, but this lets the presentation flicker.

ActivePresentation.SlideShowWindow.Height = ActivePresentation.SlideShowWindow.Height - 1
ActivePresentation.SlideShowWindow.Height = ActivePresentation.SlideShowWindow.Height + 1

编辑
我尝试按照建议刷新幻灯片 这里,但这对我不起作用.

Dim lSlideIndex As Long
lSlideIndex = SlideShowWindows(1).View.CurrentShowPosition
SlideShowWindows(1).View.GotoSlide lSlideIndex

编辑 2
我上传了我的文件:下载

推荐答案

最后我在 这篇博文.这似乎是 PowerPoint 2007 中的一个错误.

In the end I found my answer in this blog post. It appears to be a bug in PowerPoint 2007.

此代码有助于修复错误:

This code helps to fix the bug:

Dim osld As Slide
'get current slide
Set osld = ActivePresentation.SlideShowWindow.View.Slide
'the next line adds the empty textbox and refreshs the slide
osld.Shapes.AddTextbox msoTextOrientationHorizontal, 1, 1, 1, 1

这篇关于如何刷新幻灯片中的活动幻灯片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆