Hi all,
I'm building a document for the IT "Challenged" where they can make their comments into a word document, click on a button that opens the dialogue that sends it to the next person for review.
I have this set this side up ok. The code for this is below:
My problem arises when I try and include the next person's email address as a recipient.
I do this by way of a text box in the document. The code I used to test is as follows:
Where "txtCM" and "TXTSMA" values are two email addresses. The message box pops up with exactly the text that I wanted. Now when I put the two codes together as such:
I get an compile error, highlighting the".sendForReview" text stating that the named argument is already specified.
Obviously in this piece of code, it is not. Where am I going wrong?
-------------------------------------------------------------
"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
I'm building a document for the IT "Challenged" where they can make their comments into a word document, click on a button that opens the dialogue that sends it to the next person for review.
I have this set this side up ok. The code for this is below:
Code:
Private Sub CommandButton19_Click()
ActiveDocument.SendForReview , _
Subject:="REVIEW OF COURSE EVALUATION", _
ShowMessage:=True
End Sub
My problem arises when I try and include the next person's email address as a recipient.
I do this by way of a text box in the document. The code I used to test is as follows:
Code:
Private Sub CommandButton2_Click()
Dim txtmail As String
txtmail = Me.txtCM.Value & ";" & Me.txtSMA.Value
MsgBox txtmail
End Sub
Code:
Private Sub CommandButton11_Click()
Dim txtmail As String
txtmail = Me.txtCM.Value & ";" & Me.txtSMA.Value
ActiveDocument.SendForReview , _
Recipients:=txtmail, _
Subject:="REVIEW OF COURSE EVALUATION", _
ShowMessage:=True
End Sub
Obviously in this piece of code, it is not. Where am I going wrong?
-------------------------------------------------------------
"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."