Changing a picture from a shape

  • Hey,


    I've been trying to automatically generate slides by using shapes.


    For some reason it just partially works.
    I'll add more code than may be needed.



    ## This part works:
    'Change the name of the (technology, application) pair
    techappl = WS.Cells(i, 4).value & " for " & WS.Cells(i, 5).value
    tslide.Shapes("techName").TextFrame.TextRange.Text = techappl
    tslide.Shapes("techName").TextFrame.TextRange.Characters(Len(WS.Cells(i, 4).value) + 1, Len(techappl)).Characters.Font.Size = 20

    'Change the name of use case headline
    texto = WS.Cells(i, 7).value
    tslide.Shapes("useCases").TextFrame.TextRange.Text = texto

    'Change the "how" text
    texto = WS.Cells(i, 8).value
    tslide.Shapes("how").TextFrame.TextRange.Text = texto

    ##And this one doesn't. The picture doesn't change and I can't see why not?
    'change the main picture
    On Error Resume Next
    tslide.Shapes("tecNamePicture").Fill.UserPicture (ActivePresentation.Path & "\Images Tech App" & techappl & ".jpg")

  • Post by fahymi ().

    This post was deleted by rory: Spam ().