Re: Property autofill contents
- From: Jay Freedman <jay.freedman@xxxxxxxxxxx>
- Date: Tue, 22 Apr 2008 00:00:30 -0400
Hi Steve,
The help topic on the BuiltInDocumentProperties suggests that you use the Object
Browser to see what properties are available. To do that, in the VBA editor,
press F2 to open the browser; type wdBuiltInProperty in the search box and click
the binoculars button next to it. The bottom right pane of the browser will
display all the valid values.
Also, the Example section of the help topic contains a macro called
ListProperties. (Sadly, the 2007 version of the help topic omits the Sub
ListProperties() line at the top and the End Sub line at the bottom, which are
necessary.) If you copy/paste that macro into a module in the VBA editor and run
it, it will create a list of all the built-in properties defined in the current
document.
Some built-in properties are editable (read/write) and others are read-only. The
best way to know which ones are editable is to look at the File > Properties
dialog; any that have an editable text box are read/write, such as
ActiveDocument.BuiltInDocumentProperties(wdPropertyComments).Value = "Wow"
but any others (such as wdPropertyPages) are read-only.
The CustomDocumentProperties collection is empty until you define one or more
values, either in code or through the Custom tab of the File > Properties
dialog. You can name them anything you like, and any you define are always
editable.
On Mon, 21 Apr 2008 13:33:26 -0700, SteveDB1
<SteveDB1@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Jay,.
Thank you for your response.
The information is indeed helpful.
I checked out the google groups, and found a couple of interesting articles,
MS KB articles on the DSOfile.dll file, etc....
I then called those two up in the Office help file.
Two items initially come to mind after having read the articles provided in
the help file.
It seems to me that the BuiltInDocumentProperties allows for reading the
properties, and CustomDocumentProperties allows for editing those
properties,m or creating new ones not normally accessible, or allowed.
Is this correct?
where can I find a digitally accessible library that gives all the property
items I can modify, or look for?
The help file appears to be limited, and we don't have a VBA book for Word.
Again thank you for the course direction.
"Jay Freedman" wrote:
SteveDB1 wrote:
Good morning all.
I've been working with Excel for a while and have become reasonably
comfortable with macros.
Last week, a colleague and I were discussing having an autofill macro
that he'd made for excel which populates the contents, author name,
and keywords, etc... boxes in the property dialogue box.
He'd asked me if I'd seen anything like that for Word. (it's
important for the work we do here)
I've looked around using a few different keywords here, and cannot
locate any discussions on this topic for Word.
Are there any discussions available where this topic has been
discussed? If so, where might I find them?
Thank you for your responses.
Best.
Office documents have two kinds of properties that are stored in separate
collections: BuiltInDocumentProperties and CustomDocumentProperties.
You can use Google and Google Groups searches for these two terms to find
plenty of discussions on the topic -- for example,
<http://groups.google.com/groups?as_q=builtindocumentproperties&as_ugroup=microsoft.public.word.*>
If you have specific questions about working with these collections, come
back here any time!
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
- Follow-Ups:
- Re: Property autofill contents
- From: SteveDB1
- Re: Property autofill contents
- References:
- Property autofill contents
- From: SteveDB1
- Re: Property autofill contents
- From: Jay Freedman
- Re: Property autofill contents
- From: SteveDB1
- Property autofill contents
- Prev by Date: Re: Property autofill contents
- Next by Date: Re: Stepping through a document
- Previous by thread: Re: Property autofill contents
- Next by thread: Re: Property autofill contents
- Index(es):
Relevant Pages
|