VBA to save as PDF error

%3CLINGO-SUB%20id%3D%22lingo-sub-1278529%22%20slang%3D%22en-US%22%3EVBA%20to%20save%20as%20PDF%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1278529%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Guys%2C%3CBR%20%2F%3E%3CBR%20%2F%3ECan%20someone%20assist%20me%20with%20this%3F%20Whenever%20I%20run%20a%20macro%20which%20is%20to%20save%20a%20file%20to%20PDF%201%20after%20another%2C%3CBR%20%2F%3Eit%20gives%20me%20an%20error.%20for%20example%20I%20have%2010%20process%20while%20running%20it%20might%20start%20for%20the%201st%202%20file%20then%20show%20an%20error.%20Its%20really%20random%2C%20it%20could%20be%20at%20any%20other%20number.%20sometimes%20it%20doesn't%20even%20start%20and%20just%20pop%20up%20an%20error.%3CBR%20%2F%3E%3CBR%20%2F%3EHeres%20the%20error%20message.%20I%20hope%20I%20can%20get%20help%20with%20this%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%3E%3CFONT%3ERun-time%20Error'1004'%3A%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%3EYour%20file%20could%20not%20be%20printed%20due%20to%20an%20error%20on%20Adobe%20PDF%20on.%3CBR%20%2F%3EThere%20are%20several%20possible%20reasons%3A%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%3E%E2%80%A2There%20may%20not%20be%20enough%20memory%20available.%20Try%20closing%20files%20and%20programs%20you%20arent%20using%3CBR%20%2F%3E%E2%80%A2If%20you%20use%20a%20network%20for%20printing%2C%20there%20may%20be%20a%20problem%20with%20the%20network%20connection%20or%20the%20printer%20driver%3C%2FFONT%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3EJonathan%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1278529%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1278786%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20to%20save%20as%20PDF%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1278786%22%20slang%3D%22en-US%22%3EDo%20you%20have%20the%20VBA%20code%20or%20a%20sample%20workbook%2C%20so%20someone%20could%20try%20to%20troubleshoot%20the%20issue%3F%3C%2FLINGO-BODY%3E
New Contributor

Hi Guys,

Can someone assist me with this? Whenever I run a macro which is to save a file to PDF 1 after another,
it gives me an error. for example I have 10 process while running it might start for the 1st 2 file then show an error. Its really random, it could be at any other number. sometimes it doesn't even start and just pop up an error.

Heres the error message. I hope I can get help with this

Run-time Error'1004':
Your file could not be printed due to an error on Adobe PDF on.
There are several possible reasons:
•There may not be enough memory available. Try closing files and programs you arent using
•If you use a network for printing, there may be a problem with the network connection or the printer driver


Thanks,
Jonathan
1 Reply
Do you have the VBA code or a sample workbook, so someone could try to troubleshoot the issue?