Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Publishing a report as a Word document (A2K)

    It is easy to run a preview of a report and manually publish it as a Word document. How can I, using VBA, run a report and have it automatically published as a Word document without manual intervention?

    Dale Napier

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Publishing a report as a Word document (A2K)

    Docmd.outputTo will do it.
    The following is copied from Help and modified slightly:

    The following example outputs the Employees report in rich-text format (.rtf) to the Employee.rtf file and immediately opens the file in Microsoft Word for Windows:

    DoCmd.OutputTo acOutputReport, "Employees", acFormatRTF, "Employee.rtf", True
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •