Microsoft Office Tutorials and References
In Depth Information
Personalizing a Presentation
Figure 77 – Customized Presentation
View the Appendix to learn how to store this procedure
in a Slide module.
Option Explicit¶
' * * * * *¶
Private Sub CommandButton1_Click()¶
'Variable declaration¶
Dim strReplace As String¶
'This is the string that the macro will look for _¶
and replace with the name from the text box on slide 1¶
strReplace = "<<NAME>>"¶
'Check that there is something in the textbox¶
If TextBox1.Text = "" Then¶
'If there isn't, then tell the user what to do¶
MsgBox "Please enter your name in the box"¶
'End the sub routine until they do it¶
Exit Sub¶
'If there is text in the textbox (Textbox1.Text = "" is not true) _¶
then this code will execute¶
Else¶
'Tell the user what will happen¶
MsgBox "The macro will now replace all instances of " & _¶
strReplace & ", with " & TextBox1.Text¶
'Close the If statement¶
End If¶
'Variable declaration¶
Dim oPres As Presentation¶
Dim oSld As Slide¶
Dim oShp As Shape¶
Pwr
Search JabSto ::




Custom Search