Export an Access 2002 report in Word 2002

  • 13 years ago

    Hello,

    I have a report in Access 2002.  Every data is well displayed on the report but I need to export it to a Word document (2002).  Every seems correct but sometimes some data repeat itself.

    This is the code I use:

    Private Sub cmdRptGraph_Click()
    On Error GoTo Err_cmdRptGraph_Click
    Dim sName As String
    Dim stDocName As String
       
    stDocName = "rpt_Graphiste"
    DoCmd.OpenReport stDocName, acPreview





    sName = stDocName + ".doc"

    DoCmd.OutputTo acOutputReport, "rpt_Graphiste", acFormatRTF, sName, True

    Exit_cmdRptGraph_Click:
        Exit Sub

    Err_cmdRptGraph_Click:
        MsgBox Err.Description
        Resume Exit_cmdRptGraph_Click
       
    End Sub



     

    sample from Access report

    Natation-club   Level 1   8-17 years   Association   wed, th 17h to 18:30 h

                                                              514 875-7896      

     

    sample from the Word

    Natation-club   Level 1   8-17 years   Association   wed, th 17h to 18:30 h

                                                             514 875-7896

                                                             514 875-7896

     

    Can I have more control in exporting data from Access to Word...?

    Any clue why it does this "double data"...?

    Thanks

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The greatest performance improvement of all is when a system goes from not-working to working.” - John Ousterhout