Re: Inside Word Objects by Jezebel
Jezebel
Fri Apr 28 04:05:46 CDT 2006
I think you're going to be pushing sh*t uphill to make this work. As Tony
says, the short answer is "it depends". Most object properties are dynamic:
that is, they are determined on-the-fly when you ask for them. Consider the
properties of a Range -- there are literally hundreds, and a Range can be
anything; so clearly Word can't store all the properties of all possible
Ranges.
Your Rows object is problematic for other reasons, too. Try this: create a
table. Select two cells from different rows and merge them. Now check the
table's Rows property. Or this: Create a table with 3 rows and 4 columns.
Merge cells 1 and 2 in row 1, cells 2 and 3 in row 2, and cells 3 and 4 in
row 3. Align the column boundaries. Now, using VBA, work out how many
columns the table has: three or four?
"Lauro" <colasanti@mclink.it> wrote in message
news:am925214qffint9p8spvojig8u6jk99rl8@4ax.com...
> On Wed, 26 Apr 2006 23:13:10 +0100, "Tony Jollans" <My Forename at My
> Surname dot com> wrote:
>
>>I don't entirely follow what you're asking but I think the answer is it
>>depends, As far as I know nothing is documented but Word keeps track of
>>some
>>things and calculates others on demand but which and when is anybody's
>>guess. My guess is that Paragraphs.Count is stored.
>
> I'm trying to guess how Microsoft implemented the Word Model Object
> because I'm trying to design a small Model Object with the goal to
> extend some Word Objects (like paragraph, Table, Rows or Row).
>
> For instance I'd like to have a MyRows Collection; so every time I
> call MyRows.Add, a new Row AND a new MyRow will be created.[ MyRow
> will have some extra property and methods]. But how I can keep track
> of the number (or position) of MyRows if the user will delete (or
> move) the regular Row?
> It is better I try to trap all the possible commands or more likely
> just to rely on the regular Rows property?
> How does Word keep track of the rows? It keep some variable in memory
> or just count (when needed) the row marks "on the document"?
> Mybe is better that I don't keep MyRoes in memory but just create them
> when needed and rely on the Word row marks.
>
> I hope that I made my idea clearer.
>
> ciao lauro