Group: microsoft.public.word.vba.general
From: "GB"
Date: Wednesday, February 20, 2008 12:14 PM
Subject: Re: Built-in properties


"Klaus Linke" wrote in message
news:eqsONH%23cIHA.1168@TK2MSFTNGP02.phx.gbl...
> Use "For Each", and it doesn't matter how many there are :-)

Ah thanks. They hadn't invented 'For Each' when I learnt my programming,
which was really a long, long time ago.

I take it that you need to tell VBA what myProp is, so you include
Dim myProp As DocumentProperty

Does VBA infer the object type that you mean if there is only one type of
object in a particular collection? I guess that would be kind of risky
programming.

Then you can just use it naturally, as in
For Each myProp In ActiveDocument.BuiltInDocumentProperties or
myProp.Name

Nice!



Safety Articles | Usenet Groups | Usenet News | Bluegrass