Hi guys I have a macro printing to pdf and then merging with another PDF. How can I save my DestFile to a different location than the folder where I grabbed the 2 PDF's to merge?
![]()
Please Login or Register to view this content.
Hi guys I have a macro printing to pdf and then merging with another PDF. How can I save my DestFile to a different location than the folder where I grabbed the 2 PDF's to merge?
![]()
Please Login or Register to view this content.
Instead of the following line of code, set p to whatever location you want to save it to
For example![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Thx Jazz, I keep getting a Duplicate declaration in current scope comp error though?
Oh, that's because p is already declared. So you can use
There are a few odd techniques in this code. For example, MyPath is a Const but there is an If statement checking to see if it ends in a "\".![]()
Please Login or Register to view this content.
What do you suggest to clean up the code? I am just looking to combine 2 pdf's in one folder and save the combined PDF in another folder
It's not wrong, it's just a little unusual and I'm not sure why it was done. I assume you did not write all this yourself. Try the change I suggested and see if that gets you what you need.
Thanks again Jazz, still not working tho, i'm sure something is wrong with my two folder locations and MyPath:
![]()
Please Login or Register to view this content.
Please explain what "not working" means.
- Does the code run?
- Does it run but do nothing?
- Does it produce error messages? If so, what do the messages say?
- Does it stop in the debugger? On what line of code?
- Does it produce unexpected/wrong results?
- Does it hang?
The PDF print is working to the right location but I get a "File not found" for PDF2.pdf here:
![]()
Please Login or Register to view this content.
You can't possibly get a File Not Found on that line of code. It's just a declaration with a string assignment. What line is highlighted in yellow when the error occurs?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks