IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Access Discussion :

Imprimer un devis dans un powerpoint


Sujet :

Access

  1. #1
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut Imprimer un devis dans un powerpoint
    Bonjour,

    Je bosse sur un nouveau projet de création de devis dans l'event.
    Mon souci, c'est les devis qui seront générés doivent être en .pptx, car les clients souhaitent les modifier pour leurs clients à eux.

    Est-ce possible d'après vous ?

    Merci pour votre précieuse aide.

  2. #2
    Rédacteur/Modérateur
    Avatar de loufab
    Homme Profil pro
    Entrepreneur en solutions informatiques viables et fonctionnelles.
    Inscrit en
    Avril 2005
    Messages
    12 004
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Pyrénées Atlantiques (Aquitaine)

    Informations professionnelles :
    Activité : Entrepreneur en solutions informatiques viables et fonctionnelles.
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2005
    Messages : 12 004
    Points : 24 593
    Points
    24 593
    Par défaut
    Bonjour,

    Powerpoint, Word, Excel aucun problème. Il suffit de passer par l'automation (pilotage de d'un produit VBA depuis un autre produit VBA).

    Du coup il te faut voir coté Powerpoint-VBA et non ACCESS-VBA car lui n'envoie que des données dans le modèle VBA-Powerpoint.

    Cordialement,
    Détecter les modifications formulaire Cloud storage et ACCESS
    Classe MELA(CRUD) Opérateur IN et zone de liste Opérateur LIKE
    Visitez mon Blog
    Les questions techniques par MP ne sont pas lues et je ne pratique pas la bactériomancie

  3. #3
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Bonjour,

    Merci pour votre réponse.

    Je vais faire des recherches dans ce sens, mais sans être certain que c'est dans cette direction que je dois commencer.

    Car, les données viennent du futur outil que je vais développer sur Access. Et ses mêmes données je souhaite les "Imprimer" dans un PPT avec une mise en page définie, comme si je remplace l'état pas une slide.

  4. #4
    Rédacteur/Modérateur
    Avatar de loufab
    Homme Profil pro
    Entrepreneur en solutions informatiques viables et fonctionnelles.
    Inscrit en
    Avril 2005
    Messages
    12 004
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Pyrénées Atlantiques (Aquitaine)

    Informations professionnelles :
    Activité : Entrepreneur en solutions informatiques viables et fonctionnelles.
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2005
    Messages : 12 004
    Points : 24 593
    Points
    24 593
    Par défaut
    A part l'automation vous pouvez souscrire un abonnement à un complément qui fait le job (google est votre ami).

    Sinon je ne vois pas qu'elle autre direction vous souhaitez prendre, si c'est bien une automatisation du process que vous souhaitez.
    Détecter les modifications formulaire Cloud storage et ACCESS
    Classe MELA(CRUD) Opérateur IN et zone de liste Opérateur LIKE
    Visitez mon Blog
    Les questions techniques par MP ne sont pas lues et je ne pratique pas la bactériomancie

  5. #5
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Un abonnement à un complément ?

    Tiens donc ! Cela m'intéresse. Vous pouvez m'en dire plus svp.

  6. #6
    Rédacteur/Modérateur
    Avatar de loufab
    Homme Profil pro
    Entrepreneur en solutions informatiques viables et fonctionnelles.
    Inscrit en
    Avril 2005
    Messages
    12 004
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Pyrénées Atlantiques (Aquitaine)

    Informations professionnelles :
    Activité : Entrepreneur en solutions informatiques viables et fonctionnelles.
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2005
    Messages : 12 004
    Points : 24 593
    Points
    24 593
    Par défaut
    https://www.presentationpoint.com/software/datapoint/

    Ensuite il faut voir le cout à long terme par rapport à une solution développée.
    Détecter les modifications formulaire Cloud storage et ACCESS
    Classe MELA(CRUD) Opérateur IN et zone de liste Opérateur LIKE
    Visitez mon Blog
    Les questions techniques par MP ne sont pas lues et je ne pratique pas la bactériomancie

  7. #7
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Bonsoir,

    Je bloque et je ne comprends pas ce qui se passe.

    Je souhaite créer une zone de texte dans un ppt à partir d'access. Mais j'ai constament un message d'erreur :

    erreur d'execution -2147024809 (80070057) la valeur tapée est en dehors des limites

    Voici mon code

    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
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    Private Sub Commande65_Click()
     
     
     
        Dim ppt As PowerPoint.Application
        Dim presentation As PowerPoint.presentation
        Dim slide As PowerPoint.slide
        Dim shape1 As PowerPoint.shape
        Dim shape2 As PowerPoint.shape
        Dim valeurChamp1 As String
        Dim valeurChamp2 As String
     
        ' Prendre les valeurs des champs courants dans le formulaire
        valeurChamp1 = Me.nom_ctact.Value
        valeurChamp2 = Me.nom_clt.Value
     
        ' Ouvrir PowerPoint
        Set ppt = New PowerPoint.Application
        ppt.Visible = True
     
        ' Ouvrir la présentation
        Set presentation = ppt.Presentations.Open("C:\Users\Malek\Documents\test2.pptx")
     
        ' Accéder à la diapositive 3
        Set slide = presentation.Slides(2)
     
        ' Créer une nouvelle zone de texte pour chaque champ et y insérer la valeur du champ
        Set shape1 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=10, Top:=10, Width:=215, Height:=130)
        shape1.TextFrame.TextRange.Text = valeurChamp1
     
        Set shape2 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=100, Top:=200, Width:=200, Height:=50)
        shape2.TextFrame.TextRange.Text = valeurChamp2
     
     
     
    End Sub
    L'erreur me pointe cette ligne :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Set shape1 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=10, Top:=10, Width:=215, Height:=130)
    J'ai beau modifier l'emplacement rien ne fait.

    Please HELP

  8. #8
    Expert éminent
    Homme Profil pro
    Webplanneur
    Inscrit en
    Octobre 2007
    Messages
    4 262
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 59
    Localisation : Réunion

    Informations professionnelles :
    Activité : Webplanneur

    Informations forums :
    Inscription : Octobre 2007
    Messages : 4 262
    Points : 6 561
    Points
    6 561
    Par défaut
    Salut
    Depuis quand ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
        ' Accéder à la diapositive 3
        Set slide = presentation.Slides(2)
    l'indice (2) égale à la 2ème diapositive de votre diaporama !
    "Le savoir est la seule matière qui s'accroit quand on la partage" (Socrate)
    UR - ESIROI - GPME/CG/DCG8
    QTH :21°19'18"S - 055°25'32"E
    Inutile de me contacter par MP
    Merci de cliquer sur si la réponse vous a permis de résoudre votre problème et n'oubliez pas de clôturer le fil en cliquant sur

  9. #9
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Bonsoir,

    Oui Oui, c'est bien la slide 2 que je pointe.

  10. #10
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Rien de change, toujours ce maudit message d'erreur

    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
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    Private Sub Commande65_Click()
     
        Dim ppt As PowerPoint.Application
        Dim presentation As PowerPoint.presentation
        Dim slide As PowerPoint.slide
        Dim shape1 As PowerPoint.shape
        Dim shape2 As PowerPoint.shape
        Dim valeurChamp1 As String
        Dim valeurChamp2 As String
     
        ' Prendre les valeurs des champs courants dans le formulaire
        valeurChamp1 = Me.nom_ctact.Value
        valeurChamp2 = Me.nom_clt.Value
     
     
        ' Ouvrir PowerPoint
        Set ppt = New PowerPoint.Application
        ppt.Visible = True
     
        ' Ouvrir la présentation
        Set presentation = ppt.Presentations.Open("C:\Users\Malek\Documents\test2.pptx")
     
        ' Accéder à la diapositive 2
        Set slide = presentation.Slides(2)
     
        ' Créer une nouvelle zone de texte pour chaque champ et y insérer la valeur du champ
        Set shape1 = slide.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=100, Top:=100, Width:=200, Height:=50)
        shape1.TextFrame.TextRange.Text = valeurChamp1
     
        Set shape2 = slide.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=100, Top:=200, Width:=200, Height:=50)
        shape2.TextFrame.TextRange.Text = valeurChamp2
     
    End Sub

  11. #11
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    [QUOTE=hyperion13;11948032]Salut
    Depuis quand ?

    Je suis en train de monter mon outil. Ce code n'a jamais marché. Je viens d'y consacrer toute mon après-midi.

  12. #12
    Expert éminent
    Homme Profil pro
    Webplanneur
    Inscrit en
    Octobre 2007
    Messages
    4 262
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 59
    Localisation : Réunion

    Informations professionnelles :
    Activité : Webplanneur

    Informations forums :
    Inscription : Octobre 2007
    Messages : 4 262
    Points : 6 561
    Points
    6 561
    Par défaut
    salut
    pour ma part ça fonctionne
    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
    20
    21
    Private Sub btnppt_Click()
    Dim appPpt As PowerPoint.Application
    Dim docPpt As PowerPoint.Presentation
    Dim objSld As PowerPoint.Slide, objSld1 As PowerPoint.Slide
    Dim var1 As String, var2 As String
     
    var1 = Me.Texte1
    var2 = Me.Texte2
     
    Set appPpt = New PowerPoint.Application
    appPpt.Visible = True
     
    Set docPpt = appPpt.Presentations.Open(CurrentProject.Path & "\" & "20230524_ppt.pptx")
     
    Set objSld = docPpt.Slides(2)
    objSld.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=10, Top:=10, Width:=215, Height:=130).TextFrame.TextRange.Text = var1
     
    Set objSld1 = docPpt.Slides(2)
    objSld1.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=10, Top:=50, Width:=215, Height:=130).TextFrame.TextRange.Text = var2
     
    End Sub
    Images attachées Images attachées  
    "Le savoir est la seule matière qui s'accroit quand on la partage" (Socrate)
    UR - ESIROI - GPME/CG/DCG8
    QTH :21°19'18"S - 055°25'32"E
    Inutile de me contacter par MP
    Merci de cliquer sur si la réponse vous a permis de résoudre votre problème et n'oubliez pas de clôturer le fil en cliquant sur

  13. #13
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Merci pour ton aide.

    J'ai ajouté ton code avec mes champ

    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
    20
    21
    22
    23
    24
    25
    26
    Private Sub Commande66_Click()
     
     
        Dim appPpt As PowerPoint.Application
        Dim docPpt As PowerPoint.presentation
        Dim objSld As PowerPoint.slide, objSld1 As PowerPoint.slide
        Dim objShp As PowerPoint.shape
        Dim var1 As String, var2 As String
     
        var1 = Me.nom_ctact
        var2 = Me.nom_clt
     
        Set appPpt = New PowerPoint.Application
        appPpt.Visible = True
     
        Set docPpt = appPpt.Presentations.Open("C:\Users\Malek\Documents\test2.pptx")
     
        Set objSld = docPpt.Slides(2)
        objSld.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=10, Top:=10, Width:=215, Height:=130).TextFrame.TextRange.Text = var1
     
        Set objSld1 = docPpt.Slides(2)
        objSld1.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=10, Top:=50, Width:=215, Height:=130).TextFrame.TextRange.Text = var2
     
     
     
    End Sub
    J'ai la même erreur : a valeur tapée est en dehors des limites

    A cette ligne :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    objSld.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=10, Top:=10, Width:=215, Height:=130).TextFrame.TextRange.Text = var1

  14. #14
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Ca fonctionne.

    Au top !!

    Merci..

  15. #15
    Expert éminent sénior
    Avatar de tee_grandbois
    Homme Profil pro
    retraité
    Inscrit en
    Novembre 2004
    Messages
    8 637
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 67
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : retraité

    Informations forums :
    Inscription : Novembre 2004
    Messages : 8 637
    Points : 14 611
    Points
    14 611
    Par défaut
    bonsoir,
    Ca fonctionne.

    Au top !!
    on est content pour toi !
    mais pense à fermer la discussion, c'est le bouton quelque part en bas
    Quand on est derrière l'écran on n'a aucun clavier sous les mains ...
    ah non ? donc devant l'écran c'est la connectique ?

  16. #16
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Mon projet ne fait que commencer.

    Je souhaite partager avec la communauté la suite et surtout le projet.

  17. #17
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Bonjour @ tous,

    La mise en page de la seconde slide est opérationnelle.
    Objectif :

    Exporter des champs à un emplacement précis, avec une police précise

    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
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    Private Sub Commande66_Click()
     
        Dim ppt As PowerPoint.Application
        Dim presentation As PowerPoint.presentation
        Dim slide As PowerPoint.slide
        Dim shape1 As PowerPoint.shape, shape2 As PowerPoint.shape, shape3 As PowerPoint.shape
        Dim shape4 As PowerPoint.shape, shape5 As PowerPoint.shape, shape6 As PowerPoint.shape
        Dim shape7 As PowerPoint.shape, shape8 As PowerPoint.shape, shape9 As PowerPoint.shape
        Dim shape10 As PowerPoint.shape, shape11 As PowerPoint.shape, shape12 As PowerPoint.shape
        Dim vc1 As String, vc2 As String, vc3 As String, vc4 As String, vc5 As String, vc6 As String
        Dim vc7 As String, vc8 As String, vc9 As String, vc10 As String, vc11 As String, vc12 As String
     
        ' Prendre les valeurs des champs courants dans le formulaire
        vc1 = "Date : " & Format(Me.date_evt.Value, "dddd d mmmm yyyy")
        vc2 = "Nombre de convives : " & "Base " & Me.nbr_pax.Value & " personnes"
        vc3 = "Déroulé de la prestation : " & Me.typ_prest.Value
        vc4 = "Lieu : " & Me.lieu.Value
     
        If Me.ref_pres.Value <> "" Then
            vc5 = "Réf : " & Me.ref_pres.Value
        Else
            vc5 = ""
        End If
     
        'vc5 = "Réf : " & Me.ref_pres.Value
        vc6 = Me.nom_clt.Value & " - " & Me.cod_clt.Value
        vc7 = Me.prnom_ctact.Value & " " & Me.nom_ctact.Value
        vc8 = "Tél : " & Me.mobile.Value
        vc9 = "E-mail : " & Me.mail
        vc10 = Me.nom_cial.Value
        vc11 = "Tél : " & Me.tel.Value
        vc12 = "E-mail : " & Me.mail_cial.Value
     
     
        ' Ouvrir PowerPoint
        Set ppt = New PowerPoint.Application
        ppt.Visible = True
     
        ' Ouvrir la présentation
        Set presentation = ppt.Presentations.Open("\\10.4.95.13\Commun\MALEK\Dev_Access\GDD\test2.pptx")
     
        ' Accéder à la diapositive 2
        Set slide = presentation.Slides(2)
     
        ' Créer une nouvelle zone de texte pour chaque champ et y insérer la valeur du champ
        Set shape1 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=126.44, Width:=255.118, Height:=19.845)
        shape1.TextFrame.TextRange.Text = vc1
     
        ' Appliquer les attributs de police spécifiés
        With shape1.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0) ' Rouge: 0, Vert: 0, Bleu: 0
        End With
     
     ' Appliquer le formatage en gras uniquement au texte "le nom de la personne :"
        shape1.TextFrame.TextRange.Paragraphs(1).Characters(1, 7).Font.Bold = msoTrue ' Assurez-vous d'ajuster les positions des caractères en fonction de votre texte
     
        ' Centrer le texte
        shape1.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
    'shape 2
        Set shape2 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=144.302, Width:=255.118, Height:=19.845)
        shape2.TextFrame.TextRange.Text = vc2
     
     
        With shape2.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        shape2.TextFrame.TextRange.Paragraphs(1).Characters(1, 21).Font.Bold = msoTrue
     
     
        shape2.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
    'shape 3
        Set shape3 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=162.446, Width:=255.118, Height:=19.845)
        shape3.TextFrame.TextRange.Text = vc3
     
     
        With shape3.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        shape3.TextFrame.TextRange.Paragraphs(1).Characters(1, 27).Font.Bold = msoTrue
     
     
        shape3.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
     
    'shape 4
        Set shape4 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=180.59, Width:=255.118, Height:=19.845)
        shape4.TextFrame.TextRange.Text = vc4
     
     
        With shape4.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        shape4.TextFrame.TextRange.Paragraphs(1).Characters(1, 7).Font.Bold = msoTrue
     
     
        shape4.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
     
    'shape 5
        If vc5 <> "" Then
     
        Set shape5 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=204.971, Width:=255.118, Height:=19.845)
        shape5.TextFrame.TextRange.Text = vc5
     
     
        With shape5.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(255, 0, 0)
            .Bold = msoTrue
        End With
     
        'shape5.TextFrame.TextRange.Paragraphs(1).Characters(1, 6).Font.Bold = msoTrue
     
     
        shape5.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
        End If
     
    'shape 6
        Set shape6 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=254.583, Width:=255.118, Height:=19.845)
        shape6.TextFrame.TextRange.Text = vc6
     
     
        With shape6.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
            .Bold = msoTrue
        End With
     
        'shape5.TextFrame.TextRange.Paragraphs(1).Characters(1, 6).Font.Bold = msoTrue
     
     
        shape6.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
     
    'shape 7
        Set shape7 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=278.964, Width:=255.118, Height:=19.845)
        shape7.TextFrame.TextRange.Text = vc7
     
     
        With shape7.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        'shape7.TextFrame.TextRange.Paragraphs(1).Characters(1, 7).Font.Bold = msoTrue
     
     
        shape7.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
     
    'shape 8
        Set shape8 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=298.809, Width:=255.118, Height:=19.845)
        shape8.TextFrame.TextRange.Text = vc8
     
     
        With shape8.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        shape8.TextFrame.TextRange.Paragraphs(1).Characters(1, 6).Font.Bold = msoTrue
     
     
        shape8.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
     
    'shape 9
        Set shape9 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=319.788, Width:=255.118, Height:=19.845)
        shape9.TextFrame.TextRange.Text = vc9
     
     
        With shape9.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        shape9.TextFrame.TextRange.Paragraphs(1).Characters(1, 9).Font.Bold = msoTrue
     
     
        shape9.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
     
    'shape 10
        Set shape10 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=400.869, Width:=255.118, Height:=19.845)
        shape10.TextFrame.TextRange.Text = vc10
     
     
        With shape10.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        'shape10.TextFrame.TextRange.Paragraphs(1).Characters(1, 9).Font.Bold = msoTrue
     
     
        shape10.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
     
    'shape 11
        Set shape11 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=432.054, Width:=255.118, Height:=19.845)
        shape11.TextFrame.TextRange.Text = vc11
     
     
        With shape11.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        shape11.TextFrame.TextRange.Paragraphs(1).Characters(1, 6).Font.Bold = msoTrue
     
     
        shape11.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
     
    'shape 12
        Set shape12 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=451.332, Width:=255.118, Height:=19.845)
        shape12.TextFrame.TextRange.Text = vc12
     
     
        With shape12.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        shape12.TextFrame.TextRange.Paragraphs(1).Characters(1, 9).Font.Bold = msoTrue
     
     
        shape12.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
     
     
     
     
    End Sub

  18. #18
    Rédacteur/Modérateur
    Avatar de loufab
    Homme Profil pro
    Entrepreneur en solutions informatiques viables et fonctionnelles.
    Inscrit en
    Avril 2005
    Messages
    12 004
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Pyrénées Atlantiques (Aquitaine)

    Informations professionnelles :
    Activité : Entrepreneur en solutions informatiques viables et fonctionnelles.
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2005
    Messages : 12 004
    Points : 24 593
    Points
    24 593
    Par défaut
    Bonjour,

    Visiblement tu peux factoriser ton code, cette partie étant identique :

    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
     
    'shape 3
        Set shape3 = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=341.334, Top:=162.446, Width:=255.118, Height:=19.845)
        shape3.TextFrame.TextRange.Text = vc3
     
     
        With shape3.TextFrame.TextRange.Font
            .Size = 10
            .Name = "Century Gothic"
            .Color.RGB = RGB(0, 0, 0)
        End With
     
        shape3.TextFrame.TextRange.Paragraphs(1).Characters(1, 27).Font.Bold = msoTrue
     
     
        shape3.TextFrame2.TextRange.ParagraphFormat.Alignment = ppAlignCenter
    Cordialement,
    Détecter les modifications formulaire Cloud storage et ACCESS
    Classe MELA(CRUD) Opérateur IN et zone de liste Opérateur LIKE
    Visitez mon Blog
    Les questions techniques par MP ne sont pas lues et je ne pratique pas la bactériomancie

  19. #19
    Membre à l'essai
    Homme Profil pro
    Directeur d'Exploitation
    Inscrit en
    Mai 2017
    Messages
    75
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Directeur d'Exploitation
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2017
    Messages : 75
    Points : 23
    Points
    23
    Par défaut
    Bonjour,

    C'est à dire ? que tu dis factoriser...

  20. #20
    Rédacteur/Modérateur
    Avatar de loufab
    Homme Profil pro
    Entrepreneur en solutions informatiques viables et fonctionnelles.
    Inscrit en
    Avril 2005
    Messages
    12 004
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Pyrénées Atlantiques (Aquitaine)

    Informations professionnelles :
    Activité : Entrepreneur en solutions informatiques viables et fonctionnelles.
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2005
    Messages : 12 004
    Points : 24 593
    Points
    24 593
    Détecter les modifications formulaire Cloud storage et ACCESS
    Classe MELA(CRUD) Opérateur IN et zone de liste Opérateur LIKE
    Visitez mon Blog
    Les questions techniques par MP ne sont pas lues et je ne pratique pas la bactériomancie

Discussions similaires

  1. [QUICK REPORT] Imprimer des données dans QRIMAGE
    Par freud dans le forum Bases de données
    Réponses: 1
    Dernier message: 23/01/2007, 12h07
  2. imprimer une image dans un fichier
    Par SegmentationFault dans le forum Delphi
    Réponses: 7
    Dernier message: 02/08/2006, 16h04
  3. Réponses: 11
    Dernier message: 01/08/2006, 05h15
  4. [vb6] Imprimer des pictureBOx dans un fichier
    Par Asdorve dans le forum VB 6 et antérieur
    Réponses: 14
    Dernier message: 18/07/2006, 11h55
  5. Imprimer sous-formulaire dans un état
    Par guenfood dans le forum Access
    Réponses: 16
    Dernier message: 13/06/2006, 11h02

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo