Thema Datum  Von Nutzer Rating
Antwort
Rot Adding a Picture from a folder via url from an Excelsheet to A Powerpoint Presentation
15.11.2013 00:45:07 Jones
Solved
15.11.2013 00:53:49 Jones
NotSolved

Ansicht des Beitrags:
Von:
Jones
Datum:
15.11.2013 00:45:07
Views:
1375
Rating: Antwort:
 Nein
Thema:
Adding a Picture from a folder via url from an Excelsheet to A Powerpoint Presentation

Hi,

I'm absolutely lost with vba in Excel to generate a Powerpoint Presentation.

So far I easily managed to generate the presentation and fill "Text Placeholders" wiht Text, but I#M failing with Pictures. The main part of my code looks like this:

For x = 1 To NumberOfPages
    Set currentSlide = myPPT.Slides(x)
    
    With currentSlide
        .Shapes(1).TextFrame.TextRange.Text = Cells(x + 1, 2).Text & ", " & Cells(x + 1, 3).Text
        .Shapes(3).TextFrame.TextRange.Text = Cells(x + 1, 4).Text
        .Shapes(4).TextFrame.TextRange.Text = Cells(x + 1, 10).Text
        .Shapes(5).TextFrame.TextRange.Text = Cells(x + 1, 11).Text
        'the image!!
        .Shapes(2).AddPicture ........        
    End With
 Next

the last Shape is a "Picture Placeholder" and I tryed to add a Picture manually by

.Shapes(2).AddPicture(FileName:="C:\Program Files\Microsoft Office\" _  
            & "Office\Bitmaps\Styles\stone.bmp", _
        LinkToFile:=True, SaveWithDocument:=True)

I also tryed a Picture Object and searched for Propertys of the Placeholder to change the url or something like that.

 

The goal is to load a pictures into every Slide (therefore the Placeholder 2 in the template). The File names and extentions are stored in the Excel Sheet in Cells(x +1, 13)

 

Please help me with that, because I totaly get lost, writing PowerPoint vba in Excel Macros.

Thanks


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
Rot Adding a Picture from a folder via url from an Excelsheet to A Powerpoint Presentation
15.11.2013 00:45:07 Jones
Solved
15.11.2013 00:53:49 Jones
NotSolved