Skip to main content
Known Participant
July 24, 2017
Question

PDDoc.save bug? Or am I doing something wrong?

  • July 24, 2017
  • 1 reply
  • 616 views

So, I have this file with 20 something pages in it. I wrote some code to split the files into different individual files based on a bunch of file names I have put in an excel spreadsheet (like page 1 is called file XXX and page 2 is called file YYY). It worked great for a good number of the files I have, but apparently, it did not work for all files. What troubles me is that, I have the following two lines in the code. which writes to the immediate console based on the save operation, and all of these operations showed as successful. Not all the files show up in file explorer (windows) after the save. Is this a bug within the PDDoc.save function? Or is there something I missed that is causing this?

If NewPDF.Save(PDSaveLinearized, WritePath & sh.Cells(StartRow + j - 1, i).Value & ".pdf") Then

    Debug.Print sh.Cells(StartRow + j - 1, i).Value & " Success"

Else

    Debug.Print sh.Cells(StartRow + j - 1, i).Value & " Failed"

End If

I initially thought, maybe it is a blank file and the insert prior to the save statement didn't work. But I checked and getpagenum is 1 during the execution of this line, so that does not appear to be cause. With my limited knowledge, I wasn't sure what the issue may be so I thought, maybe I should just ask.

Thanks!

This topic has been closed for replies.

1 reply

silveryneAuthor
Known Participant
July 9, 2019

Yes, it's a bug.