Microsoft Office Tutorials and References
In Depth Information
Creating a New Presentation
'Use the current presentation as this object¶
Set oPres = ActivePresentation¶
For Each oSld In oPres.Slides¶
For Each oShp In oSld.Shapes¶
'Check if it has a text frame¶
If oShp.HasTextFrame Then¶
'If there is a text frame, then check if the replacement _¶
string is there and replace it until there are no more _¶
instances of it.¶
'While...Wend loops allow the program to loop while the statement¶
'is acurate, in this case, while there is a replacement string¶
'in the text frame¶
While InStr(1, oShp.TextFrame.TextRange.Text, strReplace)¶
'Use the oShp object (in this case it is assigned to each shape _¶
on each slide one after another) and replace the targeted
replacement _¶
text with the text from the textbox on the first slide.¶
oShp.TextFrame.TextRange.Replace strReplace, TextBox1.Text¶
Wend¶
'Close the If statement¶
End If¶
'Progress to the next shape on the slide¶
Next oShp¶
'Progress to the next slide¶
Next oSld¶
'Reset variables and free memory¶
Set oPres = Nothing¶
Set oSld = Nothing¶
Set oShp = Nothing¶
'Clear the text box¶
Slide1.TextBox1.Text = ""¶
'Advance the presentation¶
SlideShowWindows(1).View.GotoSlide 2¶
End Sub¶
Pwr
Creating a New Presentation
Follow these steps:
On slide 1
1. Open the command toolbox (if it is not already open) by
selecting View on the pull down menu and then selecting
Toolbars. Select Command Toolbox from the list.
2. Insert an object from the command toolbox called a text box.
This will automatically be named TextBox1.
Place this text box object where it should appear on the slide.
Please note that this text box is a command text box and so is
 
Search JabSto ::




Custom Search