Send Report to Word file through VBA

R

rmcompute

Is it possible in VBA to execute a report, and save it to a word or Excel
file ? I know this can be done through the user interface.
 
D

Dirk Goldgar

rmcompute said:
Is it possible in VBA to execute a report, and save it to a word or
Excel file ? I know this can be done through the user interface.

You can get the same functionality by using DoCmd.OutputTo. You'll find
the details in the online help. You can't actually save to a Word .doc
file, but you can save to a .rtf (rich text format) file, which
preserves much of the formatting of the report. It won't include lines,
boxes, or graphics, though.
 
R

rmcompute

Thank you.

Dirk Goldgar said:
You can get the same functionality by using DoCmd.OutputTo. You'll find
the details in the online help. You can't actually save to a Word .doc
file, but you can save to a .rtf (rich text format) file, which
preserves much of the formatting of the report. It won't include lines,
boxes, or graphics, though.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Top