I have the following bit of code repeated lots of times in my code to make powerpoint slides based on each field of a query with only one line changing each time. Any ideas how I can condense it because my code is too big?
I was thinking of using other sub's with call commands???
Code:
With .Slides.Add(rs.AbsolutePosition + 1, ppLayoutLargeObject)
.FollowMasterBackground = False
.Background.Fill.Solid
.Background.Fill.ForeColor.RGB = RGB(0, 0, 0)
With .Shapes(1).TextFrame.TextRange
'--------------------The line below is the only one that changes each time
.Text = CStr(rs.Fields("Song 1 chosen_Verse 1").Value)
.Characters.Font.Color.RGB = RGB(255, 255, 255)
.Characters.Font.Size = 36
.ParagraphFormat.Bullet = False
.ParagraphFormat.Alignment = ppAlignCenter
End With
End With
I was thinking of using other sub's with call commands???