Word Form help

M

MarkN

Hello,

I use Word to create user guides and I use DOCPROPERTY fields to store
changeable information.

I have a user form that appears on open and what I want is a text box on the
form to display one of the DOCPROPERTY values. The user can then accept the
current DOCPROPERTY value or change. Either way, when the user clicks OK,
whatever is in the text box is stored as the DOCPROPERTY

Thanks in advance,
MarkN
 
J

Jezebel

You have a little misunderstanding of terminology here. DocProperty fields
don't store anything: they display the contents of a custom or built-in
document property (which you get to through File > Properties). It's the
property that stores the value, not the field.

So what you need your form to do is read, display, and set the document
property.

If it's a built-in document property use

txtBox = activedocument.BuiltinDocumentProperties("Name")
:
activedocument.BuiltinDocumentProperties("Name") = txtbox

if it's a custom property, use .CustomDocumentProperties("Name") ..

After changing the property, you need to update fields in the document to
display the new value.
 

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