From: Peter Stone on
Thanks Doug
The problem is I don't know the name of my mainform.

The path to the control is maybe:

txtPub1.Parent.Parent.Name!txtPub1.Parent.Name!txtPub1
or
txtPub1.Parent.Parent.Name!fsubPub1.Form!txtPub1
From: Doug Robbins - Word MVP on
Try

Me.txtPub1.Value = oDoc.Range.Text

--
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, originally posted via msnews.microsoft.com

"Peter Stone" <PeterStone(a)discussions.microsoft.com> wrote in message
news:6F857C0C-9D06-4181-89FD-5778EC2E0AB4(a)microsoft.com...
> Thanks Doug
> The problem is I don't know the name of my mainform.
>
> The path to the control is maybe:
>
> txtPub1.Parent.Parent.Name!txtPub1.Parent.Name!txtPub1
> or
> txtPub1.Parent.Parent.Name!fsubPub1.Form!txtPub1

From: Peter Stone on
This may be a way to pass the control name to Word

Dim sForm As String
sForm = Screen.ActiveForm.Name
Debug.Print Forms(sForm).Controls(fsubTxt1).Form.Controls(txtPub).Value