Hi,
I'm not sure if this can be done but I have made a form and would like to
use the text entered into the text fields to populate fields throughout the
document.
eg. A field 'Company Name' on a form, which when the user inputs their
company name - say 'Microsoft' the word 'Microsoft' appears in all fields set
to be a company name field throughout the rest of the document.
Please let me know what the best way to go about this would be, I dont even
know where to start!
Thanks,
Kirrlz
Jay Freedman - 03 Nov 2006 02:42 GMT
See http://gregmaxey.mvps.org/Repeating_Data.htm.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
>Hi,
>
[quoted text clipped - 12 lines]
>
>Kirrlz
Doctorjones_md - 03 Nov 2006 16:44 GMT
This seems to work well --
You have your document (in this case -- TirePressureCheck.doc)
1. You open VBE and add a UserForm1
2 Add a ListBox1 and CommandButton1 to your form
The code for these objects are as follows:
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("Report_Number").Range _
.InsertBefore TextBox1
.Bookmarks("Date").Range _
.InsertBefore TextBox2
.Bookmarks("Location").Range _
.InsertBefore TextBox3
.Bookmarks("Spool_Details").Range _
.InsertBefore TextBox4
.Bookmarks("Pump_Pressure").Range _
.InsertBefore TextBox5
.Bookmarks("Name1").Range _
.InsertBefore ComboBox1.Text
.Bookmarks("Name2").Range _
.InsertBefore ComboBox1.Text
.Bookmarks("Name3").Range _
.InsertBefore ComboBox1.Text
End With
UserForm1.Hide
End Sub
Private Sub UserForm_Initialize()
With ComboBox1
.AddItem "George Foreman"
.AddItem "Archie Bunker"
.AddItem "Alan Greenspan"
End With
End Sub
HTH
> Hi,
>
[quoted text clipped - 15 lines]
>
> Kirrlz