VB VBA pour Powerpoint - Comment insérer un commentaire

manrow Messages postés 2 Statut Membre -  
cs_Le Pivert Messages postés 8437 Statut Contributeur -
Bonjour,

Je souhaiterais insérer un commentaire par macro dans une présentation powerpoint.

J'ai trouvé la commande suivante:

MyCom = Application.ActiveWindow.View.Slide.Comments.Add


MyCom.text = "Lorem Ipsum"


Mais la seconde ligne n'est pas reconnue. Quelqu'un connait-il la commande pour définir le texte à insérer dans ce commentaire ?

Merci par avance,

Manrow

1 réponse

  1. cs_Le Pivert Messages postés 8437 Statut Contributeur 730
     
    Bonjour,

    Voilà ce que l'on a en sélectionnant

    Comments et en faisant F1(aide)

    Sub AddNewComment()
        ActivePresentation.Slides(1).Comments.Add _
            Left:=0, Top:=0, Author:="John Doe", AuthorInitials:="jd", _
            Text:="Please check this spelling again before the next draft."
    End Sub
    


    J'espère que cela sera utile!
    0