1
PDF로 저장하려는 시트를 생성하는 매크로를 실행했습니다. 아래의 방법을 실행하면 내 문서가 저장되지 않았다는 오류 메시지가 나타납니다 (Run=time error '-2147024773 (8007007b)': Document not saved
).ExportAsFixedFormat을 사용하여 파일을 저장할 때 오류가 발생했습니다.
나는 그것을 제공하려고 시도하고있는 파일 이름 일 수 있다고 생각하지만 확신 할 수 없습니다. 정보
모든 변수가 공개적으로 선언
Public Sub toPDF()
PDFName = "Pinger Report_" & Format(Now, "dd/mm/yyyy hh:mm:ss")
sumPDFSheet.Cells(5, 4).Value = Format(Now, "dd/mm/yyyy hh:mm:ss")
finalPDFName = PDFPath & PDFName
'create borders around failed devices range on pdfsheet
With sumPDFSheet.Range(sumPDFSheet.Cells(24, 3), sumPDFSheet.Cells(k - 1, 5)).Borders
.LineStyle = xlContinuous
End With
'creates heading rows for each page in the pdf and centers correctly
sumPDFSheet.PageSetup.PrintTitleRows = sumPDFSheet.Rows(1).Address
sumPDFSheet.PageSetup.CenterVertically = False
sumPDFSheet.PageSetup.CenterHorizontally = True
'method call to format columns
allColumns
'save as pdf to correct folder with correct name
With sumPDFSheet
.ExportAsFixedFormat Type:=xlTypePDF, Filename:=finalPDFName, openafterpublish:=False 'ERRRORRRRRRRRRERRRR
End With
End Sub
? 지적했다. 파일 확장자에 맞았습니다. –
감사가 무엇 – Rivers31334