[Visual Basic] ouvrir présentation powerpoint

Bonjour,

Je voudrais que quelqu'un m'aide en me disant qu'elle est la commande pour ouvrir une présentation PowerPoint depuis Visual Basic.

Merci de votre aide.

A+

4 réponses

  1. Bonjour,

    J'aurai moi aussi besoin d'aide!
    Apres avoir ouvert mon fichier powerpoint, je voudrais copier un tableau sous excel et le coller sous powerpoint....seulement ca ne marche pas . Voici mon code :

    Worksheets("Feuille").Activate
    Range("B4:P36").Copy

    Ppp1.Slides(2).Select
    Ppp1.Paste

    Quelqu'un peut-il m'aider? merci...
    0
    1. bon bin j'ai trouve comme une grande !!!

      Worksheets("Feuille 1").Activate
      Range("B4:P36").Select
      Selection.CopyPicture Appearance:=xlScreen, _
      Format:=xlPicture

      Ppp1.Slides(2).Select
      Ppp1.Slides(2).Shapes.Paste.Select

      ppt.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True
      ppt.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True

      Cheers
      0
  2. Bonjour coach_novel,

    Je ne suis pas spécialiste de VBA pour PowerPoint, mais essaie :
    Presentations.Open FileName:="c:\My Documents\pres1.ppt"
    et cherche dans l'aide de VBA.
    Ajx.
    -1
    1. Merci Armojax.

      Mais je voulais savoir si quelqu'un sait si il faut que je crée un bouton spécial pour insérer cette commande et où je dois l'insérer.
      Et est-ce que quelqu'un a un tutoriel pour vba pour Powerpoint?

      Merci d'avance!
      -1
      1. Option Explicit
        Dim pPT As PowerPoint.Application
        Dim pPTopen As PowerPoint.Presentation

        Private Sub Command1_Click()
        Dim sl As PowerPoint.Slides

        Set pPT = New PowerPoint.Application
        pPT.Visible = True

        Set pPTopen = pPT.Presentations.Add

        pPT.Activate
        pPTopen.Slides.Add 1, ppLayoutBlank
        pPTopen.Slides.Add 2, ppLayoutChart

        End Sub

        Private Sub Form_Unload(Cancel As Integer)
        Set pPT = Nothing
        Set pPTopen = Nothing
        End Sub
        -1