(Msg. 1) Posted: Mon Dec 08, 2008 5:13 pm
Post subject: reLoad a form Archived from groups: microsoft>public>word>vba>userforms (more info?)
Hi
I have designed a form for Word 2007. I would like to know if it's possible
to reload a form from bookmarks data after submitting a form. I mean after I
submitted a form, I need to revise some data and I need to re open the form.
In this case, I need to have the data that has already inserted to the Doc in
the form fields.
(Msg. 2) Posted: Mon Dec 08, 2008 8:34 pm
Post subject: Re: reLoad a form [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Ali,
You can use the UserForm Initialize procedure:
Private Sub UserForm_Initialize()
'Load bookmark value in form control
Me.TextBox1.Text = ThisDocument.Bookmarks("bmOne").Range.Text
End Sub
Private Sub CommandButton1_Click()
'put form control value in document bookmark
Dim oRng As Word.Range
Set oRng = ThisDocument.Bookmarks("bmOne").Range
oRng.Text = Me.TextBox1.Text
ThisDocument.Bookmarks.Add "bmOne", oRng
Me.Hide
End Sub
Ali wrote:
> Hi
>
> I have designed a form for Word 2007. I would like to know if it's
> possible to reload a form from bookmarks data after submitting a
> form. I mean after I submitted a form, I need to revise some data and
> I need to re open the form. In this case, I need to have the data
> that has already inserted to the Doc in the form fields.
>
> Thanks
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum