Convert JPG image to PDF.
Nebbu
-
Gord21 Posted messages 928 Status Membre -
Gord21 Posted messages 928 Status Membre -
Hello,
I would like to create a macro in Excel to automatically convert a large number of jpg images to PDF.
So far, I can retrieve a list of files to convert, but I can't manage to print these files with the PDF printer.
Does anyone have an idea on how to code this in Excel VBA?
(Unfortunately, it's the only programming language I know).
Thank you very much,
I would like to create a macro in Excel to automatically convert a large number of jpg images to PDF.
So far, I can retrieve a list of files to convert, but I can't manage to print these files with the PDF printer.
Does anyone have an idea on how to code this in Excel VBA?
(Unfortunately, it's the only programming language I know).
Thank you very much,
Configuration: Windows XP, Excel 2003, Acrobat 8.0
2 réponses
Good evening Nebbu,
With my setup, using Excel is quite cumbersome: when printing to PDF, I get configuration windows (file name to create, properties, ...) that pop up and I have to close them each time I print.
On your PC, you can try opening a blank workbook, starting the macro recorder, importing an image, setting up your layout, and printing it to PDF. Once the file is generated, you stop the recording. Then you edit the macro to add a loop that performs the operation on all the images.
(I don't know your level, so you've probably already done this step)
Good luck.
With my setup, using Excel is quite cumbersome: when printing to PDF, I get configuration windows (file name to create, properties, ...) that pop up and I have to close them each time I print.
On your PC, you can try opening a blank workbook, starting the macro recorder, importing an image, setting up your layout, and printing it to PDF. Once the file is generated, you stop the recording. Then you edit the macro to add a loop that performs the operation on all the images.
(I don't know your level, so you've probably already done this step)
Good luck.
Thank you for your interest in my request.
Indeed, it is also possible (with Acrobat) to convert images directly via the Windows context menu: Convert files to PDF. (I assume it's a similar principle with PDF Creator).
By going through the context menu, you then have to close the generated Acrobat files by confirming the file saving. This tedious operation can quickly become burdensome when the number of images exceeds 50 or even 100.
I wanted to make this conversion task automatic by retrieving a list of files in Excel and then running a PDF printing loop on these files.
I hope my explanation is clearer.