L
Leeloo
Guest
Bonjour,
Je suis sensée sauver le monde avec ma macro mais je n'y arrive pas. Mon pb : ouvrir une présentation powerpoint depuis une macro.
Voilà ce que j'ai écris et ça ne marche pas (pourtant j'ai bien été dans outils>références> et j'ai coché PowerPOint 10.0 Object Library etc...)
Dim oApp As PowerPoint.Application
Dim oDoc As PowerPoint.Presentation
On Error Resume Next
Set oApp = GetObject(, "PowerPoint.Application")
If oApp Is Nothing Then
Set oApp = New PowerPoint.Application
End If
On Error GoTo 0
If oApp Is Nothing Then
MsgBox "The application is not available!"
End If
With oApp
.Visible = True
Set oDoc = .Presentation.Open("O:\Fiches produits \ marché \ Crèmes \ produits Auchan.ppt")
.Quit
End With
Set oDoc = Nothing
Set oApp = Nothing
Sheets("UniversC").Select
Cream.Show
Si qq1 peut m'aider, je serais ravie
(j'ai essayer d'appliquer mon pb à celui du monsieur qui voulait ouvrir un doc Word mais je n'y suis pas parvenue...)
A bientôt
Leeloo
Je suis sensée sauver le monde avec ma macro mais je n'y arrive pas. Mon pb : ouvrir une présentation powerpoint depuis une macro.
Voilà ce que j'ai écris et ça ne marche pas (pourtant j'ai bien été dans outils>références> et j'ai coché PowerPOint 10.0 Object Library etc...)
Dim oApp As PowerPoint.Application
Dim oDoc As PowerPoint.Presentation
On Error Resume Next
Set oApp = GetObject(, "PowerPoint.Application")
If oApp Is Nothing Then
Set oApp = New PowerPoint.Application
End If
On Error GoTo 0
If oApp Is Nothing Then
MsgBox "The application is not available!"
End If
With oApp
.Visible = True
Set oDoc = .Presentation.Open("O:\Fiches produits \ marché \ Crèmes \ produits Auchan.ppt")
.Quit
End With
Set oDoc = Nothing
Set oApp = Nothing
Sheets("UniversC").Select
Cream.Show
Si qq1 peut m'aider, je serais ravie
(j'ai essayer d'appliquer mon pb à celui du monsieur qui voulait ouvrir un doc Word mais je n'y suis pas parvenue...)
A bientôt
Leeloo