Automatically fill out Document Propertities from a text field box

B

Bill Hughes

Greetings,

Goal:

To fill out the document title in a text field box in a protected form then
run a macro to bring up the document properties and copy the text into the
document properties title field.

Problem:

The Document Properties are read only in VBA.
The Document Properties dialog (Word Basic.FileProperties) is read only when
opened in a protected form.
Opening the Document Propertites from an autoopen macro (Word
Basic.FileProperties) are read only.

Any suggestion would be greatly appreciated. I have almost given up.
 
D

Doug Robbins - Word MVP

Run a macro on exit from the field that contains the following code:

With ActiveDocument
.BuiltInDocumentProperties(wdPropertyTitle) =
..FormFields("Title").Result
End With


--
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, originally posted via msnews.microsoft.com
 

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