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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting Reports w/ pictures to word

Status
Not open for further replies.

asenft

Programmer
Apr 24, 2001
52
US
Is there any way to Export an Access Report to Word and include the images on the report?

-Aaron
 
Easy pickins'
Create a button on whatever form you are calling the report from then use something like the following:

Code:
Private Sub btnAccessToWord_Click()
On Error GoTo Err_btnAccessToWord_Click

    Dim stDocName As String

    stDocName = "YOUR REPORT HERE"
    DoCmd.OutputTo acReport, stDocName, "Rich Text Format"

Exit_btnAccessToWord_Click:
    Exit Sub

Err_btnAccessToWord_Click:
    MsgBox Err.Description
    Resume Exit_btnAccessToWord_Click
    
End Sub

That should work for you...
 
Thanks for getting me started! That worked, except it didnt grab the images on the report. Any other ideas?

PS: Im an MKIV owner. :) Nice to see a fellow supra owner other places than supraforums.
 
Hmmmm, I am kinda stumped. Only thing I can think of is build a preformatted Word document and set it up as a merge document with the datasource being the Access DB in question. From there run a command to update the word document. Not 100% sure on how to do that.... yet but it should be pretty simple.

I tried Rich Text Format, Text and HTML and couldn't get the images I embedded to copy down either. Not sure.

As far as the Supra, she is currently collecting dust due to a BHG... again. Fun and fast but not very reliable this is the 5th BHG in 4 years. I am thinking about a Lexus V-8 with a Z1 6Spd transmission...
 
Hmm, ya i played around with it yesterday and couldn't figure out how to get the images to transfer either. I'll have to explore more.

That's too bad about the BHG. Your plans sound interesting! Or you could pick up an MKIV and not worry about the BHG issue anymore.. :)

Anyway, thanks for the help and suggestions.

Aaron
 
The short answer is: you can't.
The long answer is:
You can't export pictures directly from a report. There are several solutions available that let you export your reports as PDF files etc. They usually take the form of printer drivers that are produce the pdf files.
The only other way would be to create a word doc with bookmarks in and create some code that fills the data through automation.

Ben
 
Ben-
The pdf printer driver is interesting. Do you need to have the PDF writer program to get the printer driver, or is there a plugin or something i could use without purchasing the PDF writer?

-Aaron
 
Have a look at
it's available for free if you can put up with the adverts, or only $9.95 if you want to be ad free and you don't need to have Adobe Acrobat to use it.

I've not used it myself, but I have seen good reports.

Ben ----------------------------------
Ben O'Hara
bo104@westyorkshire.police.uk
----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top