vba power point点击更改图像边框颜色 [英] vba power point changing image border color on click

查看:850
本文介绍了vba power point点击更改图像边框颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Power Point为更好的孩子做一个教育互动演示,我正在尝试做一种测试/活动,孩子们必须根据问题点击一些图片。有些是正确的,有些则不对。 (例如:你能指出消防员使用的工具吗?并显示4个不同工具的图像)
使用mousemove事件,我可以重现一个说出对象名称的声音,并使用click事件我可以再现另一种声音来告诉孩子错误或正确。
现在,我想更改他们点击的图片的边框(颜色和/或宽度),但我不知道如何在VBA中进行操作。
一定很容易,但我不知道sintax :-(
有什么帮助吗?请?
谢谢!

I'm trying to make an educational interactive presentation for kinder children using Power Point, and I'm trying to do a kind of test/activity in which the children have to click on some pictures according to the question. Some will be right, some don't. (for instance: can you point the tools used by a fireman? and show 4 images of different tools) Using the mousemove event, I can reproduce a sound that says the name of the object, and using the click event I can reproduce another sound to tell the children "wrong" or "right". Now, I would like to change the border of the picture they are clicking on (color and or width), but I have no clue how to do it in VBA. It must be very easy, but I don't know the sintax :-( Any help? Please? Thank you!

推荐答案

你会感到惊讶,但这并不像你期望的那么容易,当然,在聪明地学习课程和活动时。

You would be surprised but it's not so easy as you expected, of course, when doing smartly with classes and events.

我会给你一个简单的想法,所以如果你有时间并且真的需要它,你就可以这样做。但是会有一些问题 - 你必须弄清楚你怎么能开始形状的边界。

I'll give you simple idea, so if you have time and really need it you could go this way. But there would be some problems- you will have to figure out how could you get starting borders of your shapes.

这是想法如何开始。


  1. 将每个形状命名为滑动选择一个并在VBA编辑器的立即窗口中运行以下指令,例如:

  1. name each of the shape on the slide- select one and run the following instruction in Immediate window in VBA editor, eg.:

ActiveWindow.Selection.ShapeRange.Name = "Fireman"


  • 更改每个形状的颜色和线写宏(这个将仅在幻灯片视图中运行):

  • to change the color and line write macro for each shape (this will run only in slideshow view):

    Sub FiremanClick()
    
    With SlideShowWindows(1).View.Slide.Shapes("Fireman").Line
        .Weight = 2
        .ForeColor.RGB = RGB(255, 0, 0)
    End With
    
    
    End Sub
    


  • 在应用程序中右键单击消防员形状并将动作与您编写的宏相关联。

  • in application right-click fireman shape and associate action with macro you wrote.

    您需要弄清楚如何设置每个形状的标准设置以及何时。

    you will need to figure out how to set back standard setting of each shape and when.

    这篇关于vba power point点击更改图像边框颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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