ImageFrame in Access Report

toleafs

Active Member
Joined
Jun 27, 2005
Messages
498
Hello
Any help is appreciated. I currently have an image in an access report that captures .png file obtained from a table field with an address to the shared drive: i.e.- s:\DG\207.png using the following code in the On Format property of the Details section,

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Me![ImageFrame].Picture = Me![strAppendix]

End Sub

My question is, instead of bringing in a Picture with the .png extension, I would like to bring is a pdf or word document.

Hope this makes sense.
thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I understand what you want to do but it just is not possible unless you want the PDF or Wod Doc to be shrunk down and it is only a single page.

The best way I have figure out to do what you want is to use VBA code to :
1) save the Access report to a PDF.
2) Save the Word Document as a PDF
3) Convert any other files as a PDF.

Once you have everything is converted to PDFd you can combines the PDFs together into a single PDF. Now you can print the PDF, email it, etc.

I do this all with VBA code. The user just clicks a button.
 
Upvote 0
thanks for the reply. So I assuming that the combining of the files into 1 is a manual process as I am not aware of VBA that will do that for you? Am I correct?
 
Upvote 0
I do this all with <acronym title="visual basic for applications">VBA</acronym> code. The user just clicks a button.
Nothing is manually processed.

You can use VBA and Office Automation to control Word 2007 or later to convert a document to a PDF.

Office does not have any good PDF manipulation tools built in. You will need to use third party tools. The one I I use just to combine PDFs is freeware. It is also what I used in Access 2000/202/2003 to create PDFs

See: ReportToPDF - Lebans

If you already own Acrobat full (not the free Reader) or some other similar PDF software with an API you could use it. It will require a License for each PC that needs this capability.
 
Upvote 0
as of 2007, you can assign a Path and Filename (or a field or equation containing it) to the ControlSource of an Image so modifying the Picture property with code is no longer necessary ~ not sure PDFs will work though as they aren't images

(hi Boyd)
 
Upvote 0
@Crystal, Good to see you online. Hope you are doing well. I am finally getting time to get back top eh Access forums. Hope to see you around.

Crystal's post gave me an idea, anther option would be to convert the PDF and Word documents into images. Where each page is an image taht Access can handle/ I have never tried to automate this process like I have for using PDFs.
 
Upvote 0
you're welcome. Here are the supported image formats for Attachments:

<dl><dd>BMP (Windows Bitmap)</dd><dd>RLE (Run Length Encoded Bitmap)</dd><dd>DIB (Device Independent Bitmap)</dd><dd>GIF (Graphics Interchange Format)</dd><dd>JPEG, JPG, JPE (Joint Photographic Experts Group)</dd><dd>EXIF (Exchangeable File Format)</dd><dd>PNG (Portable Network Graphics)</dd><dd>TIFF, TIF (Tagged Image File Format)</dd><dd>ICON, ICO (Icon)</dd><dd>WMF (Windows Metafile)</dd><dd>EMF (Enhanced Metafile)

... not that attachments are a good idea ... but this list probably applies to the Image Control as well ... I'll do a little more investigating ...

(thanks, Boyd -- good to see you too. check out the Microsoft MVP Virtual Conference for Access link in my siggy ~ comments are still open but closing soon)
</dd></dl>
 
Upvote 0

Forum statistics

Threads
1,221,847
Messages
6,162,380
Members
451,760
Latest member
samue Thon Ajaladin

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