I need (want) to pass form field value from form to email action so user can enter an email address and send the document. Tried...and tried..not working..compile errors.
Private Sub CommandButton1_Click()
strSubject As String
strSendTo As String
strCCTo As String
strSubject = ActiveDocument.FormFields("Subject").Result
strSendTo = ActiveDocument.FormFields("SendTo").Result
strCCTo = ActiveDocument.FormFields("CCTo").Result
ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
.Subject (strSubject)
.AddRecipient (strSendTo)
.AddRecipient (strCCTo)
.Delivery = wdAllAtOnce
End With
ActiveDocument.Route
End Sub
Private Sub CommandButton1_Click()
strSubject As String
strSendTo As String
strCCTo As String
strSubject = ActiveDocument.FormFields("Subject").Result
strSendTo = ActiveDocument.FormFields("SendTo").Result
strCCTo = ActiveDocument.FormFields("CCTo").Result
ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
.Subject (strSubject)
.AddRecipient (strSendTo)
.AddRecipient (strCCTo)
.Delivery = wdAllAtOnce
End With
ActiveDocument.Route
End Sub