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

Macros et VBA Excel Discussion :

problème d'instabillité de code


Sujet :

Macros et VBA Excel

  1. #1
    Membre Expert Avatar de Godzestla
    Homme Profil pro
    Chercheur de bonheur
    Inscrit en
    Août 2007
    Messages
    2 403
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : Belgique

    Informations professionnelles :
    Activité : Chercheur de bonheur
    Secteur : Industrie

    Informations forums :
    Inscription : Août 2007
    Messages : 2 403
    Par défaut problème d'instabillité de code
    Bonjour, le code suivant tourne à partir d'un userform.
    Son but est de scanner les fichiers d'un répertoire et de les envoyer via email.
    Lorsqu'il n'y a plus de fichier, le programme attend puis recontrole s'il y a
    quelquechose à traiter.

    Il y a dans le userform un controle Adobe Pdf qui affiche le fichier attaché au dernier email. Ce controle affiche en alternance un PDF d'attente.
    je suspecte que c'est un problème de mémoire saturée qui pourrait être du à ce contrôle adobepdf.

    Les symptomes sont : le userform devient vide et l'application ne réponds plus.

    Merci de me donner vos suggestion pour debugger car je ne sais pas ou chercher.

    Code du userform
    La procédure qui fait le polling s'appelle Start_Polling_Click()
    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
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
     
    Dim BStop As Boolean
     
    Private Sub UserForm_Initialize()
    Me.StartUpPosition = 3
     'Disable
    Me.Stop_Polling.Visible = False
    'Enable
    Me.Start_Polling.Visible = True
    Me.Open_Parm_Userform.Visible = True
    'text
    Me.Status_text = "*Stopped"
    'last File
    Me.Last_File_Name = ""
    'Scanning_name
    Me.Scanning_Name = ""
     
    'Fax Sent
    Worksheets("Parms").Range("C20") = 0
    Me.Fax_Sent = Worksheets("Parms").Range("C20")
    'Fax Sent Cumulated
    Me.Fax_Sent_Cumulated = Worksheets("Parms").Range("C21")
     
    Search_file = Folder & Trim(Worksheets("Parms").Range("C3"))
     
    Me.AcroPDF1.LoadFile ("G:\Emballage\Format\Hydro.pdf")
    DoEvents
    Me.Repaint
     
    'Retrieve Debug_mode
    Me.Debug_Sw = Worksheets("Parms").Range("C22")
     
    End Sub
     
    Private Sub Open_Parm_Userform_Click()
    If Me.Password <> "Secret1" Then
     MsgBox "Please Specify a valid password at the right of this button and retry", vbCritical
     Else
      UserForm1.Show
      'Retrieve Debug_mode
      Me.Debug_Sw = Worksheets("Parms").Range("C22")
    End If
    End Sub
     
    Private Sub Start_Polling_Click()
    Dim Folder  As String               'Folder To browse
    Dim Search_file As String           'Pattern File to search for in Folder
    Dim Found_entry As String           'Found File name
    Dim Fullname    As String           'FullName of Found File
    Dim Rech        As String
    Dim Found_keys  As Boolean
    Dim Pos_REF     As Integer          'Position of first **REF in record
    Dim elem        As Integer
    Dim ref         As String
    Dim refx        As String
    Dim Mail        As String
    Dim Mailcc      As String
    Dim Mailbcc     As String
    Dim Subject     As String
    Dim Body()      As String
    Dim BSize       As Integer
    Dim Attachement_Folder As String    'Folder where to store attachement
    Dim Attachement() As String
    Dim Attachement_ext As String
    Dim Attachement_brut As String
    Dim Attachement_file As String
    Dim P_Attachement_file As String
    Dim Mxattach_name    As String
    Dim Operation   As String
    Dim Pdf_file    As String
    Dim Ps_file     As String
    Dim res         As Boolean
    Dim shell_res   As Variant
    Dim lng         As Integer
    Dim Laligne As String, tablKeys As Variant, tablVar As Variant
    Dim Where_pos As Long
    Dim End_Where As Long
    Dim beg_ligne As String
    Dim End_ligne As String
     
    Dim PhWnd     As Long
    Dim P_PhWnd   As Long
     
     
     
     
    'Mapping X pour attachemnt
    map_mxattach
     
     
    'Disable
    Me.Start_Polling.Visible = False
    Me.Open_Parm_Userform.Visible = False
    Me.Password.Visible = False
    'Enable
    Me.Stop_Polling.Visible = True
    'text
    Me.Status_text = "Polling"
     
    Me.Started_Box = "Started at " & CStr(Now())
     
    BStop = False
    PhWnd = 0
     
    '*****************************************************************
    '* Send PDF Labels Using FAX*STAR                                *
    '*****************************************************************
     
    '1. Retrieve Folder to browse
     
    Folder = Worksheets("Parms").Range("C2")
    If Right(Folder, 1) <> "\" Then
        Folder = Trim(Folder) & "\"
    End If
     
    '2. Retrieve Pattern File to browse
     
    Search_file = Folder & Trim(Worksheets("Parms").Range("C3"))
    Me.Scanning_Name = Search_file
    Me.Repaint
     
     
    '3. Retrieve Folder where to store attachement for FAXSTAR (MXATTACH)
     
    Attachement_Folder = Trim(Worksheets("Parms").Range("C4"))
    If Right(Attachement_Folder, 1) <> "\" Then
        Attachement_Folder = Trim(Attachement_Folder) & "\"
    End If
     
    '4. Loop until button Stop used
     
    Do While BStop = False
     
     DoEvents
     'text
     Me.Status_text = "Polling"
     Me.Repaint
     '5. Browse Folder until end of sources files or Button Stop used.
     
     Found_entry = Dir(Search_file, vbNormal)
     
    Do While Found_entry <> "" And BStop = False   ' Start the loop.
        'Excel premier Plan
        'AppActivate "Microsoft Excel"
     
        Fullname = Folder & Found_entry
        Me.Last_File_Name = Fullname
        Me.Status_text = "Looking for **(REF)"
        Me.Repaint
        Open Fullname For Input As #1
        Found_keys = False
        Line Input #1, Laligne
        Do While Not EOF(1) And Found_keys = False
          Pos_REF = InStr(1, Laligne, "**(REF)", vbTextCompare)
          If Pos_REF > 0 Then
            Found_keys = True
           Else
           Line Input #1, Laligne
          End If
        Loop
     
     
        ref = ""
        refx = ""
        Mail = ""
        Mailcc = ""
        Mailbcc = ""
        Subject = ""
        Attachement_brut = ""
        ReDim Body(1)
        BSize = 0
        Attachement_file = ""
        Ps_file = ""
        Fax_file = ""
        PhWnd = 0
        If Found_keys Then
            Me.Status_text = "Extracting Data"
            Me.Repaint
            tablKeys = Split(Laligne, ",")
            Line Input #1, Laligne
            tablVar = Split(Laligne, ",")
     
            For elem = 0 To UBound(tablKeys)
                'Debug.Print Trim(tablKeys(elem)) & " - "; Trim(tablVar(elem))
                Select Case Trim(tablKeys(elem))
                    Case "**(REF)"
                        ref = Trim(tablVar(elem))
                    Case "**(REFX)"
                        refx = Trim(tablVar(elem))
                    Case "**(MAIL)"
                        If Me.Debug_Sw Then
                         Mail = "Thierry.Schmitz@hydro.com"
                        Else
                         Mail = Unquote(Trim(tablVar(elem)))
                        End If
                    Case "**(MAILCC)"
                        If Not Me.Debug_Sw Then
                         Mailcc = Unquote(Trim(tablVar(elem)))
                        End If
                    Case "**(MAILBCC)"
                        If Not Me.Debug_Sw Then
                         Mailbcc = Unquote(Trim(tablVar(elem)))
                        End If
                    Case "**(SUBJECT)"
                        Subject = Trim(tablVar(elem))
                    Case "**(BODY)", "**(BODY1)", "**(BODY2)", "**(BODY3)", "**(BODY4)", "**(BODY5)", "**(BODY6)", "**(BODY7)", "**(BODY8)", "**(BODY9)", "**(BODY10)"
                        BSize = BSize + 1
                        ReDim Preserve Body(BSize)
                        Body(BSize - 1) = Unquote(Trim(tablVar(elem)))
                    Case "**MXATTACHD"
                        Attachement_brut = Unquote(Trim(tablVar(elem)))
                        Attachement = Split(Attachement_brut, ".")
                        Attachement_ext = Attachement(1)
                        Fax_file = Attachement(0) & "." & "INI"
                        If Attachement_ext = "PS" Then
                          Me.Status_text = "Converting Postscript to PDF"
                          Me.Repaint
                          Ps_file = Attachement_brut
                          Pdf_file = Attachement(0) & "." & "Pdf"
                          res = Application.Run("GSAPI_VBA.XLS!Convertfile", Attachement_brut, Pdf_file)
                          Attachement_brut = Pdf_file
                        End If
                        Attachement_file = Attachement_brut
                        'Move Attachement to Attachement_Folder
                        Me.Status_text = "Moving Attachement for FAX*STAR"
                        Me.Repaint
                        Attachement = Split(Attachement_brut, "\")
                        Destination = Attachement_Folder & Attachement(UBound(Attachement))
                        Mxattach_name = Attachement(UBound(Attachement))
                        On Error Resume Next
                        FileCopy Attachement_brut, Destination
                        If Err.Number = 76 Then
                          MsgBox (Destination & " Path/drive not available. Process Halted")
                          Close #1
                          Exit Sub
                        End If
                        'Close View Previous Attachment and remove it
                        If P_Attachement_file <> "" Then
                           Me.Status_text = "Removing " & P_Attachement_file & " File"
                           Me.Repaint
                           If P_PhWnd <> 0 Then
                             'Close default Viewer if openedt
                             'Call CloseProgram(P_PhWnd)
                             'DoEvents
                           End If
                           Me.AcroPDF1.LoadFile ("G:\Emballage\Format\Hydro.pdf")
                           DoEvents
                           Me.Repaint
                           On Error Resume Next
                           If Not Me.Debug_Sw Then
                             Kill P_Attachement_file
                           End If
                           DoEvents
                        End If
                        P_Attachement_file = ""
                        P_PhWnd = 0
     
                        Application.Wait (Now + TimeValue("0:00:02"))
                        '*************************************
                        'Show Attachement With Default Viewer
                        'PhWnd = OpenProgram(Attachement_file, 0)
                        'Excel premier Plan
                        'AppActivate "Microsoft Excel"
                        Me.AcroPDF1.LoadFile (Attachement_file)
                        DoEvents
                        Me.Repaint
     
                End Select
            Next
     
            'Formattage Fichier sortie
            If Mail <> "" And Attachement_brut <> "" Then
               Me.Status_text = "Formatting Fax File"
               Me.Repaint
               Open Fax_file For Output As #2
               Laligne = "**(REF) " & ref
               Print #2, Laligne
               If refx <> "" Then
                  Laligne = "**(REFX) " & refx
                  Print #2, Laligne
               End If
               Laligne = "**(MAIL) " & Mail
               Print #2, Laligne
               If Mailcc <> "" Then
                  Laligne = "**(MAILCC) " & Mailcc
                  Print #2, Laligne
               End If
               If Mailbcc <> "" Then
                  Laligne = "**(MAILBCC) " & Mailbcc
                  Print #2, Laligne
               End If
               If Subject <> "" Then
                  Laligne = "**(SUBJECT) " & Subject
                  Print #2, Laligne
               End If
               For elem = 1 To BSize
                  Laligne = Trim(Body(elem - 1))
                  Print #2, Laligne
               Next
               Print #2, " "
               Laligne = "**MXATTACHD " & Mxattach_name
               Print #2, Laligne
               Print #2, " "
               Close #2
               Me.Status_text = "Printing to Fax*Star"
               Me.Repaint
               Operation = "lpr -S 149.209.142.14 -P faxstar " & Fax_file
               shell_res = Shell(Operation, vbNormalFocus)
               DoEvents
               Worksheets("Parms").Range("C20") = Worksheets("Parms").Range("C20") + 1
               Me.Fax_Sent = Worksheets("Parms").Range("C20")
               Worksheets("Parms").Range("C21") = Worksheets("Parms").Range("C21") + 1
               Me.Fax_Sent_Cumulated = Worksheets("Parms").Range("C21")
              Else
                Close #2
            End If
        End If
        Close #1
        Me.Status_text = "Removing " & Found_entry & " File"
        Me.Repaint
        'If Not Me.Debug_Sw Then
           On Error Resume Next
           Kill Fullname
        'End If
     
        If Ps_file <> "" Then
            Me.Status_text = "Removing " & Ps_file & " File"
            Me.Repaint
            If Not Me.Debug_Sw Then
              On Error Resume Next
              Kill Ps_file
            End If
        End If
     
     
        Me.Status_text = "Pause 2 sec"
        Application.Wait (Now + TimeValue("0:00:02"))
        Me.Repaint
     
        If Fax_file <> "" Then
            Me.Status_text = "Removing " & Fax_file & " File"
            Me.Repaint
            On Error Resume Next
            Kill Fax_file
        End If
     
        'Backup ID Task View Attachement & Attachement name
        P_PhWnd = PhWnd
        P_Attachement_file = Attachement_file
        Found_entry = Dir    ' Get next entry.
       Loop
     
       If BStop = False Then
         Me.Status_text = "Waiting 5 sec before Polling"
         Application.Wait (Now + TimeValue("0:00:05"))
         Me.Repaint
       End If
       DoEvents
     Loop
     
    'Close View Last Attachment and remove it
    If Attachement_file <> "" Then
       Me.Status_text = "Removing " & Attachement_file & " File"
       Me.Repaint
       If PhWnd <> 0 Then
         'Close default Viewer if openedt
         'Call CloseProgram(PhWnd)
         'DoEvents
       End If
       Me.AcroPDF1.LoadFile ("G:\Emballage\Format\Hydro.pdf")
       DoEvents
       Me.Repaint
       If Not Me.Debug_Sw Then
          On Error Resume Next
          Kill Attachement_file
             DoEvents
       End If
     
    End If
    Attachement_file = ""
    PhWnd = 0
     
    End Sub
     
    Private Sub Stop_Polling_Click()
    'Xl_plein_ecran
     
    'Disable
    Me.Stop_Polling.Visible = False
    'Enable
    Me.Start_Polling.Visible = True
    Me.Open_Parm_Userform.Visible = True
    Me.Password.Visible = True
    'text
    Me.Status_text = "*Stopped"
     
    BStop = True
     
    Me.Started_Box = "Stopped at " & CStr(Now())
    End Sub

  2. #2
    Membre Expert
    Avatar de zazaraignée
    Profil pro
    Étudiant
    Inscrit en
    Février 2004
    Messages
    3 174
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2004
    Messages : 3 174
    Par défaut
    T'as essayé de mettre un (ou quelques) points d'arrêt dans ton code (tu cliques dans la marge) et de démarrer en mode Debug (F8 à partir du point d'arrêt)?

  3. #3
    Membre Expert Avatar de Godzestla
    Homme Profil pro
    Chercheur de bonheur
    Inscrit en
    Août 2007
    Messages
    2 403
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : Belgique

    Informations professionnelles :
    Activité : Chercheur de bonheur
    Secteur : Industrie

    Informations forums :
    Inscription : Août 2007
    Messages : 2 403
    Par défaut
    Citation Envoyé par zazaraignée Voir le message
    T'as essayé de mettre un (ou quelques) points d'arrêt dans ton code (tu cliques dans la marge) et de démarrer en mode Debug (F8 à partir du point d'arrêt)?
    Salut Zazaraignée,

    c'est très difficile à réaliser car ce code fonctionne tout seul , vu qu'il sert de serveur d'envoi d'email.

    Il fonctionne jusqu'à un moment n et puis crac.

    Si je suis en debug, aucun soucis apparent.
    Je crois même avoir détecté qu'il se plante à un moment ou il n'a plus rien à traiter, comme si la boucle d'attente seule avec me.repaint lui posait des problèmes.

  4. #4
    Membre Expert
    Avatar de zazaraignée
    Profil pro
    Étudiant
    Inscrit en
    Février 2004
    Messages
    3 174
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2004
    Messages : 3 174
    Par défaut
    Je n'ai pas d'idée précise pour t'aider en ce moment. Mais après un survol rapide de ton code, je constate que ta procédure Start_Polling_Click est plutôt longue et contient plusieurs structures conditionnelles et itératives. Je crois qu'il vaudrait mieux séparer tout ça en plusieurs procédures, et si nécessaire, passer des valeurs en arguments, quitte à devoir les mettre explicitement ByRef ou ByVal selon que tu veuilles ou non que la valeur passée soit modifiée par la procédure ou utilisée telle quelle sans qu'elle soit modifiée à la fin de la procédure en question.

    Fais toi d'abord une copie du code original, des fois que les modifications s'avèreraient catastrophiques. Une fois les modifications faites, il te sera plus facile de voir ce qui cloche.

    Pour les Me.Repaint, j'ai vu qu'il y en avait à plusieurs endroits. Serait-il possible de ne rafraichir que le contrôle concerné sur le moment plutôt que tout le UserForm? Enfin... c'est comme je dis, je n'ai regardé ton code que sommairement... n'ayant pas toutes les procédures ni de pdf exemple sous la main pour pouvoir tester.

  5. #5
    Membre Expert Avatar de Godzestla
    Homme Profil pro
    Chercheur de bonheur
    Inscrit en
    Août 2007
    Messages
    2 403
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : Belgique

    Informations professionnelles :
    Activité : Chercheur de bonheur
    Secteur : Industrie

    Informations forums :
    Inscription : Août 2007
    Messages : 2 403
    Par défaut
    Merci Zazaraignée,

    j'ai fait comme tu suggérais, enfin je pense.

    J'ai maintenant le code du userform plus court avec la boucle qui appelle une fonction de traitement située dans un module en passant tous les paramètres nécessaire.
    J'ai réduit au maximum les Me.Repaint.

    J'ai également éliminé le contrôle AdobePdf en qui je n'avais qu'une confiance limitée (car très peu de documentation disponible sur le net) et je l'ai remplacé par un appel via ShellExecuteEx à Adobe Viewer pour afficher mon PDF ce qui me permet de fermer cette fenêtre automatiquement à la prochaine itération.

    Le nouveau code est en test depuis peu et je ne sais pas encore dire s'il est plus stable, mais si l'appli tourne encore demain matin, cela sera bon signe.

    Si c'est le cas, demain ce sera

    Pour info voici le nouveau code.

    Userform
    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
     
    Dim BStop As Boolean
     
     
     
    Private Sub UserForm_Initialize()
    Me.StartUpPosition = 3
     'Disable
    Me.Stop_Polling.Visible = False
    'Enable
    Me.Start_Polling.Visible = True
    Me.Open_Parm_Userform.Visible = True
    'text
    Me.Status_text = "*Stopped"
    'last File
    Me.Last_File_Name = ""
    'Scanning_name
    Me.Scanning_Name = ""
     
    'Fax Sent
    Worksheets("Parms").Range("C20") = 0
    Me.Fax_Sent = Worksheets("Parms").Range("C20")
    'Fax Sent Cumulated
    Me.Fax_Sent_Cumulated = Worksheets("Parms").Range("C21")
     
    Search_file = Folder & Trim(Worksheets("Parms").Range("C3"))
     
    '09/10 Me.AcroPDF1.LoadFile ("G:\Emballage\Format\Hydro.pdf")
    DoEvents
    Me.Repaint
     
    'Retrieve Debug_mode
    Me.Debug_Sw = Worksheets("Parms").Range("C22")
     
    End Sub
     
    Private Sub Open_Parm_Userform_Click()
    If Me.Password <> "Secret1" Then
     MsgBox "Please Specify a valid password at the right of this button and retry", vbCritical
     Else
      UserForm1.Show
      'Retrieve Debug_mode
      Me.Debug_Sw = Worksheets("Parms").Range("C22")
    End If
    End Sub
     
    Private Sub Start_Polling_Click()
    Dim Folder  As String               'Folder To browse
    Dim Search_file As String           'Pattern File to search for in Folder
    Dim Found_Entry As String           'Found File name
    Dim Fullname    As String           'FullName of Found File
    Dim Rech        As String
    Dim Found_keys  As Boolean
    Dim Pos_REF     As Integer          'Position of first **REF in record
    Dim elem        As Integer
    Dim ref         As String
    Dim refx        As String
    Dim Mail        As String
    Dim Mailcc      As String
    Dim Mailbcc     As String
    Dim Subject     As String
    Dim Body()      As String
    Dim BSize       As Integer
    Dim Attachement_folder As String    'Folder where to store attachement
    Dim Attachement() As String
    Dim Attachement_ext As String
    Dim Attachement_brut As String
    Dim O_Attachement_file As String
    Dim Mxattach_name    As String
    Dim Operation   As String
    Dim Pdf_file    As String
    Dim Ps_file     As String
    Dim res         As Boolean
    Dim shell_res   As Variant
    Dim lng         As Integer
    Dim Laligne As String, tablKeys As Variant, tablVar As Variant
    Dim Where_pos As Long
    Dim End_Where As Long
    Dim beg_ligne As String
    Dim End_ligne As String
     
     
    Dim Sent_Status As Boolean
     
    Dim P_Phwnd   As Long
     
     
     
     
     
    'Mapping X pour attachement
    map_mxattach
     
     
    'Disable
    Me.Start_Polling.Visible = False
    Me.Open_Parm_Userform.Visible = False
    Me.Password.Visible = False
    'Enable
    Me.Stop_Polling.Visible = True
    'text
    Me.Status_text = "Polling"
     
    Me.Started_Box = "Started at " & CStr(Now())
     
    BStop = False
     
    '*****************************************************************
    '* Send PDF Labels Using FAX*STAR                                *
    '*****************************************************************
     
    '1. Retrieve Folder to browse
     
    Folder = Worksheets("Parms").Range("C2")
    If Right(Folder, 1) <> "\" Then
        Folder = Trim(Folder) & "\"
    End If
     
    '2. Retrieve Pattern File to browse
     
    Search_file = Folder & Trim(Worksheets("Parms").Range("C3"))
    Me.Scanning_Name = Search_file
    Me.Repaint
     
     
    '3. Retrieve Folder where to store attachement for FAXSTAR (MXATTACH)
     
    Attachement_folder = Trim(Worksheets("Parms").Range("C4"))
    If Right(Attachement_folder, 1) <> "\" Then
        Attachement_folder = Trim(Attachement_folder) & "\"
    End If
     
    '4. Loop until button Stop used
     
    Do While BStop = False
     
     DoEvents
     'text
     Me.Status_text = "Polling"
     Me.Repaint
     '5. Browse Folder until end of sources files or Button Stop used.
     
     Found_Entry = Dir(Search_file, vbNormal)
     
     
      Do While Found_Entry <> "" And BStop = False   ' Start the loop.
     
     
        Sent_Status = Send_1_File(Folder, Found_Entry, Attachement_folder, Me.Debug_Sw, P_Phwnd, O_Attachement_file)
        If Not Sent_Status Then Exit Sub
     
        Me.Last_File_Name = Folder & Trim(Found_Entry)
     
        Worksheets("Parms").Range("C20") = Worksheets("Parms").Range("C20") + 1
        Me.Fax_Sent = Worksheets("Parms").Range("C20")
        Worksheets("Parms").Range("C21") = Worksheets("Parms").Range("C21") + 1
     
     
     
        Found_Entry = Dir    ' Get next entry.
       Loop
     
       If BStop = False Then
         Me.Status_text = "Waiting 10 sec before Polling"
         Application.Wait (Now + TimeValue("0:00:10"))
         Me.Repaint
       End If
       DoEvents
     Loop
     
    'Close View Last Attachment and remove it
    If O_Attachement_file <> "" Then
       Me.Status_text = "Removing " & O_Attachement_file & " File"
       Me.Repaint
       If P_Phwnd <> 0 Then
         'Close default Viewer if openedt
         Call CloseProgram(P_Phwnd)
         DoEvents
       End If
       DoEvents
       Me.Repaint
       If Not Me.Debug_Sw Then
          On Error Resume Next
          Kill O_Attachement_file
          DoEvents
       End If
     
    End If
    O_Attachement_file = ""
    PhWnd = 0
     
    End Sub
     
    Private Sub Stop_Polling_Click()
    'Xl_plein_ecran
     
    'Disable
    Me.Stop_Polling.Visible = False
    'Enable
    Me.Start_Polling.Visible = True
    Me.Open_Parm_Userform.Visible = True
    Me.Password.Visible = True
    'text
    Me.Status_text = "*Stopped"
     
    BStop = True
     
    Me.Started_Box = "Stopped at " & CStr(Now())
    End Sub
    Module
    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
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
     
    Option Explicit
     
    'Flags ShellExecuteEx
    Private Const SEE_MASK_NOCLOSEPROCESS = &H40
    Private Const SEE_MASK_FLAG_NO_UI = &H400
     
    'Constantes ERREUR ShellExecuteEx
    Private Const SE_ERR_FNF As Byte = 2
    Private Const SE_ERR_PNF As Byte = 3
    Private Const SE_ERR_ACCESSDENIED As Byte = 5
    Private Const SE_ERR_OOM As Byte = 8
    Private Const SE_ERR_SHARE As Byte = 26
    Private Const SE_ERR_ASSOCINCOMPLETE As Byte = 27
    Private Const SE_ERR_DDETIMEOUT As Byte = 28
    Private Const SE_ERR_DDEFAIL As Byte = 29
    Private Const SE_ERR_DDEBUSY As Byte = 30
    Private Const SE_ERR_NOASSOC As Byte = 31
    Private Const SE_ERR_DLLNOTFOUND As Byte = 32
     
    'Constantes AFFICHAGE ShellExecuteEx
    Private Const SW_SHOWNORMAL = 1
    Private Const SW_SHOW = 5
    Private Const SW_SHOWDEFAULT = 10
     
    Private Type SHELLEXECUTEINFO
        cbSize As Long
        fMask As Long
        hWnd As Long
        lpVerb As String
        lpFile As String
        lpParameters As String
        lpDirectory As String
        nShow As Long
        hInstApp As Long
        lpIDList As Long
        lpClass As String
        hkeyClass As Long
        dwHotKey As Long
        hIcon As Long
        hProcess As Long
    End Type
     
    'OpenProgram
    Private Declare Function ShellExecuteEx Lib "shell32.dll" _
    (SEI As SHELLEXECUTEINFO) As Long
     
     
    'CloseProgram
    Private Declare Function CloseHandle Lib "kernel32" _
    (ByVal hObject As Long) As Long
     
    Private Declare Function TerminateProcess Lib "kernel32" _
    (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
     
    Private Declare Sub Sleep Lib "kernel32" _
    (ByVal dwMilliseconds As Long)
     
    Public Const WM_CLOSE = &H10
    Const GW_HWNDNEXT = 2
    Dim mWnd                    As Long
    Dim PhWnd                   As Long
    Dim P_Attachement_file      As String
    Private AppCible            As String
     
     
    ' ***********************************************************
    ' *
    ' * Lance le programme par défaut associé à un fichier (en fonction de son
    ' * extension ) et retourne le hWnd de la fênetre du programme lançé.
    ' *
    ' ***********************************************************
     
    Public Function OpenProgram(ByRef Filename As String, ByRef OwnerhWnd As Long) As Long
        Dim SEI As SHELLEXECUTEINFO
     
        On Error GoTo ErrorHandler
     
        'Vérifie si le fichier à lancer est un exécutable (.exe)
        If GetExtension(Filename) = "exe" Then
            If vbNo = MsgBox("ATTENTION, êtes-vous sûr de vouloir lancer ce programme exécutable ?", vbExclamation + vbYesNo) _
            Then
                OpenProgram = 0
                Exit Function
            End If
        End If
     
        With SEI
            .cbSize = Len(SEI)
            .fMask = SEE_MASK_NOCLOSEPROCESS Or SEE_MASK_FLAG_NO_UI
            .hWnd = OwnerhWnd
            .lpVerb = "open"
            .lpFile = Filename
            .lpParameters = vbNullChar
            .lpDirectory = vbNullChar
            .nShow = SW_SHOW
            .hInstApp = OwnerhWnd
        End With
     
        OpenProgram = ShellExecuteEx(SEI)
     
        If SEI.hInstApp <= 32 Then
        'Erreurs
            OpenProgram = 0
     
            Select Case SEI.hInstApp
                Case SE_ERR_FNF
                    OpenProgram = SEI.hProcess
                Case SE_ERR_PNF
                    MsgBox "Le chemin du fichier à ouvrir est incorrect.", vbExclamation
                Case SE_ERR_ACCESSDENIED
                    MsgBox "Accès au fichier refusé.", vbExclamation
                Case SE_ERR_OOM
                    MsgBox "Mémoire insuffisante.", vbExclamation
                Case SE_ERR_DLLNOTFOUND
                    MsgBox "Dynamic-link library non trouvé.", vbExclamation
                Case SE_ERR_SHARE
                    MsgBox "Le fichier est déjà ouvert.", vbExclamation
                Case SE_ERR_ASSOCINCOMPLETE
                    MsgBox "Information d'association du fichier incomplète.", vbExclamation
                Case SE_ERR_DDETIMEOUT
                    MsgBox "Opération DDE dépassée.", vbExclamation
                Case SE_ERR_DDEFAIL
                    MsgBox "Opération DDE echouée.", vbExclamation
                Case SE_ERR_DDEBUSY
                    MsgBox "Opération DDE occupée.", vbExclamation
                Case SE_ERR_NOASSOC
                    'Ouvrir avec...
                    Call Shell("rundll32.exe shell32.dll,OpenAs_RunDLL " + Filename, vbNormalFocus)
            End Select
        Else
            'Retourne le hWnd du programme lançé par ShellExecuteEx
            OpenProgram = SEI.hProcess
        End If
     
        Exit Function
    ErrorHandler:
        OpenProgram = 0
    End Function
     
    ' ***********************************************************
    ' *
    ' * Ferme un programme à partir du hWnd de sa fenêtre.
    ' *
    ' ***********************************************************
     
    Public Function CloseProgram(hWnd As Long) As Boolean
        Dim lExitCode As Long
     
        If hWnd = 0 Then
            Exit Function
        End If
     
        On Error Resume Next
        CloseProgram = CBool(TerminateProcess(hWnd, lExitCode))
        'On Error Resume Next
        CloseHandle hWnd
        DoEvents
        Sleep (100)
     
    End Function
     
    Public Function GetExtension(Filename As String) As String
    Dim tablo() As String
    tablo = Split(Filename, ".")
    GetExtension = tablo(UBound(tablo))
    End Function
     
    Function Unquote(MyString As Variant) As Variant
    Dim lng As Integer
    lng = Len(Trim(MyString))
    If lng > 2 Then
        Unquote = Mid(Trim(MyString), 2, lng - 2)
      Else
        Unquote = " "
    End If
     
    End Function
    Sub Z_hide_Show_Parm()
    Dim status As Boolean
    If Worksheets("Parms").Range("C17") = True Then
        Worksheets("Parms").Range("C17") = False
     Else
        Worksheets("Parms").Range("C17") = True
    End If
     
    status = Worksheets("Parms").Range("C17")
    Worksheets("Parms").Visible = status
    End Sub
     
    Function Send_1_File(Folder As String, Found_Entry As String, Attachement_folder As String, Debug_Sw As Boolean, P_Phwnd As Long, Attachement_file As String) As Boolean
     
    Dim Fullname    As String           'FullName of Found File
    Dim Rech        As String
    Dim Found_keys  As Boolean
    Dim Pos_REF     As Integer          'Position of first **REF in record
    Dim elem        As Integer
    Dim ref         As String
    Dim refx        As String
    Dim Mail        As String
    Dim Mailcc      As String
    Dim Mailbcc     As String
    Dim Subject     As String
    Dim Body()      As String
    Dim BSize       As Integer
    Dim Attachement() As String
    Dim Attachement_ext As String
    Dim Attachement_brut As String
    Dim Mxattach_name    As String
    Dim Destination      As String
    Dim Operation   As String
    Dim Pdf_file    As String
    Dim Ps_file     As String
    Dim res         As Boolean
    Dim shell_res   As Variant
    Dim lng         As Integer
    Dim Laligne As String, tablKeys As Variant, tablVar As Variant
    Dim Where_pos As Long
    Dim End_Where As Long
    Dim beg_ligne As String
    Dim End_ligne As String
    Dim Fax_file  As String
     
     
     
    Send_1_File = True
     
     
    '*****************************************************************
    '* Send PDF Labels Using FAX*STAR                                *
    '*****************************************************************
     
        Fullname = Folder & Found_Entry
        Open Fullname For Input As #1
        Found_keys = False
        Line Input #1, Laligne
        Do While Not EOF(1) And Found_keys = False
          Pos_REF = InStr(1, Laligne, "**(REF)", vbTextCompare)
          If Pos_REF > 0 Then
            Found_keys = True
           Else
           Line Input #1, Laligne
          End If
        Loop
     
     
        ref = ""
        refx = ""
        Mail = ""
        Mailcc = ""
        Mailbcc = ""
        Subject = ""
        Attachement_brut = ""
        ReDim Body(1)
        BSize = 0
        Attachement_file = ""
        Ps_file = ""
        Fax_file = ""
     
        If Found_keys Then
            tablKeys = Split(Laligne, ",")
            Line Input #1, Laligne
            tablVar = Split(Laligne, ",")
     
            For elem = 0 To UBound(tablKeys)
                'Debug.Print Trim(tablKeys(elem)) & " - "; Trim(tablVar(elem))
                Select Case Trim(tablKeys(elem))
                    Case "**(REF)"
                        ref = Trim(tablVar(elem))
                    Case "**(REFX)"
                        refx = Trim(tablVar(elem))
                    Case "**(MAIL)"
                        If Debug_Sw Then
                         Mail = "Mymail"
                        Else
                         Mail = Unquote(Trim(tablVar(elem)))
                        End If
                    Case "**(MAILCC)"
                        If Not Debug_Sw Then
                         Mailcc = Unquote(Trim(tablVar(elem)))
                        End If
                    Case "**(MAILBCC)"
                        If Not Debug_Sw Then
                         Mailbcc = Unquote(Trim(tablVar(elem)))
                        End If
                    Case "**(SUBJECT)"
                        Subject = Trim(tablVar(elem))
                    Case "**(BODY)", "**(BODY1)", "**(BODY2)", "**(BODY3)", "**(BODY4)", "**(BODY5)", "**(BODY6)", "**(BODY7)", "**(BODY8)", "**(BODY9)", "**(BODY10)"
                        BSize = BSize + 1
                        ReDim Preserve Body(BSize)
                        Body(BSize - 1) = Unquote(Trim(tablVar(elem)))
                    Case "**MXATTACHD"
                        Attachement_brut = Unquote(Trim(tablVar(elem)))
                        Attachement = Split(Attachement_brut, ".")
                        Attachement_ext = Attachement(1)
                        Fax_file = Attachement(0) & "." & "INI"
                        If Attachement_ext = "PS" Then
                          Ps_file = Attachement_brut
                          Pdf_file = Attachement(0) & "." & "Pdf"
                          res = Application.Run("GSAPI_VBA.XLS!Convertfile", Attachement_brut, Pdf_file)
                          Attachement_brut = Pdf_file
                        End If
                        Attachement_file = Attachement_brut
                        'Move Attachement to Attachement_Folder
                        Attachement = Split(Attachement_brut, "\")
                        Destination = Attachement_folder & Attachement(UBound(Attachement))
                        Mxattach_name = Attachement(UBound(Attachement))
                        On Error Resume Next
                        FileCopy Attachement_brut, Destination
                        If Err.Number = 76 Then
                          MsgBox (Destination & " Path/drive not available. Process Halted")
                          Close #1
                          Send_1_File = False
                          Exit Function
                        End If
                        'Close View Previous Attachment and remove it
                        If P_Attachement_file <> "" Then
                           If PhWnd <> 0 Then
                             'Close default Viewer if openedt
                             Call CloseProgram(PhWnd)
                             DoEvents
                           End If
                           On Error Resume Next
                           If Not Debug_Sw Then
                             Kill P_Attachement_file
                           End If
                           DoEvents
                        End If
                        P_Attachement_file = ""
                        PhWnd = 0
     
                        Application.Wait (Now + TimeValue("0:00:01"))
                        '*************************************
                        'Show Attachement With Default Viewer
                        PhWnd = OpenProgram(Attachement_file, 0)
                        P_Phwnd = PhWnd
     
                        'Excel premier Plan
                        AppActivate "Microsoft Excel"
                        DoEvents
     
                End Select
            Next
     
            'Formattage Fichier sortie
            If Mail <> "" And Attachement_brut <> "" Then
               Open Fax_file For Output As #2
               Laligne = "**(REF) " & ref
               Print #2, Laligne
               If refx <> "" Then
                  Laligne = "**(REFX) " & refx
                  Print #2, Laligne
               End If
               Laligne = "**(MAIL) " & Mail
               Print #2, Laligne
               If Mailcc <> "" Then
                  Laligne = "**(MAILCC) " & Mailcc
                  Print #2, Laligne
               End If
               If Mailbcc <> "" Then
                  Laligne = "**(MAILBCC) " & Mailbcc
                  Print #2, Laligne
               End If
               If Subject <> "" Then
                  Laligne = "**(SUBJECT) " & Subject
                  Print #2, Laligne
               End If
               For elem = 1 To BSize
                  Laligne = Trim(Body(elem - 1))
                  Print #2, Laligne
               Next
               Print #2, " "
               Laligne = "**MXATTACHD " & Mxattach_name
               Print #2, Laligne
               Print #2, " "
               Close #2
               Operation = "lpr -S 149.209.142.14 -P faxstar " & Fax_file
               shell_res = Shell(Operation, vbNormalFocus)
               DoEvents
              Else
                Close #2
            End If
        End If
        Close #1
     
        'If Not Me.Debug_Sw Then
           On Error Resume Next
           Kill Fullname
        'End If
     
        If Ps_file <> "" Then
            If Not Debug_Sw Then
              On Error Resume Next
              Kill Ps_file
            End If
        End If
     
     
        Application.Wait (Now + TimeValue("0:00:01"))
     
     
        If Fax_file <> "" Then
            On Error Resume Next
            Kill Fax_file
        End If
     
        'Backup Attachement name
        P_Attachement_file = Attachement_file
     
     
     
    End Function
     
     
     
    Sub map_mxattach()
    Dim Operation   As String
    Dim shell_res   As Variant
     
    Operation = "net use X: \\149.209.142.14\faxstar_xattach /PERSISTENT:NO "
    shell_res = Shell(Operation, vbNormalFocus)
    DoEvents
    End Sub
     
    Sub Xl_réduit()
    'réduit la fenêtre et la positionne
    'dans le coin supérieur gauche
        With Application
            .WindowState = xlNormal
            .Width = 300
            .Height = 300
            .Top = 0
            .Left = 0
        End With
    End Sub
     
    Sub Xl_plein_ecran()
    'redimensionne la fenêtre en plein écran
        Application.WindowState = xlMaximized
    End Sub
     
    Sub relaunch()
    Worksheets("Sheet1").Activate
    'Réduit Excel'
    Xl_réduit
    UserForm2.Show
    End Sub

  6. #6
    Membre Expert Avatar de Godzestla
    Homme Profil pro
    Chercheur de bonheur
    Inscrit en
    Août 2007
    Messages
    2 403
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : Belgique

    Informations professionnelles :
    Activité : Chercheur de bonheur
    Secteur : Industrie

    Informations forums :
    Inscription : Août 2007
    Messages : 2 403
    Par défaut
    Comme promis, je cloture vu que le code semble stable.

    Le problème devait venir des nombreux Me.Repaint , ou plus vraisemblablement du controle Adobe Pdf viewer très souvent mis à jour. (.load).

    Merci Zazaraignée. Excellente journée.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 2
    Dernier message: 05/06/2006, 16h53
  2. Problème d'execution de code dans un thread
    Par [Silk] dans le forum Langage
    Réponses: 2
    Dernier message: 06/02/2006, 13h49
  3. [Debugger] Problème de traçage de code
    Par vinny_the_true dans le forum MFC
    Réponses: 2
    Dernier message: 19/12/2005, 00h21
  4. [VB.net]problème de conversion de code c# vers VB.net
    Par cladsam dans le forum Windows Forms
    Réponses: 2
    Dernier message: 18/10/2005, 14h07

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