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

send report 1

Status
Not open for further replies.

canett

Technical User
Jan 22, 2006
18
BG
I can send an opened report in a word format by clicking tools-office links-publish it with msword, and i get the report in My Documents.I want to do it by code from the form where i open the report..Can somebody help me ?
 
Create a command button, and in the click event procedure use the following code

Code:
    Dim Dataexport

    Dataexport = InputBox("Export Path, do not forget to put .doc at the end of the file name", "Export Path")


    DoCmd.OutputTo acOutputReport, "REPORT_NAME", acFormatRTF, Dataexport, 

'Dataexport = just give the user an options where they would like the file created.. if you just put a file name in here, then the file would be save to the last location where the user saved something, but usually defaults to the my documents folder.


Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top