Excel VBA: Inserting Images into documents via Macro and Quality Issues

mmarzouk

New Member
Joined
Sep 22, 2014
Messages
15
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
0down votefavorite
I am working on a macro to import images (.jpeg) from a folder into Excel. I need high quality documents to be generated from this document. Image Size and Quality settings: Do not compress images in file (not selected).
Comparing two different approaches to import the file:

  1. Insert image into excel file (using Insert tab --> Pictures)
  2. Open the .jpeg file in paint copy and paste into the excel file
Approach (2) results in a much larger size of image than approach (1). The quality of approach (2) is much better. The only problem is that I cannot create a macro to do that. Is there a way to have Excel stop compressing the picture when imported.
I end up saving the file as a XPS file printer (using Zero Losses to the images). Approach (2) matches the source .jpeg image. Approach (1) is just terrible and unusable.
Image size: 2-3 MB
I do not have a macro put together yet. This is just a proof of concept if Excel would be able to meet my image quality requirements.
Any help would be appreciated.
I am using Excel 2013. I saw that Excel 2016 had an option of 'High Fidelity'. Tried to access 2016 on another computer but could not find that option. The max. output is 330 dpi.
Excel MS Support 2016



<tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</tbody>
</body>

down votefavorite
I am working on a macro to import images (.jpeg) from a folder into Excel. I need high quality documents to be generated from this document. Image Size and Quality settings: Do not compress images in file (not selected).
Comparing two different approaches to import the file:

  1. Insert image into excel file (using Insert tab --> Pictures)
  2. Open the .jpeg file in paint copy and paste into the excel file
Approach (2) results in a much larger size of image than approach (1). The quality of approach (2) is much better. The only problem is that I cannot create a macro to do that. Is there a way to have Excel stop compressing the picture when imported.
I end up saving the file as a XPS file printer (using Zero Losses to the images). Approach (2) matches the source .jpeg image. Approach (1) is just terrible and unusable.
Image size: 2-3 MB
I do not have a macro put together yet. This is just a proof of concept if Excel would be able to meet my image quality requirements.
Any help would be appreciated.
I am using Excel 2013. I saw that Excel 2016 had an option of 'High Fidelity'. Tried to access 2016 on another computer but could not find that option. The max. output is 330 dpi.
Excel MS Support 2016



<tbody style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;">
</tbody>
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top