Skip to content

Instantly share code, notes, and snippets.

@Mandorlo
Created October 5, 2018 22:21
Show Gist options
  • Save Mandorlo/79d56ff6ab0bde1c78929c5339bc6a45 to your computer and use it in GitHub Desktop.
Save Mandorlo/79d56ff6ab0bde1c78929c5339bc6a45 to your computer and use it in GitHub Desktop.
Sauve l'image qui se trouve dans le presse-papier (utilise PowerPoint)
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