N
natanz
I am still working on moving data from a spreadsheet to a word file (a
document created from a template). I have successfully gotten the data
into a listbox, but now i am having trouble moving the selection into
the right place on the document. I have the following code as a click
event of the userform.
Private Sub CommandButton1_Click()
Dim projnum As String
projnum = ListBox1.Text
ActiveDocument.FormFields("text19").Result = projnum
UserForm1.Hide
MsgBox projnum
End Sub
I put the msgbox in there to see if anything was being transferred to
my variable but it looks like nothing is. Can anyone help me with what
i am doing wrong here?
i feel like it should not be significant but the template is a
protected form, where "text19" is a textbox form field.
document created from a template). I have successfully gotten the data
into a listbox, but now i am having trouble moving the selection into
the right place on the document. I have the following code as a click
event of the userform.
Private Sub CommandButton1_Click()
Dim projnum As String
projnum = ListBox1.Text
ActiveDocument.FormFields("text19").Result = projnum
UserForm1.Hide
MsgBox projnum
End Sub
I put the msgbox in there to see if anything was being transferred to
my variable but it looks like nothing is. Can anyone help me with what
i am doing wrong here?
i feel like it should not be significant but the template is a
protected form, where "text19" is a textbox form field.