remember the state of the document after closing

A

Associates

Hi,

I have a question. When user double-clicks on a template, a userform is
brought up for user to fill out the available empty fields. There are also
checkboxes in the form. After user finishes with the form, all the data will
be inserted to the variable in the document using docvariable. I have also
had a macro that allows retrieving data from document back to the form.
Everything works fine so far. Then, user may decide to edit the document
later on. So user saves and closes the document. Next time, user comes back
and opens up the same document, clicking on Editing Form button that captures
all the data from the document back to the form. However, there are some data
that don't appear in the form. This is pretty understandable because the
document has been shut and open again.

My question is there is a code that would allow document to remember at
which state it's left off. Is this a doable task in office 03?

Thank you in advance
 
D

Doug Robbins - Word MVP

If the data was all entered into the document using document variables, and
the user saved the document before closing it, then it can all be loaded
back into the form by retrieving the .Value of each variable and loading the
information into, or setting the relevant controls.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
A

Associates

Thank you Doug for your reply.

Yes, the data can be retrieved back to the form with docvariable. However,
there is something i did not mention to you (sorry about this). In the
userform, there are also a several checkboxes which would add/insert
autotexts into the documents when they are ticked or checked. So, the problem
is after closing the document and reopening it, these checkboxes obviously
won't get checked even when they should be. This is my concern.

I wonder if you'd have a better idea that might help me out.

Thank you in advance
 
D

Doug Robbins - Word MVP

Write the values of the checkboxes to document variables (as well as
inserting the autotext if appropriate), then on re-loading the form,
retrieve the values to be assigned to the checkboxes from the document
variables.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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