Group: microsoft.public.word.vba.general
From: "Klaus Linke"
Date: Wednesday, February 20, 2008 10:58 AM
Subject: Re: Built-in properties

Use "For Each", and it doesn't matter how many there are :-)

Dim myText As String
Dim myProp As DocumentProperty
On Error Resume Next
myText = ""
For Each myProp In ActiveDocument.BuiltInDocumentProperties
myText = myText _
& myProp.Name & ":- " _
& myProp.Value & vbCrLf
Next
MsgBox myText

Probably there isn't a standard on what you're supposed to use them for (say
"Format").

Regards,
Klaus


"GB" wrote:
> Hi, I've just found out there is a built-in properties thingy, and I found
> out that there seem to be 30 of them. However, I had to write some code to
> list them out (below, in case you need it) and I still don't have
> definitions of what these properties actually are. It's fairly obvious
> what most of them are, but what is 'format' for example?
>
> The inbuilt help never seems to just give a simple listing of these
> different options. Why would that be?
>
> Here's the code to list them, btw:
>
> Sub GetBuiltInDocumentProperties()
> On Error Resume Next
> mytext = ""
> For i = 1 To 255
> mytext = mytext & i & " " &
> ActiveDocument.BuiltInDocumentProperties(i).Name & ":- " &
> ActiveDocument.BuiltInDocumentProperties(i).Value & vbCrLf
> Next
> MsgBox mytext
> End Sub
>
> This lists out properties 1 - 30, but how do I know there isn't a property
> number 699 (or 6,000,699) for example?
>