Connecting Tech Pros Worldwide Help | Site Map

Report to word doc

John
Guest
 
Posts: n/a
#1: May 24 '06
Hi

Is it possible to programmatically run a report and have the results saved
in a word file on disk? I also need the saved filename as I need to attached
it to an email in the next step.

Thanks

Regards


ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,214
#2: May 24 '06

re: Report to word doc


Quote:

Originally Posted by John

Hi

Is it possible to programmatically run a report and have the results saved
in a word file on disk? I also need the saved filename as I need to attached
it to an email in the next step.

Thanks

Regards

'A Report can be saved in a .rtf format which Microsoft Word can read
'To save rptEmployee to Test.rtf in the C:\Dell\ directory:
DoCmd.OutputTo acReport, "rptEmployee", "RichTextFormat(*.rtf)", "C:\Dell\Test.rtf", False, "", 0
GH
Guest
 
Posts: n/a
#3: May 24 '06

re: Report to word doc


John,

Have you tried DoCmd.OutputTo, which supports rich text file output?
You can include the output path and filename, giving you access to the
information immediately.

- GH

Ron2006
Guest
 
Posts: n/a
#4: May 25 '06

re: Report to word doc


>From access you can open word and put data easily into a "Bookmark". I
have never tried to dump a whole report into a bookmark, but it may be
possible. This requires a master that you have defined the bookmark in
before it is used as output.

On the surface the rtf format sounds cleanest right now.

Closed Thread