Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access report out to Word with an image in it

Status
Not open for further replies.

esmithbda

IS-IT--Management
Jun 10, 2003
304
US
We have an Access report that we output to various formats. The most common that we use are PDF and Word. The report has an image in it (company logo). When we export out to Word, it is actually making a acFormatRTF reference and creating an RTF file - which then dumps the image.

Is there a way to output a Word file with the image from Access?
Or is there a way to get RTF files to retain the images?
Or is there a way to save export into a temp RTF file, then save that as a Word file, and then add the logo to that file?

I found code that looks like it will let me do the export to a temp RTF file and then save it as a Word file - but I don't know how to do the image placement next.

Any ideas from anyone? A web search turns up that this is a seemingly common problem with no references to solutions.

We have a large batch of reports coming out that need to be in Word and not PDF (no clue why) and there are too many of them to go through and add the image in by hand for all of them.
 
This depends on how they're being used.

As general solutions, there are a few:

1. The built-in snapshot (.SNP) format, which works flawlessly, but can't be opened without the Microsoft-downloadable Snapshot Viewer program installed. But it works perfectly.

2. You can try Stephen Lebans' ReportUtilities for Access. I tried them, and they work...well, they work. There are several gotchas that you have to watch out for. Some are: once you export to MS Word, the text is not editable, as it's saved as an embedded object insde the Word document---lines do not appear, so you must use zero-height boxes to represent all lines---margin issues once you have exported the file. All three issues are from my personal experience.

But ReportUtilities works. It will do what you need, once you iron out the kinks.



Pete
 
You can also use OLE to physically create a Word document from within Access. This gets very intensive, but works like a charm. You use DOM to open an instance of word, make a page, loop through your queries and paste data as necessary. Fun stuff.
 
This text needs to be an editable document for some reason (otherwise I told them to just use PDF which is one of our output options that works well).

warthog72 - that sounds more like what I thought I would have to do.
Do you know of any good resources of examples of doing that sort of thing? It doesn't have to be exactly like what I want - but I have never created a Word document programatically, so it would be nice to have an example.

thanks all!
 
Hi,

Have you found any sample references. if so, would someone mind sharing with me?

thanx,
e
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top