Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
anka...
Femeie
25 ani
Valcea
cauta Barbat
25 - 40 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [POWERPOINT] Code to Save Active Slide as PNG to File Directory [VBA] Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 748
Based on this topic:
which shows a button in the ADD-IN tab / ribbon, available in all PowerPoint files.

You can add your own tab/ribbon filled with your desired buttons, using Custom UI.



Sub SaveActiveSlideAsPNG()
' in case you are adding a button to a custom tab made with Custom UI, use:
' Sub SaveActiveSlideAsPNG(control As IRibbonControl)

Dim imagePath As String
Dim slideNum As Integer

' find the path of the presentation - the image will be saved in the same place
imagePath = ActivePresentation.path

' find out the SlideIndex of the active slide
slideNum = ActiveWindow.View.Slide.SlideIndex

' first check if this already exists then delete it
If Dir(imagePath & "\" & ActivePresentation.Name & "_" & slideNum & ".png") <> "" Then
    Kill imagePath & "\" & ActivePresentation.Name & "_" & slideNum & ".png"
End If

' now save the slide
'ActivePresentation.SlideShowWindow.View.Slide.Export
ActiveWindow.View.Slide.Export _
FileName:=imagePath & "\" & ActivePresentation.Name & "_" & slideNum & ".png", _
FilterName:="PNG"

End Sub


Modified code from source, but source was:

Modificat de TRaP (acum 5 ani)


pus acum 5 ani
   
Pagini: 1  

Mergi la