Word VBA >> Paragraph located in a frame

by Patrick LEBON » Mon, 02 Aug 2004 18:49:17 GMT

Hi,

While browsing all the paragraphs of a wdMainTextStory range, how can I
know if a paragraph is within a frame or not.

Tx in advance.

Patrick++


Word VBA >> Paragraph located in a frame

by Jezebel » Mon, 02 Aug 2004 19:02:41 GMT


Check the Frames count for the paragraph's range:

If pParagraph.Range.Frames.Count > 0 then ....












Word VBA >> Paragraph located in a frame

by Patrick LEBON » Mon, 02 Aug 2004 20:05:33 GMT

Perfectly addressed the point. Tx for the tip.

Best regards,

P++






Similar Threads

1. Delete all frames in a document including the text located in these frames - Word VBA

2. "framed paragraph" error after InsertBreak command

I am trying to merge two documents in one. Opening first 
document (Documents.Open FileName:=Test.doc), then - 
Selection.EndOf Unit:=wdStory, after Selection.InsertBreak 
wdSectionBreakNextPage receiving the error: "This method 
or property is not available because the object refers to 
a framed paragraph." Please, help me to resolve this issue.
Thanks, Ed.
 

3. a paragraph mark on top left, inside a frame - Word Document management

4. Putting frames into content controls forces extra paragraphs.

5. Indented Paragraphs and Text Boxes/Frames

6. Return the frame anchored to a given paragraph

Is there a way in VBA to return the (first/only) frame anchored to a 
given paragraph?

I was hoping the Frame object had an Anchor property like a Shape does. 
Of course, it doesn't.  Is there another way, perhaps by looping through 
all the frames in the doc to matching one of them with its "anchoree" 
paragraph?  I'm stumped.  TIA.

7. Framed Paragraph - Word VBA

8. Removing paragraph frames with VBA

Hello,
I scanned a document and did OCR on it. The accuracy was excellent, but 
every paragraph is inside a frame. I can remove the frames manually but it 
will take forever.

Is there a way (using the Range.Frames. property someone posted here 
earlier) to remove all the frames inside a document?

Any help would be appreciated.

Thanks.