Protection

C

Colin Chudyk

Hi,

I'm seeking advice on how to do this:

We have a macro that uses User Forms to collect data from the user and then
generate a document based on those data. This all works fine. What we would
like to do now is track all this data in an Access database. This is easy
enough to do using ADO...

BUT, we would also like to be able to go back into those macro-generated
Word documents, make changes to some fields, and have that data be updated
in the Access database. I know this is possible, but what I'm worried about
is being able to allow the user to fully manipulate the content and
formatting of the document, without deleting any fields which are used to
update data to the database.

We need to create a bullet-proof document that users can completely reformat
and edit but maintain the fields (they can't be deleted, tampered with; but
at the same time, can be formatted and moved around).

Any ideas?

Thanks,
Colin
 
D

Doug Robbins - Word MVP

Hi Colin,

I believe that the only way that you could be half sure of that would be to
create document variables to hold each item of data and then call the
userform again, populating it's controls with the information from the
variables if the user wants to modify it and then assign the new data to the
variables and use it to update the database. The user can then do what they
like with the data in the document - even delete the docvariable fields that
display the data, but the data will remain in the variable.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
C

Colin Chudyk

Doug,

Thanks. What they want to do is avoid using userforms alltogether (except
for the initial document generation). They want the user to be able to go
back to an old document, edit the contents (data and/or content) and have it
go back to the Access database.

I think I could almost do it by using forms and sections.... dice the
document up into many sections... protecting the fields themselves and
leaving the text of the document unprotected. However, in some cases this
data may be located in the middle of a paragraph.... in this case I can't
use a continuous section break because it breaks the paragraph.

Colin
 

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