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. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #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
  •