Expected end of sub error when I compile VBA code in powerpoint

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nwsllc
    New Member
    • Jul 2024
    • 1

    Expected end of sub error when I compile VBA code in powerpoint

    Sub CreateBradBlend RumColaPresenta tion()
    Dim pptApp As Object
    Dim pptPres As Object
    Dim slideIndex As Integer
    Dim slide As Object
    Dim shape As Object

    ' Initialize PowerPoint application
    Set pptApp = CreateObject("P owerPoint.Appli cation")
    pptApp.Visible = True
    Set pptPres = pptApp.Presenta tions.Add

    ' Slide 1: Title Slide
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 1)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Brand Overview"
    slide.Shapes(2) .TextFrame.Text Range.Text = "Brad’s Blend Rum Cola"

    ' Slide 2: Brand Story and Inspiration
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Brand Story and Inspiration"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Origin and inspiration behind Brad’s Blend Rum Cola" & vbCrLf & "• The story of Brad and the vision for the brand"

    ' Slide 3: Brand Mission and Values
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Brand Mission and Values"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Brand mission and core values" & vbCrLf & "• Commitment to quality and customer satisfaction"

    ' Slide 4: Product Line
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 1)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Product Line"

    ' Slide 5: Product Description
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Product Description"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Detailed description of Brad’s Blend Rum Cola" & vbCrLf & "• Key ingredients and formulation"

    ' Slide 6: Packaging
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Packaging"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Packaging design and options (e.g., can sizes, multipacks)" & vbCrLf & "• Visuals of the product packaging"

    ' Slide 7: Market Analysis
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 1)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Market Analysis"

    ' Slide 8: RTD Market Trends
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "RTD Market Trends"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Overview of the Ready-to-Drink (RTD) market" & vbCrLf & "• Growth projections and consumer trends in the RTD segment"

    ' Slide 9: Rum Cola Category Insights
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Rum Cola Category Insights"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Specific trends and data related to Rum Cola beverages" & vbCrLf & "• Consumer preferences and demand for Rum Cola"

    ' Slide 10: Target Audience
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 1)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Target Audience"

    ' Slide 11: Demographic and Psychographic Profile
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Demographi c and Psychographic Profile"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Who are the primary consumers of Brad’s Blend Rum Cola?" & vbCrLf & "• Lifestyle, age group, and purchasing behavior"

    ' Slide 12: Consumer Insights
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Consumer Insights"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Key findings from consumer research" & vbCrLf & "• Motivations and preferences of the target audience"

    ' Slide 13: Product Differentiation
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 1)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Product Differentiation "

    ' Slide 14: Unique Selling Propositions (USPs)
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Unique Selling Propositions (USPs)"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• What sets Brad’s Blend Rum Cola apart from competitors?" & vbCrLf & "• Unique flavor profile and quality of ingredients"

    ' Slide 15: Brand Personality and Image
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Brand Personality and Image"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• The brand’s personality and how it resonates with consumers" & vbCrLf & "• Visual and emotional appeal of the brand"

    ' Slide 16: Sales and Distribution Strategy
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 1)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Sales and Distribution Strategy"

    ' Slide 17: Current Distribution Channels
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Current Distribution Channels"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Where is Brad’s Blend Rum Cola currently available?" & vbCrLf & "• Key sales figures and growth in these channels"

    ' Slide 18: Retailer Benefits
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Retailer Benefits"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• How will stocking Brad’s Blend Rum Cola benefit the retailer?" & vbCrLf & "• Expected sales velocity and profit margins"

    ' Slide 19: Pricing Strategy
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Pricing Strategy"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Wholesale and suggested retail pricing" & vbCrLf & "• Any promotional pricing or introductory offers"

    ' Slide 20: Marketing and Promotional Support
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 1)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Marketing and Promotional Support"

    ' Slide 21: Brand Marketing Plan
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Brand Marketing Plan"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Overview of marketing activities (digital, social media, influencer partnerships)" & vbCrLf & "• Notable campaigns or endorsements"

    ' Slide 22: Retailer-Specific Promotions
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Retailer-Specific Promotions"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Plans for in-store displays, sampling events, and other retail promotions"

    ' Slide 23: Point of Sale (POS) Materials
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
    slide.Shapes(1) .TextFrame.Text Range.Text = "Point of Sale (POS) Materials"
    slide.Shapes(2) .TextFrame.Text Range.Text = "• Description of available POS materials to support sales (shelf talkers, posters, etc.)"

    ' Slide 24: Conclusion
    slideIndex = slideIndex + 1
    Set slide = pptPres.Slides. Add(slideIndex, 2)
Working...