MS WOrd userform

B

bluehawk

I have created a userfrom where the users would enter the details on
this form and it will automatically populate the underlying word doc.
I.e., name and address, etc..



My problem is that when the user re-open the word doc after having save
and close the word doc, the userform goes back to its orginal state, and
the user has to re input the form all over again.



Is there anyway for the userform to keep what ever the user has entered
after its been closed?



I.e., my userform request users to input Name and address among other
things. After pressing okay, the underlying documens will have the
name and address pre-populated.



When the user close and reopen the docs, the userform is now blank
again. And if the user presses okay, the original details are replaced
with blanks.
 
W

Wolfgang

Hi,

there is no automatism that could really help you so you
should do it all by yourself. Whenever the form shows up
(= loads), you have to initialize the controls with the
values you want to show.
This implicates that you remember the values you added the
last time this particular doc was populated. You can do
this for examples by marking the added texts with
bookmarks or by adding Variables (see -->
Word.Document.Variables) to this document.

Hope that helps
Wolfgang
 
B

bluehawk

Thanks. It looks like variables is the way to go. I'm still way too
new to VB, so I'll have to play around.



Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top