Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
1504to1508
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Hyperlinks aus PPT-Datei in Excel anzeigen lassen

Hyperlinks aus PPT-Datei in Excel anzeigen lassen
25.07.2016 11:02:51
Flo
Hallo zusammen,
ich habe eine Powerpointdatei mit massenhaft Hyperlinks, von denen vermutlich einige fehlerhaft sind.
Gibt es die Möglichkeit, mir alle Hyperlinks in Excel auflisten zu lassen?
Oder gibt es eine noch viel einfachere Möglichkeit mir alle Hyperlinks in Powerpoint direct anzeigen zu lassen?
Vielen Dank im Voraus!

8
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Hyperlinks aus PPT-Datei in Excel anzeigen lassen
25.07.2016 11:43:28
Flo
Vielen Dank schonmal! Mit diesem Code lassen sich meine Hyperlinks schon anzeigen.

Sub ShowMeTheHyperlinks()
' Lists the slide number, shape name and address
' of each hyperlink
Dim oSl As Slide
Dim oHl As Hyperlink
For Each oSl In ActivePresentation.Slides
For Each oHl In oSl.Hyperlinks
If oHl.Type = msoHyperlinkShape Then
MsgBox "HYPERLINK IN SHAPE" _
& vbCrLf _
& "Slide: " & vbTab & oSl.SlideIndex _
& vbCrLf _
& "Shape: " & oHl.Parent.Parent.Name _
& vbCrLf _
& "Address:" & vbTab & oHl.Address _
& vbCrLf _
& "SubAddress:" & vbTab & oHl.SubAddress
Else
' it's text
MsgBox "HYPERLINK IN TEXT" _
& vbCrLf _
& "Slide: " & vbTab & oSl.SlideIndex _
& vbCrLf _
& "Shape: " & oHl.Parent.Parent.Parent.Parent.Name _
& vbCrLf _
& "Address:" & vbTab & oHl.Address _
& vbCrLf _
& "SubAddress:" & vbTab & oHl.SubAddress
End If
Next    ' hyperlink
Next    ' Slide
End Sub
Allerdings erhalte ich hier einige MsgBoxes - gibt es nun die Möglichkeit mir meine Ergebnisse auch in Excel in einer Tabelle anzeigen zu lassen?
Anzeige
AW: Hyperlinks aus PPT-Datei in Excel anzeigen lassen
25.07.2016 12:36:22
Michael
Hallo!
Mit diesem Code lassen sich meine Hyperlinks schon anzeigen.
Ja, ist klar; deswegen hab ich Dir auch den Link genannt ;-).
gibt es nun die Möglichkeit mir meine Ergebnisse auch in Excel in einer Tabelle anzeigen zu lassen?
Ja sicher, statt in einer Msg-Box kannst Du die Ergebnisse ja zB zunächst in einer Variablen sammeln und diese dann in eine Zelle schreiben; oder Du schreibst das schleifenweise in Zellen.
Allerdings kannst Du den Code, so wie er oben ist, nicht direkt aus Excel laufen lassen, da dieser ein PowerPoint-Makro ist.
Schematisch (ungetestet):
Sub ShowMeTheHyperlinks()
Const STR_PRES = "C:\Irgendwo\MeinePresi.pptx" 'Dateipfad zur Präsentation
Dim Pp As Object
Dim Pres As Object
Dim oSl As Object
Dim oHl As Hyperlink
Dim Wb As Workbook
Dim Ws As Worksheet
Dim i&
Set Wb = ThisWorkbook
Set Ws = Wb.Worksheets("Tabelle1") 'Ausgabe auf diesem Blatt
Set Pp = CreateObject("PowerPoint.Application")
Pp.Visible = True
Set Pres = Pp.presentations.Open(STR_PRES)
For Each oSl In Pres.Slides
For Each oHl In oSl.Hyperlinks
If oHl.Type = msoHyperlinkShape Then
With Ws
i = .Cells(.Rows.Count, 1).End(xlUp).Row
.Cells(i, 1).Value = "HL in shape"
.Cells(i, 2).Value = "Slide: " & vbTab & oSl.SlideIndex
.Cells(i, 3).Value = "Shape: " & oHl.Parent.Parent.Name
.Cells(i, 4).Value = "Address:" & vbTab & oHl.Address
.Cells(i, 5).Value = "SubAddress:" & vbTab & oHl.SubAddress
End With
Else
With Ws
i = .Cells(.Rows.Count, 1).End(xlUp).Row
.Cells(i, 1).Value = "HL in text"
.Cells(i, 2).Value = "Slide: " & vbTab & oSl.SlideIndex
.Cells(i, 3).Value = "Shape: " & oHl.Parent.Parent.Name
.Cells(i, 4).Value = "Address:" & vbTab & oHl.Address
.Cells(i, 5).Value = "SubAddress:" & vbTab & oHl.SubAddress
End With
End If
Next
Next
End Sub
LG
Michael
Anzeige
AW: Hyperlinks aus PPT-Datei in Excel anzeigen lassen
25.07.2016 12:58:11
Flo
Nochmals Danke! Glaube das es nur noch an einer Kleinigkeit scheitert.
Bei der Zeile
" For Each oHl In oSl.Hyperlinks " erscheint eine Fehlermeldung: "Typen unverträglich"
Kannst Du mir auch hier noch einmal helfen?
AW: Hyperlinks aus PPT-Datei in Excel anzeigen lassen
25.07.2016 13:03:24
Flo
Anbei nochmal mein aktueller Code, falls das hilft:

