Erreur d'exécution 1004

Patient_M -  
cs_Le Pivert Messages postés 8437 Statut Contributeur -

Bonjour,

J'ai une ligne de code VBA pour convertir une feuille en PDF qui marchait bien, mais du coup ça commence à refuser et j'ignore la cause.

La voici :

Thisworkbook.Sheets("Rapport").ExportAsFixedFormat xlTypePDF, ThisWorkbook.path & Application.PathSeparator & "Paie du" & ".pdf"

Le message d'erreur est 1004

 : Document non enregistré


Android / Chrome 92.0.4515.131

1 réponse

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

    Bonjour,

    essaie ceci:

     ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
            ThisWorkbook.Path & "\Paie du.pdf", Quality:=xlQualityStandard, _
            IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
            True

    0