Property Linking

T

Thomas Dawe

I have a document template that is often used. I would
like to be able to take what is typed within the document,
and attribute it automatically to the properties fields.
I have fields within my form that I would like to show up
on the Title, Author, Manager, Subject, Category, and
Comment fields.

I know it is possible to do this sort of linking to custom
properties, but when I try to use field codes to link main
properties to the document, it always seems a one way
road. The properties are automatically placed within the
document, but never vice-versa. This is entirely the
opposite direction I wanted to go with the field
information.

Can anyone give me help on setting it up right? If you
can help me with one field, I can probably get the rest.
So let's take Title for instance. I have a field that the
number of the document is placed. I would like to use
that as the Title property. How do I get the document to
copy that information from the document body to the Title
field in properties?
 
D

Doug Robbins

You should have a userform in the template into which the user enters that
information and then code in the userform can be used to populate those
properties and place the information in the relevant places in the document
itself.

See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
P

Peter Jamieson

A solution using fields is possible for the Title, Subject, Author, Keywords
and Comments properties, but not the others, so I think you will have to go
along the lines suggested by Doug. But FYI

if you use

{ TITLE "my title" }

or

{ INFO TITLE "my title" }

and select and execute the field, "my title" wil lbe placed in the built-in
Title property. So you can for example use

{ TITLE "{ FILLIN "my title" }" }

Where all the {} are the special field code braces you can insert using
ctrl-F9.

When you execute the nested fields you should see the FILLIN prompt, and
what you enter (with some constraints) should be displayed in the document
and used to update the Properties box.

Unfortunately, this only works for Title, Subject, Author, Keywords and
Comments,and not for the Manager, Company, and Category properties. You
could create a custom property called Manager and link it to the document,
but the result will not appear in the built-in properties dialog and using
the same name for a custom property as a built-in property may have some
adverse consequences (I don't know). If you don't absoultely have to use the
built-in properties, you could consider using links - personally, I'd play
safe and use slightly different names if I used that approach.
 
T

Thomas Dawe

Thank you, Doug. I'll play around with it and see what I
can come up with.

Thomas
 
T

Thomas Dawe

Thank you, Peter.

If I can't do something with Doug's suggestion, I'll
surely give yours an attempt.

Thomas
 

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