+ Reply to Thread
Results 1 to 1 of 1

How to send the same form to different email addresses using macros?

Hybrid View

  1. #1
    Registered User
    Join Date
    04-27-2009
    Location
    Wausau, Wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    1

    How to send the same form to different email addresses using macros?

    I have a Word form that gets send to a specific email address when it is saved, but now I want to send the same form to different email addresses based on a selection in the form. Form example if they select "yes" the form would go to one email address, but if they choose "no" it would get sent to a different email address. How do I change the macro language to accomplish this. Here is a sample of the current language:


    'create email message using the account number as the subject and delivers the
    'document to all recipients
        ActiveDocument.HasRoutingSlip = True
        With ActiveDocument.RoutingSlip
            '.Subject = ActiveDocument.FormFields("txtAcctNum").Result & " - " & ActiveDocument.FormFields("txtInsdNm").Result
            .Subject = "Cancellation Request for " & ActiveDocument.FormFields("txtInsdNm").Result
            .Message = "Please see attached Cancellation Request."
            .AddRecipient Recipient:="[email protected]"
            .Delivery = wdAllAtOnce
            .ReturnWhenDone = False
            .TrackStatus = False
        End With
    Last edited by VBA Noob; 04-27-2009 at 03:40 PM. Reason: Added code tags as per forum rules

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1