code for getting report in word from access + vba

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kunalanandsinha
    New Member
    • Mar 2008
    • 1

    #1

    code for getting report in word from access + vba

    please help me so that i can get the report in word format as present i am getting it in excel sheet but i also want the report to be generated in word format
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Originally posted by kunalanandsinha
    please help me so that i can get the report in word format as present i am getting it in excel sheet but i also want the report to be generated in word format
    Hi. You have not told us enough about what you want to do to give you any more than the most general of advice. I would suggest you check the OutputTo method which can export a report to RTF format, readable by Word. The general syntax for this in VBA is
    [code=vb]DoCmd.OutputTo acOutputReport, "your report name", acFormatRTF, "filename"[/code]
    If you really mean how can you automate your reporting using Word as an automation server to receive data transferred by VBA code from Access this is a much bigger task and one that requires considerably more clues to what you want to achieve than you have provided in your question.

    -Stewart

    Comment

    Working...