Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Name the output object using the Senditem command (AXP)

    Does anyone know if there is a way to specifically name an item using the docmd.senditem method? I can see that you are allowed to call the object to output, modify all of the e-mail parameters, etc., but I cannot see if there is a way to name the output file using code.

    Here is the line I am using:
    DoCmd.SendObject acSendReport, strRPTVAR, acFormatRTF, "msantos@emailaddress.com", "mdonaldson@emailaddress.com", , "Test"
    strRPTVAR is the name of the report to run.

    Thanks,
    Mark

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

    Re: Name the output object using the Senditem command (AXP)

    No, as far as I know this is not possible using SendObject (I assume SendItem is a typo). The only way I can think of is to use the OutputTo method to create a file with a specified name, then use Automation to send this file as attachment to an e-mail message, and finally delete the file you created.

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Name the output object using the Senditem command (AXP)

    Thanks Hans,
    That leads me to the other post I made earlier. Do you have any ideas on that one? It is the post about type definition error.

    Thanks,
    Mark

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Name the output object using the Senditem command (AXP)

    I think there is a way. I thought that the name of the output file was in fact the Caption name of the report. I seem to remember doing this about three years ago.
    Try changing the caption name of the report and using the sendobject.
    Let me if know if I'm right or way off base.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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