Share this Page URL
Help

Chapter 17. Using Visual Basic to Manage... > Using Visual Basic to Work with Data... - Pg. 604

Using Visual Basic to Manage Data With objSlide.Shapes.Placeholders(2) .TextFrame.TextRange.Text = _ Me.Country_Label.Caption & ": " & Me.Country & Chr(13) & _ Me.CampaignBudget_Label.Caption & ": $" & Me.CampaignBudget & _ Chr(13) & _ Me.LaunchDate_Label.Caption & ": " & Me.LaunchDate & Chr(13) & _ Me.EndDate_Label.Caption & ": " & Me.EndDate & Chr(13) & _ Me.EmployeeID_Label.Caption & ": " & Me.EmployeeID End With 604 7. This group of lines will display a bulleted list on the first slide in the presentation. The code again uses the Slide object's Shapes collection, referring to a second placeholder shape on the slide. (In this example, the placeholder is the area of the slide that reads Click to add text.) Using the TextFrame and TextRange objects, the list is created by concatenating a control's label, a colon, the control's value, and the carriage return character, which places each list item on a separate line. After End With , enter these lines of code. Most of this code is similar to the code we've entered and shown above. Set objSlide = objPP.Slides.Add(2, ppLayoutText) objSlide.FollowMasterBackground = msoFalse With objSlide.Background.Fill .Visible = msoTrue .ForeColor.rgb = rgb(0, 255, 255) End With With objSlide.Shapes.Title.TextFrame.TextRange .Text = "Campaign Country: " & Me.Country .Font.Color.rgb = rgb(0, 0, 0) .Font.Bold = True .Font.Size = 32