Bonjour, voici le code, helas je n'arrive pas a faire inserer une legende automatiquement (Figure 1 "texte que j'ajoute"), c'est la fonctionalité Clic droit sur l'image, inserer une legende.

De plus il faut que l'image soit centree.

Merci !

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
16
17
18
19
Function ExportGraphRest(wsSheet As Worksheet, sChemin As String, sGraphNum As String, sTitre As String)
 
        Set WdApp = Word.Application
        Set wddoc = GetObject(sChemin)
        WdApp.Visible = True
 
        wsSheet.Select
        wsSheet.ChartObjects("Graphique " & sGraphNum).Activate
        ActiveChart.ChartArea.Select
        ActiveChart.ChartArea.Copy
 
        WdApp.Selection.EndKey Unit:=wdStory, Extend:=wdMove
        WdApp.Selection.TypeParagraph
        WdApp.Selection.PasteSpecial , DataType:=3
        'Selection.Left = -999995
        'Selection.Legend
        Application.CutCopyMode = False
 
End Function