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:
Code:'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:="LewistonMMProduction@LibertyMutual.com" .Delivery = wdAllAtOnce .ReturnWhenDone = False .TrackStatus = False End With
Last edited by VBA Noob; 04-27-2009 at 04:40 PM. Reason: Added code tags as per forum rules
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks