Prev: Set Cell Padding on word tables with merged cells
Next: Selecting variable amount of text in Word 2007 macro/VBA
From: Peter Stone on 14 Feb 2010 02:40 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 14 Feb 2010 04:17 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 25 Feb 2010 01:51
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 |