![]() |
![]() Create Text Over Video and Closed Captioning "I can't believe you guys are giving away all the code for this! I think its great you want to help others." Pauo Chen |
| A Method to Place Text Over Video in PowerPoint | |
![]() I am often asked if there is a way to place text over video and until recently I have said no, not without one of the third party add ins available on the market. However, you can do it with a small PowerPoint macro. The key to doing this is to use a textbox control to hold the text. (Not PowerPoint textboxes.) What is a Control? A control is often referred to as an "ActiveX" control. For most purposes you can think of it as a really small program that other programs can use. It has its own set of "properties" that you can edit and set manually or with a minimal amount of program code. (Don't panic, it's not as hard as you think.) In PowerPoint, adding a control to your slide could not be easier. If your Control Toolbox is not visible, click View > Toolbars, and "check" the box for "Control Toolbox". This is a screen shot of a single slide presentation I put together to demonstrate how to use a set of controls and manipulate the text and background color with very, little programming. From the control toolbox I inserted a "Label" on top of a video and 4 buttons. Each button places different text over the video during the presentation. That's it for the slide, now for just a tiny bit of code. As you can see we have provided a few lines of code for each "Button" that runs when it's clicked. Remarks are in green and are there for explanation only, they have nothing to do with the actual program.
Private Sub Text1_Click()
'Clicking the "Text 1" button executes the next
line of code. That's it! With this bit of "code" you are able to alter the text displayed as well at it's color and background color. But what if I don't want buttons? What if I want the text to "animate"? What if I want to use text contained in a file? All of these are possible by expanding upon the programming code and we invite users to experiment. However, teaching how to write code in Visual Basic is beyond the scope of this tutorial. We simply wanted to demonstrate that it can be done and give users a small program sample as a starting point. You may download this example to experiment with it.
Expand this Concept to Create Closed Captioning Creating and using Closed Captioning is a two step process or system. The reason we broke it into two discreet components is so you may distribute a presentation with closed captioning without the need to include the creation tools of the add-in. (Keeps the file size down and simplifies it for the recipients.) We begin by first inserting the video on the slide and then add a "Label" from the controls toolbox and place it on top of the video. This label will display our text kept in a standard *.txt file that must be distributed with the presentation. Next we create the text file, populate it with our text, and set timings for when the text will be displayed. This is accomplished with the Closed Captioning add-in that you may download here. It is important to understand this add-in does not need to accompany the presentation when it is distributed, only the PC creating the captioning requires the add-in. However, there is a small macro that must be included as part of the presentation to support the closed captioning features. (See Below)
You may also change the color of the text as well as the background of the label to improve visibility as needed or desired. We also display the last six lines of text entered to make it simpler to keep track of where you are at in the creation process. Timing of when a line of test is displayed is set when you click the "Save Text & Settings" button. This is everything needed to create the closed captioning file. As noted above, a small macro is required in order for the closed caption to function. It's roll is to read the text from the file created for the captioning and display it in the Label (placed on top of the video previously) at the appropriate time.
We believe that helping those with a hearing disadvantage is something that should be done simply because it is the right thing to do. For this reason we are giving this system away freely and without limitations in how it may be used. Further, it is our hope others will take this example an improve upon it so we will give anyone that wants it the entire source code for the system. If you would like to work directly with the source code simply drop us an Email and we will gladly forward it to you. (Contact Page) |
|