I have used a simple routine to create PDF files for several years.
It has worked well for many, many clients; however, a recent client is receiving the error message below. He receives the message when the Excel file is on a network drive, a cloud drive or on his Desktop. Does anyone know why he may be getting this error message?
VBA Code:
Sub BuildPDF(FileName As String, PDFSheet, Show As Boolean)
'Test if the Microsoft Add-in is installed
If Dir(Environ("commonprogramfiles") & "\Microsoft Shared\OFFICE" _
& Format(Val(Application.Version), "00") & "\EXP_PDF.DLL") = "" Then
MsgBox "PDF Add-In has not been installed", vbCritical, "Create PDF"
Exit Sub
End If
' PDFSheet.PageSetup.Orientation = xlLandscape
On Error Resume Next
PDFSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:=FileName, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=Show
On Error GoTo 0
End Sub
It has worked well for many, many clients; however, a recent client is receiving the error message below. He receives the message when the Excel file is on a network drive, a cloud drive or on his Desktop. Does anyone know why he may be getting this error message?