Bonjour,
J'ai un problème avec le bout de code ci-dessous (code depuis un fichier excel).
En effet lors du redimensionnement, j'obtiens l'erreur suivante :
Run-time error '-2147024809 (80070057)': The RelativeToOriginalSize argument applies only to a picture or an OLE objects.
Je ne comprend pas car ce code marchait très bien il y a une semaine..
Auriez-vous une suggestion ?
Par avance merci.
Nicolas
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 Dim PPApp As PowerPoint.Application Dim PPPres As PowerPoint.Presentation Dim PPSlide As PowerPoint.Slide Set PPApp = CreateObject("Powerpoint.Application") PPApp.Visible = True Set PPPres = PPApp.Presentations.Open(MyWorkbook) Set PPSlide = PPPres.Slides.Add(2, ppLayoutBlank) Workbooks(X).Worksheets(Y).Range(Z).Copy PPSlide.Shapes.PasteSpecial (ppPasteEnhancedMetafile) PPSlide.Shapes.Range(1).ScaleHeight 0.4, msoTrue PPSlide.Shapes.Range(1).ScaleWidth 0.4, msoTrue
Partager