Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2007

Tip: Looking for answers? Try searching our database.

How to add the data entered in a userform into a Text Form field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sujitg - 15 Mar 2007 19:55 GMT
Hi,
I am very new to VBA, and word macros ( learning with the help of this forum
and Diane Chapman's tutorials).

I created a userform and want to populate the contents of a text Form field
on the word form with data entered in the userform.

How do I do it?

Essentially how do I append the values to the textForm field  from the
userform?

Plz let me know if I need to explain what I am trying to do mor eclearly,

Thanks for your help

Sujit
Greg Maxey - 15 Mar 2007 21:03 GMT
Using your excute command button, use code similiar to this:

Private Sub CommandButton1_Click()
Dim oFF As FormFields
Set oFF = ActiveDocument.FormFields
oFF("Text1").Result = Me.TextBox1.Text
oFF("Text2").Result = Me.TextBox2.Text
Unload Me
End Sub

> Hi,
> I am very new to VBA, and word macros ( learning with the help of this forum
[quoted text clipped - 13 lines]
>
> Sujit
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.