I'm writing a save as PDF macro and I have it working properly except for I don't want it to save sheets named "DXF" in the PDF file. Here is the code I have (from another post on here) to strip out the PDFs with DXF in the name.
'GET PDF DATA AND SAVE
Set swExportPdfData = swApp.GetExportFileData(swExportDataFileType_e.swExportPdfData)
Dim s As Variant
For Each s In swDrawDoc.GetSheetNames
If Not UCase(s) Like "*DXF*" Then
strSheetName(UBound(strSheetName)) = s
ReDim Preserve strSheetName(UBound(strSheetName) + 1)
varSheetName = strSheetName
If swExportPdfData Is Nothing Then MsgBox "Nothing"
boolstatus = swExportPdfData.SetSheets(swExportData_ExportSpecifiedSheets, varSheetName)
boolstatus = swModelDocExt.SaveAs(SavePath, 0, 0, swExportPdfData, lErrors, lWarnings)
However the DXF sheet still gets saved.