I searched the forum but couldnt find a sure answer. Is PDF Creator currently not compatible with win8 as coding works fine on win7 comps but on new win8 machine no pdf is created.
Hi,
can you post your setuplog.txt here.
Does printing a testpage from the PDFcreator options still work?
PDFCreator is fully compatible with win8, it is probably a system specific problem.
regards,
Robin
Hi Robin,
It would seem I can manually print a pdf but it doesn’t produce when executing the vba code from excel. Still working perfectly on 5 win7 machines but fails only on new win8 machine. Is there any extra code or settings needed you can think of?
Hi,
do you get any kind of error messages?
Can you somehow tell at what point it gets stuck?
regards,
Robin
Dim dtWaitingtime As Date
Dim dtHr As Date, dtMnt As Date, dtSec As Date
Application.ScreenUpdating = False
With Worksheets("Quotation")
.Visible = -1 ' <- make your hidden worksheet 'visible'
Dim pdfjob As PDFCreator.clsPDFCreator
Dim sPDFName As String
Dim sPDFPath As String
Dim bRestart As Boolean
'/// Change the output file name here! ///
sPDFName = Reference & ".pdf"
sPDFPath = "Z:\\####\" & ##### & "\" & Application.PathSeparator
If Dir(sPDFPath, vbDirectory) = "" Then MkDir sPDFPath
'Check if worksheet is empty and exit if so
If IsEmpty(ActiveSheet.UsedRange) Then Exit Sub
'Activate error handling and turn off screen updates
On Error GoTo EarlyExit
Application.ScreenUpdating = False
Set pdfjob = New PDFCreator.clsPDFCreator
'Check if PDFCreator is already running and attempt to kill the process if so
Do
bRestart = False
Set pdfjob = New PDFCreator.clsPDFCreator
If pdfjob.cStart("/NoProcessingAtStartup") = False Then
'PDF Creator is already running. Kill the existing process
Shell "taskkill /f /im PDFCreator.exe", vbHide
DoEvents
Set pdfjob = Nothing
bRestart = True
End If
Loop Until bRestart = False
'Amend the PDF Name if it already exists
' If Dir(sPDFPath & sPDFName) = sPDFName Then
' sPDFName = sPDFName & "_1"
' End If
'Assign settings for PDF job
With pdfjob
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = sPDFPath
.cOption("AutosaveFilename") = sPDFName
.cOption("AutosaveFormat") = 0 ' 0 = PDF
.cClearCache
End With
'Print the document to PDF
ActiveSheet.PrintOut Copies:=1, ActivePrinter:="PDFCreator"
'Wait until the print job has entered the print queue
Do Until pdfjob.cCountOfPrintjobs = 1
DoEvents
Loop
pdfjob.cPrinterStop = False
'Wait until the file shows up before closing PDF Creator
' Do
' DoEvents
' Loop Until Dir(sPDFPath & sPDFName) = sPDFName
Application.Wait Now + TimeValue("00:00:02")
Dim str_folder As String
str_folder = "Z:\\#####\" & #### ' folder to open
Using the above code pulled from the website. I get no error messages, it shows as all the code gets executed and executes code after this point to send an email, but no physical pdf is created.