In that you have ".TextBox6.Value" enclosed in quote marks, it will be
treated as a string.
Apart from not being sure that is your only problem, instead of doing the
Selection.Find business, you should either insert Bookmarks into the
template and then insert the text into the .Range of the bookmarks, or
insert {DOCVARIABLE} fields into the document and use code to set the value
of the variables and update the fields in the document.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Hi,
>
[quoted text clipped - 82 lines]
>
> Thanks.
steve.allen75@googlemail.com - 19 Feb 2007 13:20 GMT
On 19 Feb, 12:56, "Doug Robbins - Word MVP" <d...@REMOVECAPSmvps.org>
wrote:
> In that you have ".TextBox6.Value" enclosed in quote marks, it will be
> treated as a string.
[quoted text clipped - 101 lines]
>
> - Show quoted text -
Hi thanks for the reply. I appreciate that the rest of my code is not
the best, but I am trying to just get it to work generally first and
then improve later.
I've changed the code to remove the "" around .TextBox6.Value, but
that errors with Invalid or unqualified reference. I assume because I
still have the arguments set as type String.
Ignoring the rest of the code I am effectively am looking for the code
to do the following:
Dim xForm As something (where x is the name of a userform)
Dim zValue As something (where z is the value of a textbox)
zValue = xForm.TextBox6.Value
MsgBox("The value held in TextBox 6 in " & xForm & " is " zValue)
red6000 - 19 Feb 2007 13:29 GMT
Hi thanks for the reply. I appreciate that the rest of my code is not
the best, but I am trying to just get it to work generally first and
then improve later.
I've changed the code to remove the "" around .TextBox6.Value, but
that errors with Invalid or unqualified reference. I assume because I
still have the arguments set as type String.
Ignoring the rest of the code I am effectively am looking for the code
to do the following:
Dim xForm As something (where x is the name of a userform)
Dim zValue As something (where z is the value of a textbox)
zValue = xForm.TextBox6.Value
MsgBox("The value held in TextBox 6 in " & xForm & " is " zValue)
> In that you have ".TextBox6.Value" enclosed in quote marks, it will be
> treated as a string.
[quoted text clipped - 91 lines]
>>
>> Thanks.