Send two objects by e-mail

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ElTipo
    New Member
    • Jul 2007
    • 36

    Send two objects by e-mail

    Hello !

    I Try to send two objects reports with this code

    DoCmd.SendObjec t acReport, "TEST1", "TEST2", acFormatSNP,

    The reports are Test1 and Test2. But don't work because the comma passed to the format and the code no permit to write other object.

    How this code permit to include two objects for send in a command botton?

    Thanks everyone!
  • rdsandy
    New Member
    • Oct 2007
    • 20

    #2
    Hi ElTipo,

    I haven't used the send object before, but you say it won't work because your using the comma in a way to send two reports in the one line of code. If you put a comma in between TEST1 and TEST2, wouldn't it give the next criteria for the DoCmd.SendObjec t command?.

    If taking out the TEST2 works (see below for an example), then you could try having 2 command lines, one for TEST1 and one for TEST2.

    Something like this (although may not be correct syntax as I only removed the "TEST2" part so you will have to check):

    Code:
    DoCmd.SendObject acReport, "TEST1", acFormatSNP,
    DoCmd.SendObject acReport, "TEST2", acFormatSNP,
    HTH,

    Andrew

    Comment

    • kartikss
      New Member
      • Apr 2007
      • 25

      #3
      Hi,

      You have an option in Access ie Macro.
      In Macro, you can select SendObject from Action Column, Below you will find the details ie

      Object Type : Report
      Object Name : Report 1
      Output Format : Snapshot Format
      To: Email ID
      CC: Email ID
      BCC: Email ID
      Subject: Subject 1
      Message Text : Message
      Edit Message : Yes/No
      Templete File:

      Save the macro and run the macro

      It will work.

      Thanks

      Kartik

      Comment

      Working...