Created
October 5, 2018 22:21
-
-
Save Mandorlo/79d56ff6ab0bde1c78929c5339bc6a45 to your computer and use it in GitHub Desktop.
Sauve l'image qui se trouve dans le presse-papier (utilise PowerPoint)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub SaveClipBoardImage(ByVal path As String) | |
Dim oPPT As PowerPoint.Application | |
Set oPPT = New PowerPoint.Application | |
Dim pptLayout As CustomLayout | |
Dim myslide As Slide | |
Set newppt = oPPT.Presentations.Add(msoTrue) | |
Set pptLayout = newppt.Designs(1).SlideMaster.CustomLayouts(1) | |
With newppt.Slides.AddSlide(1, pptLayout) | |
.Shapes.PasteSpecial DataType:=ppPastePNG | |
.Shapes(.Shapes.Count).Export path, ppShapeFormatPNG | |
End With | |
oPPT.Quit | |
Set oPPT = Nothing | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment