C
Cindy Meister
Hi Marc
In a general sort of way, you can
For each para in ActiveDocument paras
'Your code here
Next
To "walk" the paragraphs in a document "Story". Use
para.Range.Information(wdWithinTable) to determine whether you're in a
table.
Look up "StoryRanges" and all related/linked in the VBA Help if you need
to deal with anything besides the main body of the document (or look it
up anyway, to get an understanding of what it means).
-- Cindy
-----Original Message-----
From: Marc Hillman [mailto:[email protected]]
Posted At: 24 June 2006 15:35
Posted To: microsoft.public.word.vba.general
Conversation: For each bit of document do ?
Subject: Re: For each bit of document do ?
I'm trying to check that certain elements appear in a certain order, for
instance that every table is preceded or followed immediately by text of
style "Caption". I feel I should be able to iterate through something
and hit a table and then a paragraph (and check its style).
It causes me to wonder, if I wanted to render a word document in some
strange way (eg I wanted to write my own HTML exporter) how could you do
it?
I don't understand how I could find all the different pieces
sequentially and export them.
(Delete REMOVE from my e-mail to reply direct)
In a general sort of way, you can
For each para in ActiveDocument paras
'Your code here
Next
To "walk" the paragraphs in a document "Story". Use
para.Range.Information(wdWithinTable) to determine whether you're in a
table.
Look up "StoryRanges" and all related/linked in the VBA Help if you need
to deal with anything besides the main body of the document (or look it
up anyway, to get an understanding of what it means).
-- Cindy
-----Original Message-----
From: Marc Hillman [mailto:[email protected]]
Posted At: 24 June 2006 15:35
Posted To: microsoft.public.word.vba.general
Conversation: For each bit of document do ?
Subject: Re: For each bit of document do ?
I'm trying to check that certain elements appear in a certain order, for
instance that every table is preceded or followed immediately by text of
style "Caption". I feel I should be able to iterate through something
and hit a table and then a paragraph (and check its style).
It causes me to wonder, if I wanted to render a word document in some
strange way (eg I wanted to write my own HTML exporter) how could you do
it?
I don't understand how I could find all the different pieces
sequentially and export them.
(Delete REMOVE from my e-mail to reply direct)