Hi
I have an Access report which has a page that allows for 6 jpg photographs.
The table has 6 text values, which is the file location of the photographs. The report has 6 Image controls, and I load the picture with this code:
And all is well.
However, there problems when generating the PDF. (either using the PDF export on the toolbar or through code)
1) In one case there are 3 photographs, each at 1.5Mb each. However the resulting PDF is 44Mb, which is too large for many customers email.
2) Sometimes the PDF is missing the picture. Different case with 4 photos visible in Access, only two photos appeared in the generated PDF.
Both problems are solved by using a "shrunk" copy the original photo. From my testing so far, photos below 500KB do not cause a problem. And bearing in mind that these 6 photos are on the one page, a photo will lower resolution looks just fine.
So I'm wondering is there a way to create a smaller photo through VBA?
In the form where the user selects the photo, I would notify the user that a lower resolution copy was being used.
I'm open to other suggestions as well!
Thanks
I have an Access report which has a page that allows for 6 jpg photographs.
The table has 6 text values, which is the file location of the photographs. The report has 6 Image controls, and I load the picture with this code:
Code:
For iPhotoNum = 1 To NUM_PICS
If Me("SubPhoto" & iPhotoNum) <> "" Then
Me("imgPhoto" & iPhotoNum).Picture = Me("SubPhoto" & iPhotoNum)
Else
Me("imgPhoto" & iPhotoNum).Visible = False
End If
Next
However, there problems when generating the PDF. (either using the PDF export on the toolbar or through code)
1) In one case there are 3 photographs, each at 1.5Mb each. However the resulting PDF is 44Mb, which is too large for many customers email.
2) Sometimes the PDF is missing the picture. Different case with 4 photos visible in Access, only two photos appeared in the generated PDF.
Both problems are solved by using a "shrunk" copy the original photo. From my testing so far, photos below 500KB do not cause a problem. And bearing in mind that these 6 photos are on the one page, a photo will lower resolution looks just fine.
So I'm wondering is there a way to create a smaller photo through VBA?
In the form where the user selects the photo, I would notify the user that a lower resolution copy was being used.
I'm open to other suggestions as well!
Thanks