我需要保存大约300个pdf文件,但每20-30个文件。我必须按“取消”以继续保存文件,否则宏将无法继续运行。此图像将更好地说明我的情况:
'Saving PDF FILE
Application.DisplayAlerts = False
Workbooks(Nom_Fichier_Model_MMS_ON).ExportAsFixedFormat xlTypePDF, _
Filename:=Path_CRM & site_oper & "_" & "4" & num_Canal_Dist & "_" & anneeFisc & ".pdf"
site_oper = Application.WorksheetFunction.Rept("0", 10 - Len(site_oper)) & site_oper
Workbooks(Nom_Fichier_Model_MMS_ON).ExportAsFixedFormat xlTypePDF, _
Filename:=Path_Sharepoint & site_oper & "_" & num_Client & "_MarginReport_312_" & anneeFisc & ".pdf"