How do I grab the value from an Form Field in an active document and then
place that value into a User Form that has a corresponding text box. I
thought it would be something like this but I canâ??t seem to get it to work.


Private Sub UserForm1_Initialize()

Me.tbLastFirstMiddle.Value = ActiveDocument.FormFields("docLastFirstMiddle")

End Sub

RE: VBA Reading a Word Document's Form Field into a User Form Text Box by Brendan

Brendan
Tue Aug 08 18:38:01 CDT 2006

Found my own solution: Had to actually call the form [UserForm1] and forgot
the [Result] tag. Works fine.

UserForm1.tbLastFirstMiddle =
ActiveDocument.FormFields("docLastFirstMiddle").Result

"Brendan" wrote:

> How do I grab the value from an Form Field in an active document and then
> place that value into a User Form that has a corresponding text box. I
> thought it would be something like this but I canâ??t seem to get it to work.
>
>
> Private Sub UserForm1_Initialize()
>
> Me.tbLastFirstMiddle.Value = ActiveDocument.FormFields("docLastFirstMiddle")
>
> End Sub
>

Re: VBA Reading a Word Document's Form Field into a User Form Text Box by Jean-Guy

Jean-Guy
Tue Aug 08 23:44:01 CDT 2006

Brendan was telling us:
Brendan nous racontait que :

> Found my own solution: Had to actually call the form [UserForm1] and
> forgot the [Result] tag. Works fine.

Actually, you could have use the Me keyword inside the Userform Initialize
event.
You were right about the Result property though.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org