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

VBA code to Export report as Snapshot or Word doc?

Status
Not open for further replies.

brettatexplace

Technical User
Mar 8, 2002
60
CA
What is the VBA code to run the Export cmd from the File menu when i have a report on the screen (can I do it all at once?)?

I need to loop through a form, calling each line to export that report saved as snapshot file on the network (or word)

open form x, start at top
loop..
open report y from the x info
export y as snapshot to file location c:\files
if eof
exit
else
go next
end loop

Is there a simple VBA such as
DoCmd.Export "y", *.snp , "C:\files"

Also what is the syntax for the eof condition on a form??

Thanks to all in advance!!!
 
Have a look at the DoCmd.OutputTo method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top