Sub ShowMeTheHyperlinks()
Const STR_PRES = "L:\klct\KLCT6\5 Planung\Planung IX16\02 BUDGET BINDER\99 SUBMISSIONS\2016  _
07 20 FC9 Submission BdgB & BusP to EMT\SLIDES\Archive\HC_Bdg_IX-16_DI_Binder_Backup_V24 - linked_FS.pptm" 'Dateipfad zur Präsentation
Dim Pp As Object
Dim Pres As Object
Dim oSl As Object
Dim oHl As Hyperlink
Dim Wb As Workbook
Dim Ws As Worksheet
Dim i&
Set Wb = ThisWorkbook
Set Ws = Wb.Worksheets("Tabelle1") 'Ausgabe auf diesem Blatt
Set Pp = CreateObject("PowerPoint.Application")
Pp.Visible = True
Set Pres = Pp.presentations.Open(STR_PRES)
For Each oSl In Pres.Slides
For Each oHl In oSl.Hyperlinks
With Ws
i = .Cells(.Rows.Count, 1).End(xlUp).Row
.Cells(i, 1).Value = "HL in shape"
.Cells(i, 2).Value = "Slide: " & vbTab & oSl.SlideIndex
.Cells(i, 3).Value = "Shape: " & oHl.Parent.Parent.Name
.Cells(i, 4).Value = "Address:" & vbTab & oHl.Address
.Cells(i, 5).Value = "SubAddress:" & vbTab & oHl.SubAddress
End With
Next
Next
End Sub

Anzeige
AW: Hyperlinks aus PPT-Datei in Excel anzeigen lassen
25.07.2016 13:10:35
Michael
Hallo!
Sub ShowMeTheHyperlinks()
'Dateipfad zur Präsentation - anpassen
Const STR_PRES = "C:\Irgendwo\MeinePresi.pptx"
Dim Pp As Object
Dim Pres As Object
Dim oSl As Object
Dim oHl As Object
Dim Wb As Workbook
Dim Ws As Worksheet
Dim i&
Set Wb = ThisWorkbook
'Ausgabe auf diesem Blatt - anpassen
Set Ws = Wb.Worksheets("Tabelle1")
Set Pp = CreateObject("PowerPoint.Application")
Pp.Visible = True
Set Pres = Pp.presentations.Open(STR_PRES)
For Each oSl In Pres.Slides
For Each oHl In oSl.Hyperlinks
If oHl.Type = msoHyperlinkShape Then
With Ws
i = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
.Cells(i, 1).Value = "HL in shape"
.Cells(i, 2).Value = "Slide: " & vbTab & oSl.SlideIndex
.Cells(i, 3).Value = "Shape: " & oHl.Parent.Parent.Name
.Cells(i, 4).Value = "Address:" & vbTab & oHl.Address
.Cells(i, 5).Value = "SubAddress:" & vbTab & oHl.SubAddress
End With
Else
With Ws
i = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
.Cells(i, 1).Value = "HL in text"
.Cells(i, 2).Value = "Slide: " & vbTab & oSl.SlideIndex
.Cells(i, 4).Value = "Address:" & vbTab & oHl.Address
.Cells(i, 5).Value = "SubAddress:" & vbTab & oHl.SubAddress
End With
End If
Next
Next
End Sub
LG
Michael
Anzeige
AW: Hyperlinks aus PPT-Datei in Excel anzeigen lassen
25.07.2016 13:28:19
Flo
Tausend Dank!
Gern! owT
25.07.2016 13:46:09
Michael

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige