Create a User Defined Field in Word so that I can reference from E

S

scott56hannah

Hi,

I would like to create a field in a word document. That can be updated by
setting the field either directly in word or via a VBA application written in
Excel.

I have reviewed a few questions already answered in this forum and I can see
that potentially DocProperty or DocVariables may allow me to create my own
custom fields that are updatable.....but I cannot seem to get them to work
within the word document I am using to trial this.

Can someone point me in the right direction for this ?
 
C

Cindy M.

Hi =?Utf-8?B?c2NvdHQ1Nmhhbm5haA==?=,
I would like to create a field in a word document. That can be updated by
setting the field either directly in word or via a VBA application written in
Excel.

I have reviewed a few questions already answered in this forum and I can see
that potentially DocProperty or DocVariables may allow me to create my own
custom fields that are updatable.....but I cannot seem to get them to work
within the word document I am using to trial this.

Can someone point me in the right direction for this ?
Which version of Word? That defines the possibilities open to you...

The tricky part is something that the user may also update. For a DocVariable
you'd have to provide an interface, since these are not visible to the user. For
a DocProperty, the user would have to go to File/Properties.

A form field would be a possibility, but then the document would have to be
protected as a form.

A bookmark is easily accessed by both code and the user, but is easily deleted
(accidentally) by the user.

Word 2007 has content controls, which would be the best solution.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
S

scott56hannah

I am developing this in Word 2003 and need it to work in the application

In terms of the User updating the field within the Word application that is
not really required because I am intending the fields to be updated from the
application I have developed in Excel and that application will update the
fields.

I think I am looking for some help and instruction on how to create fields
within the Word document that I can then access via the Excel application..

Thanks for any help or assistance
Scott
 
C

Cindy M.

Hi =?Utf-8?B?c2NvdHQ1Nmhhbm5haA==?=,
I am developing this in Word 2003 and need it to work in the application

In terms of the User updating the field within the Word application that is
not really required because I am intending the fields to be updated from the
application I have developed in Excel and that application will update the
fields.

I think I am looking for some help and instruction on how to create fields
within the Word document that I can then access via the Excel application..
In that case, either a DocProperty or a DocVariable field would be appropriate.

You mention you can't get the samples you find to work, but you don't provide any
details about *how* they don't work. Perhaps if you expanded on that a bit...

Also, please note that questions about automating the Word application are better
addressed to the Word.Vba.General or the Word.Programming newsgroup. This newsgroup
primarily targets end-users, so VBA questions won't get answered as quickly.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in
the newsgroup and not by e-mail :)
 

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