• Add recipient to SendMail

    Author
    Topic
    #355660

    I am using the following to e-mail the active document:

    Sub send_active_doc()

    ActiveDocument.SendMail

    End Sub

    Is there any way I can specify the recipient?

    Viewing 0 reply threads
    Author
    Replies
    • #525000

      For some reason Excel appears to allow you to specify a recipient, but not Word.
      I think you may need to add a routing slip – in the VBA window, type ‘recipient’ and hit F1 – the help screen should come up with and explanation/example:

      Recipients Property Example

      This example adds a recipient to the routing slip attached to Sales.doc and then displays the name of the first recipient.

      If Documents("Sales.doc").HasRoutingSlip = True Then 
          Documents("Sales.doc").RoutingSlip.AddRecipient _
              Recipient:="Aaron Con"
          MsgBox Documents("Sales.doc").RoutingSlip.Recipients(1)
      End If
      

      Recipients Property Example

      This example adds a recipient to the routing slip attached to Sales.doc and then displays the name of the first recipient.

      If Documents("Sales.doc").HasRoutingSlip = True Then 
          Documents("Sales.doc").RoutingSlip.AddRecipient _
              Recipient:="Aaron Con"
          MsgBox Documents("Sales.doc").RoutingSlip.Recipients(1)
      End If
      
    Viewing 0 reply threads
    Reply To: Add recipient to SendMail

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: