Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    send to word (Access 2000)

    How can i automate the process of sending a report to a word format in MyDocuments? I use the manual proces after opening the report, by clicking Tools- OfficeLinks-Publi###### with Microsfot Word and then i get the word file in the folder MyDocuments. I want to automate the process and i want to send the report to MyDocumens automatically after i have opened the report. What could i write in order to do it ?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: send to word (Access 2000)

    Put the following code in the on click event of a button :
    <pre>DoCmd.OutputTo acReport, "MyReport", "RichTextFormat(*.rtf)", _
    "Cocuments and SettingsUserNameMy DocumentsMyReport.rtf"</pre>

    Replace MyReport and UserName with the appropriated names.
    Francois

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: send to word (Access 2000)

    In addition to Francois' reply: you can use the constant acFormatRTF instead of the string "Rich Text Format (*.rtf)".

  4. #4
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: send to word (Access 2000)

    Thank you very much ! It works fine !
    I have another question that does not belong to this thread : Is it possible to send it also through email? I know that there is a code with Outloook, but i have not it on my computer.Is it possible to send it though the GMail?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: send to word (Access 2000)

    The DoCmd.SendObject method will try to send the report (or whatever you specify) as an attachment through your default e-mail application; this cannot be a webmail service such as Gmail. You could use Outlook Express - this comes with Windows, so it should be available to you.

Posting Permissions

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