Exporting query to Microsoft Word

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jolaunt
    New Member
    • Apr 2010
    • 16

    Exporting query to Microsoft Word

    Hello

    I have an Access database and want to export a query or report to microsoft word.

    I have the following code which works fine:

    Private Sub cmdLetterToCust omer_Click()
    DoCmd.OutputTo acOutputQuery, "qryCustomerCon tact", acFormatRTF, "X:\AVKUK\Globa l Reports - DCF's etc\Customer Complaints\Mail Merge\Extracted Info\WordDocs\C ustomer Letter.doc", True
    End Sub

    I would like to be able to name each export a different name. Ideally be able to get this to be done automatically
    ie current date and CC number "2010.04.19 .CC Number 123".
    The CC number is stored in the query.

    If this cannot be done then I would like a box to come up when I press the button to run the action.

    Hope this makes sense!

    Any help would be appreciated.

    Thanks
Working...