johnj
10-02-2014, 06:40 PM
Hi there
I have this simple code which basically trying to converts Sheets in the current excel file to PDF with the help of PS file
Sub Convert(Current As Worksheet)
Dim currect As Worksheet
Dim myPDF As PdfDistiller
Dim PSFileName As String
Dim PDFFileName As String
If InStr(Current.Name, "ID") = 1 Then
PSFileName = "C:\Users\Public\Tool\PDF\" & Current.Range("b4").Value & Current.Range("b3").Value & ".ps"
PDFFileName = "C:\Users\Public\Tool\PDF\" & Current.Range("b4").Value & Current.Range("b3").Value & ".pdf"
If InStr(PSFileName, "/") Then
PSFileName = "C:\Users\Public\Tool\PDF\" & Current.Range("b3").Value & ".ps"
11.PDFFileName = "C:\Users\Public\Tool\PDF\" & Current.Range("b3").Value & ".pdf"
Else
End If
Application.CutCopyMode = False
Current.PrintOut copies:=1, preview:=False, ActivePrinter:= _
"Acrobat Distiller", printtofile:=True, Collate:=False, prtofilename:=PSFileName
'MsgBox "PSFileName : " & PSFileName
'MsgBox "PDFFileName : " & PDFFileName
' Convert the postscript file to .pdf
Set myPDF = New PdfDistiller
myPDF.FileToPDF PSFileName, PDFFileName, ""
End If
End Sub
Now I kept getting this error
"When you create a PostScript file you must rely on system fonts and use document fonts"
From other posts I tried the following steps
Click the Start menu, and then click Devices and Printers
Right-click the Adobe PDF printer, then click Printing Preferences, and then deselect Rely on system fonts only; do not use document fonts
Click OK
Right-click the Adobe PDF printer, then click Printer Properties, then click the Advanced tab, and then click Printing Defaults
On the Adobe PDF Settings tab, deselect Rely on system fonts only; do not use document fonts, and then click OK.
On the Adobe PDF Properties dialog, click OK
I still get the error, every time I am running the macro. I am on Adobe 10, windows 7, Office 2010, any suggestions?
I have this simple code which basically trying to converts Sheets in the current excel file to PDF with the help of PS file
Sub Convert(Current As Worksheet)
Dim currect As Worksheet
Dim myPDF As PdfDistiller
Dim PSFileName As String
Dim PDFFileName As String
If InStr(Current.Name, "ID") = 1 Then
PSFileName = "C:\Users\Public\Tool\PDF\" & Current.Range("b4").Value & Current.Range("b3").Value & ".ps"
PDFFileName = "C:\Users\Public\Tool\PDF\" & Current.Range("b4").Value & Current.Range("b3").Value & ".pdf"
If InStr(PSFileName, "/") Then
PSFileName = "C:\Users\Public\Tool\PDF\" & Current.Range("b3").Value & ".ps"
11.PDFFileName = "C:\Users\Public\Tool\PDF\" & Current.Range("b3").Value & ".pdf"
Else
End If
Application.CutCopyMode = False
Current.PrintOut copies:=1, preview:=False, ActivePrinter:= _
"Acrobat Distiller", printtofile:=True, Collate:=False, prtofilename:=PSFileName
'MsgBox "PSFileName : " & PSFileName
'MsgBox "PDFFileName : " & PDFFileName
' Convert the postscript file to .pdf
Set myPDF = New PdfDistiller
myPDF.FileToPDF PSFileName, PDFFileName, ""
End If
End Sub
Now I kept getting this error
"When you create a PostScript file you must rely on system fonts and use document fonts"
From other posts I tried the following steps
Click the Start menu, and then click Devices and Printers
Right-click the Adobe PDF printer, then click Printing Preferences, and then deselect Rely on system fonts only; do not use document fonts
Click OK
Right-click the Adobe PDF printer, then click Printer Properties, then click the Advanced tab, and then click Printing Defaults
On the Adobe PDF Settings tab, deselect Rely on system fonts only; do not use document fonts, and then click OK.
On the Adobe PDF Properties dialog, click OK
I still get the error, every time I am running the macro. I am on Adobe 10, windows 7, Office 2010, any suggestions?